using BS.Shared; using BS.Shared.DataContracts; using System; namespace BeWo.ViewModel { public class CustomerAPPCodeVM : AbstractDCMapperVM { public static string PropertyName_CustomerCode = "CustomerCode"; public static string PropertyName_CustomerCodeGenDate = "CustomerCodeGenDate"; public static string PropertyName_IsChatAktive = "IsChatAktive"; public static string PropertyName_BenutzerName = "Benutzername"; public static string PropertyName_Passwort = "Passwort"; private string _CustomerCode; private DateTime _CustomerCodeGenDate; private long? _CustomerOid; private int _IsChatAktive; private string _BenutzerName; private string _Passwort; public CustomerAPPCodeVM(CustomerAPPCodeDC pDC) : base(pDC, true) { } public virtual string CustomerCode { get { return this._CustomerCode; } set { if (this.AreDifferent(this._CustomerCode, value)) { this._CustomerCode = value; } } } public virtual string BenutzerName { get { return this._BenutzerName; } set { if (this.AreDifferent(this._BenutzerName, value)) { this._BenutzerName = value; } } } public virtual string Passwort { get { return this._Passwort; } set { if (this.AreDifferent(this._Passwort, value)) { this._Passwort = value; } } } public DateTime CustomerCodeGenDate { get { return this._CustomerCodeGenDate; } set { if (this.AreDifferent(this._CustomerCodeGenDate, value)) { this._CustomerCodeGenDate = value; this.StoreDirtyInformation(this.AreDifferent(this.DataContract.CustomerCodeGenDate, value), PropertyName_CustomerCodeGenDate); this.FirePropertyChanged(PropertyName_CustomerCodeGenDate); } } } public virtual long? CustomerOid { get { return this._CustomerOid; } set { if (this.AreDifferent(this._CustomerOid, value)) { this._CustomerOid = value; } } } public virtual int IsChatAktive { get { return this._IsChatAktive; } set { if (this.AreDifferent(this._IsChatAktive, value)) { this._IsChatAktive = value; } } } protected override void InitByDataContract(CustomerAPPCodeDC pDataContract) { this._CustomerCode = pDataContract.CustomerCode; this._CustomerCodeGenDate = pDataContract.CustomerCodeGenDate; this._CustomerOid = pDataContract.CustomerOid; this._IsChatAktive = pDataContract.IsChatAktive; this._BenutzerName = pDataContract.Benutzername; this._Passwort = pDataContract.Passwort; } protected override CustomerAPPCodeDC MapToDataContract(CustomerAPPCodeDC pDataContract, bool doCommit) { pDataContract.CustomerCode = _CustomerCode; pDataContract.CustomerCodeGenDate = _CustomerCodeGenDate; pDataContract.CustomerOid = _CustomerOid; pDataContract.IsChatAktive = _IsChatAktive; pDataContract.Benutzername = _BenutzerName; pDataContract.Passwort = _Passwort; return pDataContract; } } }