aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Properties/Settings.Designer.cs
blob: 465246f32cb7244604ec28f2240413ab1aaff1b9 (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
25
26
27
28
29
30
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.MachineStudio.Stubs.Properties
{
    
    
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
    {
        
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
        
        public static Settings Default
        {
            get
            {
                return defaultInstance;
            }
        }
    }
}
vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
//------------------------------------------------------------------------------
// <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;

namespace Tango.BL.Entities
{
    [Table("CUSTOMERS")]
    public abstract class CustomerBase : ObservableEntity<Customer>
    {

        public event EventHandler<String> NameChanged;

        public event EventHandler<Organization> OrganizationChanged;

        public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;

        protected String _organizationguid;

        /// <summary>
        /// Gets or sets the customerbase organization guid.
        /// </summary>

        [Column("ORGANIZATION_GUID")]
        [ForeignKey("Organization")]

        public  String OrganizationGuid
        {
            get 
            {
                return _organizationguid; 
            }

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

                }
            }
        }

        protected String _name;

        /// <summary>
        /// Gets or sets the customerbase name.
        /// </summary>

        [Column("NAME")]

        public  String Name
        {
            get 
            {
                return _name; 
            }

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

                    OnNameChanged(value);

                }
            }
        }

        protected Organization _organization;

        /// <summary>
        /// Gets or sets the customerbase organization.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Organization Organization
        {
            get 
            {
                return _organization; 
            }

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

                    if (Organization != null)
                    {
                        OrganizationGuid = Organization.Guid;
                    }

                    OnOrganizationChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<Job> _jobs;

        /// <summary>
        /// Gets or sets the customerbase jobs.
        /// </summary>

        public virtual SynchronizedObservableCollection<Job> Jobs
        {
            get 
            {
                return _jobs; 
            }

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

                    OnJobsChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the Name has changed.
        /// </summary>
        protected virtual void OnNameChanged(String name)
        {
            NameChanged?.Invoke(this, name);
            RaisePropertyChanged(nameof(Name));
        }

        /// <summary>
        /// Called when the Organization has changed.
        /// </summary>
        protected virtual void OnOrganizationChanged(Organization organization)
        {
            OrganizationChanged?.Invoke(this, organization);
            RaisePropertyChanged(nameof(Organization));
        }

        /// <summary>
        /// Called when the Jobs has changed.
        /// </summary>
        protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
        {
            JobsChanged?.Invoke(this, jobs);
            RaisePropertyChanged(nameof(Jobs));
        }

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

            Jobs = new SynchronizedObservableCollection<Job>();

        }
    }
}