//------------------------------------------------------------------------------
//
// 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("TECH_VALVES")]
public abstract class TechValveBase : ObservableEntity
{
public event EventHandler CodeChanged;
public event EventHandler NameChanged;
public event EventHandler DescriptionChanged;
public event EventHandler TypeChanged;
public event EventHandler State1Changed;
public event EventHandler State2Changed;
protected Int32 _code;
///
/// Gets or sets the techvalvebase code.
///
[Column("CODE")]
public Int32 Code
{
get
{
return _code;
}
set
{
if (_code != value)
{
_code = value;
OnCodeChanged(value);
}
}
}
protected String _name;
///
/// Gets or sets the techvalvebase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected String _description;
///
/// Gets or sets the techvalvebase description.
///
[Column("DESCRIPTION")]
public String Description
{
get
{
return _description;
}
set
{
if (_description != value)
{
_description = value;
OnDescriptionChanged(value);
}
}
}
protected Int32 _type;
///
/// 0 = 2-Way
/// 1 = 3-Way
///
[Column("TYPE")]
public Int32 Type
{
get
{
return _type;
}
set
{
if (_type != value)
{
_type = value;
OnTypeChanged(value);
}
}
}
protected String _state1;
///
/// Gets or sets the techvalvebase state1.
///
[Column("STATE1")]
public String State1
{
get
{
return _state1;
}
set
{
if (_state1 != value)
{
_state1 = value;
OnState1Changed(value);
}
}
}
protected String _state2;
///
/// Gets or sets the techvalvebase state2.
///
[Column("STATE2")]
public String State2
{
get
{
return _state2;
}
set
{
if (_state2 != value)
{
_state2 = value;
OnState2Changed(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 Type has changed.
///
protected virtual void OnTypeChanged(Int32 type)
{
TypeChanged?.Invoke(this, type);
RaisePropertyChanged(nameof(Type));
}
///
/// Called when the State1 has changed.
///
protected virtual void OnState1Changed(String state1)
{
State1Changed?.Invoke(this, state1);
RaisePropertyChanged(nameof(State1));
}
///
/// Called when the State2 has changed.
///
protected virtual void OnState2Changed(String state2)
{
State2Changed?.Invoke(this, state2);
RaisePropertyChanged(nameof(State2));
}
///
/// Initializes a new instance of the class.
///
public TechValveBase() : base()
{
}
}
}