//------------------------------------------------------------------------------
//
// 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("IDS_PACK_FORMULAS")]
public abstract class IdsPackFormulaBase : ObservableEntity
{
public event EventHandler CodeChanged;
public event EventHandler NameChanged;
public event EventHandler DescriptionChanged;
public event EventHandler AutoCalculatedChanged;
public event EventHandler> IdsPacksChanged;
protected Int32 _code;
///
/// Gets or sets the idspackformulabase code.
///
[Column("CODE")]
public Int32 Code
{
get
{
return _code;
}
set
{
if (_code != value)
{
_code = value;
OnCodeChanged(value);
}
}
}
protected String _name;
///
/// Gets or sets the idspackformulabase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected String _description;
///
/// Gets or sets the idspackformulabase description.
///
[Column("DESCRIPTION")]
public String Description
{
get
{
return _description;
}
set
{
if (_description != value)
{
_description = value;
OnDescriptionChanged(value);
}
}
}
protected Boolean _autocalculated;
///
/// Gets or sets the idspackformulabase auto calculated.
///
[Column("AUTO_CALCULATED")]
public Boolean AutoCalculated
{
get
{
return _autocalculated;
}
set
{
if (_autocalculated != value)
{
_autocalculated = value;
OnAutoCalculatedChanged(value);
}
}
}
protected SynchronizedObservableCollection _idspacks;
///
/// Gets or sets the idspackformulabase ids packs.
///
public virtual SynchronizedObservableCollection IdsPacks
{
get
{
return _idspacks;
}
set
{
if (_idspacks != value)
{
_idspacks = value;
OnIdsPacksChanged(value);
}
}
}
///
/// Called when the Code has changed.
///
protected virtual void OnCodeChanged(Int32 code)
{
CodeChanged?.Invoke(this, code);
RaisePropertyChanged(nameof(Code));
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the Description has changed.
///
protected virtual void OnDescriptionChanged(String description)
{
DescriptionChanged?.Invoke(this, description);
RaisePropertyChanged(nameof(Description));
}
///
/// Called when the AutoCalculated has changed.
///
protected virtual void OnAutoCalculatedChanged(Boolean autocalculated)
{
AutoCalculatedChanged?.Invoke(this, autocalculated);
RaisePropertyChanged(nameof(AutoCalculated));
}
///
/// Called when the IdsPacks has changed.
///
protected virtual void OnIdsPacksChanged(SynchronizedObservableCollection idspacks)
{
IdsPacksChanged?.Invoke(this, idspacks);
RaisePropertyChanged(nameof(IdsPacks));
}
///
/// Initializes a new instance of the class.
///
public IdsPackFormulaBase() : base()
{
IdsPacks = new SynchronizedObservableCollection();
}
}
}