Files
BeWoPlaner/BeWo/ViewModel/PasswortVerlaufVM.cs

70 lines
1.8 KiB
C#
Raw Permalink Normal View History

2016-12-22 09:43:35 +01:00
using BS.Shared;
using BS.Shared.DataContracts;
using System;
namespace BeWo.ViewModel
{
public class PasswortVerlaufVM : AbstractDCMapperVM<PasswortVerlaufDC>
{
public static string PropertyName_ErstellDatum = "ErstellDatum";
//Nein zu Passwort und Salt
private DateTime _ErstellDatum;
private long? _ApplicationUserOid;
public PasswortVerlaufVM(PasswortVerlaufDC pDC)
: base(pDC, true)
{
}
public DateTime ErstellDatum
{
get { return this._ErstellDatum; }
set
{
if (this.AreDifferent(this._ErstellDatum, value))
{
this._ErstellDatum = value;
this.StoreDirtyInformation(this.AreDifferent(DataContract.ErstellDatum, value), PropertyName_ErstellDatum);
this.FirePropertyChanged(PropertyName_ErstellDatum);
}
}
}
public virtual long? ApplicationUserOid
{
get
{
return this._ApplicationUserOid;
}
set
{
if (this.AreDifferent(this._ApplicationUserOid, value))
{
this._ApplicationUserOid = value;
}
}
}
protected override void InitByDataContract(PasswortVerlaufDC pDataContract)
{
_ApplicationUserOid = pDataContract.ApplicationUserOid;
_ErstellDatum = pDataContract.ErstellDatum;
}
protected override PasswortVerlaufDC MapToDataContract(PasswortVerlaufDC pDataContract, bool doCommit)
{
pDataContract.ErstellDatum = _ErstellDatum;
pDataContract.ApplicationUserOid = _ApplicationUserOid;
return pDataContract;
}
}
}