aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/DTO/SegmentDTO.cs
blob: 00d74ec306fc6aa30c166eddac3415cfde271eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
// 
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;

namespace Tango.BL.Entities
{
    [Table("IDS_PACKS")]
    public abstract class IdsPackBase : ObservableEntity<IdsPack>
    {

        public event EventHandler<Int32> PackIndexChanged;

        public event EventHandler<Boolean> IsEmptyChanged;

        public event EventHandler<CartridgeType> CartridgeTypeChanged;

        public event EventHandler<Configuration> ConfigurationChanged;

        public event EventHandler<Dispenser> DispenserChanged;

        public event EventHandler<IdsPackFormula> IdsPackFormulaChanged;

        public event EventHandler<LiquidType> LiquidTypeChanged;

        public event EventHandler<MidTankType> MidTankTypeChanged;

        protected String _configurationguid;

        /// <summary>
        /// Gets or sets the idspackbase configuration guid.
        /// </summary>

        [Column("CONFIGURATION_GUID")]
        [ForeignKey("Configuration")]

        public  String ConfigurationGuid
        {
            get 
            {
                return _configurationguid; 
            }

            set 
            {
                if (_configurationguid != value)
                {
                    _configurationguid = value;

                }
            }
        }

        protected String _dispenserguid;

        /// <summary>
        /// Gets or sets the idspackbase dispenser guid.
        /// </summary>

        [Column("DISPENSER_GUID")]
        [ForeignKey("Dispenser")]

        public  String DispenserGuid
        {
            get 
            {
                return _dispenserguid; 
            }

            set 
            {
                if (_dispenserguid != value)
                {
                    _dispenserguid = value;

                }
            }
        }

        protected String _liquidtypeguid;

        /// <summary>
        /// Gets or sets the idspackbase liquid type guid.
        /// </summary>

        [Column("LIQUID_TYPE_GUID")]
        [ForeignKey("LiquidType")]

        public  String LiquidTypeGuid
        {
            get 
            {
                return _liquidtypeguid; 
            }

            set 
            {
                if (_liquidtypeguid != value)
                {
                    _liquidtypeguid = value;

                }
            }
        }

        protected String _cartridgetypeguid;

        /// <summary>
        /// Gets or sets the idspackbase cartridge type guid.
        /// </summary>

        [Column("CARTRIDGE_TYPE_GUID")]
        [ForeignKey("CartridgeType")]

        public  String CartridgeTypeGuid
        {
            get 
            {
                return _cartridgetypeguid; 
            }

            set 
            {
                if (_cartridgetypeguid != value)
                {
                    _cartridgetypeguid = value;

                }
            }
        }

        protected String _midtanktypeguid;

        /// <summary>
        /// Gets or sets the idspackbase mid tank type guid.
        /// </summary>

        [Column("MID_TANK_TYPE_GUID")]
        [ForeignKey("MidTankType")]

        public  String MidTankTypeGuid
        {
            get 
            {
                return _midtanktypeguid; 
            }

            set 
            {
                if (_midtanktypeguid != value)
                {
                    _midtanktypeguid = value;

                }
            }
        }

        protected String _idspackformulaguid;

        /// <summary>
        /// Gets or sets the idspackbase ids pack formula guid.
        /// </summary>

        [Column("IDS_PACK_FORMULA_GUID")]
        [ForeignKey("IdsPackFormula")]

        public  String IdsPackFormulaGuid
        {
            get 
            {
                return _idspackformulaguid; 
            }

            set 
            {
                if (_idspackformulaguid != value)
                {
                    _idspackformulaguid = value;

                }
            }
        }

        protected Int32 _packindex;

        /// <summary>
        /// Gets or sets the idspackbase pack index.
        /// </summary>

        [Column("PACK_INDEX")]

        public  Int32 PackIndex
        {
            get 
            {
                return _packindex; 
            }

            set 
            {
                if (_packindex != value)
                {
                    _packindex = value;

                    OnPackIndexChanged(value);

                }
            }
        }

        protected Boolean _isempty;

        /// <summary>
        /// Gets or sets the idspackbase is empty.
        /// </summary>

        [Column("IS_EMPTY")]

        public  Boolean IsEmpty
        {
            get 
            {
                return _isempty; 
            }

            set 
            {
                if (_isempty != value)
                {
                    _isempty = value;

                    OnIsEmptyChanged(value);

                }
            }
        }

        protected CartridgeType _cartridgetype;

        /// <summary>
        /// Gets or sets the idspackbase cartridge types.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual CartridgeType CartridgeType
        {
            get 
            {
                return _cartridgetype; 
            }

            set 
            {
                if (_cartridgetype != value)
                {
                    _cartridgetype = value;

                    if (CartridgeType != null)
                    {
                        CartridgeTypeGuid = CartridgeType.Guid;
                    }

                    OnCartridgeTypeChanged(value);

                }
            }
        }

        protected Configuration _configuration;

        /// <summary>
        /// Gets or sets the idspackbase configuration.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Configuration Configuration
        {
            get 
            {
                return _configuration; 
            }

            set 
            {
                if (_configuration != value)
                {
                    _configuration = value;

                    if (Configuration != null)
                    {
                        ConfigurationGuid = Configuration.Guid;
                    }

                    OnConfigurationChanged(value);

                }
            }
        }

        protected Dispenser _dispenser;

        /// <summary>
        /// Gets or sets the idspackbase dispenser.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Dispenser Dispenser
        {
            get 
            {
                return _dispenser; 
            }

            set 
            {
                if (_dispenser != value)
                {
                    _dispenser = value;

                    if (Dispenser != null)
                    {
                        DispenserGuid = Dispenser.Guid;
                    }

                    OnDispenserChanged(value);

                }
            }
        }

        protected IdsPackFormula _idspackformula;

        /// <summary>
        /// Gets or sets the idspackbase ids pack formulas.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual IdsPackFormula IdsPackFormula
        {
            get 
            {
                return _idspackformula; 
            }

            set 
            {
                if (_idspackformula != value)
                {
                    _idspackformula = value;

                    if (IdsPackFormula != null)
                    {
                        IdsPackFormulaGuid = IdsPackFormula.Guid;
                    }

                    OnIdsPackFormulaChanged(value);

                }
            }
        }

        protected LiquidType _liquidtype;

        /// <summary>
        /// Gets or sets the idspackbase liquid types.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual LiquidType LiquidType
        {
            get 
            {
                return _liquidtype; 
            }

            set 
            {
                if (_liquidtype != value)
                {
                    _liquidtype = value;

                    if (LiquidType != null)
                    {
                        LiquidTypeGuid = LiquidType.Guid;
                    }

                    OnLiquidTypeChanged(value);

                }
            }
        }

        protected MidTankType _midtanktype;

        /// <summary>
        /// Gets or sets the idspackbase mid tank types.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual MidTankType MidTankType
        {
            get 
            {
                return _midtanktype; 
            }

            set 
            {
                if (_midtanktype != value)
                {
                    _midtanktype = value;

                    if (MidTankType != null)
                    {
                        MidTankTypeGuid = MidTankType.Guid;
                    }

                    OnMidTankTypeChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the PackIndex has changed.
        /// </summary>
        protected virtual void OnPackIndexChanged(Int32 packindex)
        {
            PackIndexChanged?.Invoke(this, packindex);
            RaisePropertyChanged(nameof(PackIndex));
        }

        /// <summary>
        /// Called when the IsEmpty has changed.
        /// </summary>
        protected virtual void OnIsEmptyChanged(Boolean isempty)
        {
            IsEmptyChanged?.Invoke(this, isempty);
            RaisePropertyChanged(nameof(IsEmpty));
        }

        /// <summary>
        /// Called when the CartridgeType has changed.
        /// </summary>
        protected virtual void OnCartridgeTypeChanged(CartridgeType cartridgetype)
        {
            CartridgeTypeChanged?.Invoke(this, cartridgetype);
            RaisePropertyChanged(nameof(CartridgeType));
        }

        /// <summary>
        /// Called when the Configuration has changed.
        /// </summary>
        protected virtual void OnConfigurationChanged(Configuration configuration)
        {
            ConfigurationChanged?.Invoke(this, configuration);
            RaisePropertyChanged(nameof(Configuration));
        }

        /// <summary>
        /// Called when the Dispenser has changed.
        /// </summary>
        protected virtual void OnDispenserChanged(Dispenser dispenser)
        {
            DispenserChanged?.Invoke(this, dispenser);
            RaisePropertyChanged(nameof(Dispenser));
        }

        /// <summary>
        /// Called when the IdsPackFormula has changed.
        /// </summary>
        protected virtual void OnIdsPackFormulaChanged(IdsPackFormula idspackformula)
        {
            IdsPackFormulaChanged?.Invoke(this, idspackformula);
            RaisePropertyChanged(nameof(IdsPackFormula));
        }

        /// <summary>
        /// Called when the LiquidType has changed.
        /// </summary>
        protected virtual void OnLiquidTypeChanged(LiquidType liquidtype)
        {
            LiquidTypeChanged?.Invoke(this, liquidtype);
            RaisePropertyChanged(nameof(LiquidType));
        }

        /// <summary>
        /// Called when the MidTankType has changed.
        /// </summary>
        protected virtual void OnMidTankTypeChanged(MidTankType midtanktype)
        {
            MidTankTypeChanged?.Invoke(this, midtanktype);
            RaisePropertyChanged(nameof(MidTankType));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="IdsPackBase" /> class.
        /// </summary>
        public IdsPackBase() : base()
        {
        }
    }
}