//------------------------------------------------------------------------------
//
// 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!
//
//------------------------------------------------------------------------------
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("PROCESS_PARAMETERS_TABLES_GROUPS")]
public abstract class ProcessParametersTablesGroupBase : ObservableEntity
{
public event EventHandler NameChanged;
public event EventHandler ActiveChanged;
public event EventHandler SaveDateChanged;
public event EventHandler> ProcessParametersTablesChanged;
public event EventHandler RmlChanged;
protected String _rmlguid;
///
/// Gets or sets the processparameterstablesgroupbase rml guid.
///
[Column("RML_GUID")]
[ForeignKey("Rml")]
public String RmlGuid
{
get
{
return _rmlguid;
}
set
{
if (_rmlguid != value)
{
_rmlguid = value;
}
}
}
protected String _name;
///
/// Gets or sets the processparameterstablesgroupbase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected Boolean _active;
///
/// Gets or sets the processparameterstablesgroupbase active.
///
[Column("ACTIVE")]
public Boolean Active
{
get
{
return _active;
}
set
{
if (_active != value)
{
_active = value;
OnActiveChanged(value);
}
}
}
protected DateTime _savedate;
///
/// Gets or sets the processparameterstablesgroupbase save date.
///
[Column("SAVE_DATE")]
public DateTime SaveDate
{
get
{
return _savedate;
}
set
{
if (_savedate != value)
{
_savedate = value;
OnSaveDateChanged(value);
}
}
}
protected SynchronizedObservableCollection _processparameterstables;
///
/// Gets or sets the processparameterstablesgroupbase process parameters tables.
///
public virtual SynchronizedObservableCollection ProcessParametersTables
{
get
{
return _processparameterstables;
}
set
{
if (_processparameterstables != value)
{
_processparameterstables = value;
OnProcessParametersTablesChanged(value);
}
}
}
protected Rml _rml;
///
/// Gets or sets the processparameterstablesgroupbase rml.
///
[XmlIgnore]
[JsonIgnore]
public virtual Rml Rml
{
get
{
return _rml;
}
set
{
if (_rml != value)
{
_rml = value;
if (Rml != null)
{
RmlGuid = Rml.Guid;
}
OnRmlChanged(value);
}
}
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the Active has changed.
///
protected virtual void OnActiveChanged(Boolean active)
{
ActiveChanged?.Invoke(this, active);
RaisePropertyChanged(nameof(Active));
}
///
/// Called when the SaveDate has changed.
///
protected virtual void OnSaveDateChanged(DateTime savedate)
{
SaveDateChanged?.Invoke(this, savedate);
RaisePropertyChanged(nameof(SaveDate));
}
///
/// Called when the ProcessParametersTables has changed.
///
protected virtual void OnProcessParametersTablesChanged(SynchronizedObservableCollection processparameterstables)
{
ProcessParametersTablesChanged?.Invoke(this, processparameterstables);
RaisePropertyChanged(nameof(ProcessParametersTables));
}
///
/// Called when the Rml has changed.
///
protected virtual void OnRmlChanged(Rml rml)
{
RmlChanged?.Invoke(this, rml);
RaisePropertyChanged(nameof(Rml));
}
///
/// Initializes a new instance of the class.
///
public ProcessParametersTablesGroupBase() : base()
{
ProcessParametersTables = new SynchronizedObservableCollection();
}
}
}