Files
BeWoPlaner/BeWo/ViewModel/CustomerAPPCodeVM.cs

145 lines
4.1 KiB
C#
Raw Permalink Normal View History

2016-06-27 01:45:38 +02:00
using BS.Shared;
using BS.Shared.DataContracts;
using System;
namespace BeWo.ViewModel
{
public class CustomerAPPCodeVM : AbstractDCMapperVM<CustomerAPPCodeDC>
{
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";
2016-06-27 01:45:38 +02:00
private string _CustomerCode;
private DateTime _CustomerCodeGenDate;
private long? _CustomerOid;
private int _IsChatAktive;
private string _BenutzerName;
private string _Passwort;
2016-06-27 01:45:38 +02:00
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;
}
}
}
2016-06-27 01:45:38 +02:00
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;
2016-06-27 01:45:38 +02:00
}
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;
2016-06-27 01:45:38 +02:00
return pDataContract;
}
}
}