aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Embroidery/libEmbroideryTest/stdafx.cpp
blob: 22d9737e8b4ce7f6700e65698f58f4aedbfcd2c8 (plain)
1
2
3
4
5
6
7
8
// stdafx.cpp : source file that includes just the standard includes
// libEmbroideryTest.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
//------------------------------------------------------------------------------
// <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("PUBLISHED_PROCEDURE_PROJECTS_VERSIONS")]
    public abstract class PublishedProcedureProjectsVersionBase : ObservableEntity<PublishedProcedureProjectsVersion>
    {

        public event EventHandler<Int32> VersionChanged;

        public event EventHandler<String> AuthorChanged;

        public event EventHandler<String> ProjectJsonStringChanged;

        public event EventHandler<PublishedProcedureProject> PublishedProcedureProjectChanged;

        protected String _publishedprocedureprojectguid;

        /// <summary>
        /// Gets or sets the publishedprocedureprojectsversionbase published procedure project guid.
        /// </summary>

        [Column("PUBLISHED_PROCEDURE_PROJECT_GUID")]
        [ForeignKey("PublishedProcedureProject")]

        public  String PublishedProcedureProjectGuid
        {
            get 
            {
                return _publishedprocedureprojectguid; 
            }

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

                }
            }
        }

        protected Int32 _version;

        /// <summary>
        /// Gets or sets the publishedprocedureprojectsversionbase version.
        /// </summary>

        [Column("VERSION")]

        public  Int32 Version
        {
            get 
            {
                return _version; 
            }

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

                    OnVersionChanged(value);

                }
            }
        }

        protected String _author;

        /// <summary>
        /// Gets or sets the publishedprocedureprojectsversionbase author.
        /// </summary>

        [Column("AUTHOR")]

        public  String Author
        {
            get 
            {
                return _author; 
            }

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

                    OnAuthorChanged(value);

                }
            }
        }

        protected String _projectjsonstring;

        /// <summary>
        /// Gets or sets the publishedprocedureprojectsversionbase project json string.
        /// </summary>

        [Column("PROJECT_JSON_STRING")]

        public  String ProjectJsonString
        {
            get 
            {
                return _projectjsonstring; 
            }

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

                    OnProjectJsonStringChanged(value);

                }
            }
        }

        protected PublishedProcedureProject _publishedprocedureproject;

        /// <summary>
        /// Gets or sets the publishedprocedureprojectsversionbase published procedure projects.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual PublishedProcedureProject PublishedProcedureProject
        {
            get 
            {
                return _publishedprocedureproject; 
            }

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

                    if (PublishedProcedureProject != null)
                    {
                        PublishedProcedureProjectGuid = PublishedProcedureProject.Guid;
                    }

                    OnPublishedProcedureProjectChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the Version has changed.
        /// </summary>
        protected virtual void OnVersionChanged(Int32 version)
        {
            VersionChanged?.Invoke(this, version);
            RaisePropertyChanged(nameof(Version));
        }

        /// <summary>
        /// Called when the Author has changed.
        /// </summary>
        protected virtual void OnAuthorChanged(String author)
        {
            AuthorChanged?.Invoke(this, author);
            RaisePropertyChanged(nameof(Author));
        }

        /// <summary>
        /// Called when the ProjectJsonString has changed.
        /// </summary>
        protected virtual void OnProjectJsonStringChanged(String projectjsonstring)
        {
            ProjectJsonStringChanged?.Invoke(this, projectjsonstring);
            RaisePropertyChanged(nameof(ProjectJsonString));
        }

        /// <summary>
        /// Called when the PublishedProcedureProject has changed.
        /// </summary>
        protected virtual void OnPublishedProcedureProjectChanged(PublishedProcedureProject publishedprocedureproject)
        {
            PublishedProcedureProjectChanged?.Invoke(this, publishedprocedureproject);
            RaisePropertyChanged(nameof(PublishedProcedureProject));
        }

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