Files
BeWoPlaner/BeWo/ViewModel/TokenVM.cs
2017-06-30 13:33:49 +02:00

47 lines
1.2 KiB
C#

using BS.Shared;
using BS.Shared.DataContracts;
using System;
namespace BeWo.ViewModel
{
public class TokenVM : AbstractDCMapperVM<TokenDC>
{
public static string PropertyName_Beschreibung = "VertretungsZeitraumVon";
private string _Beschreibung;
public TokenVM(TokenDC pDC)
: base(pDC, true)
{
}
public string Beschreibung
{
get { return this._Beschreibung; }
set
{
if (this.AreDifferent(this._Beschreibung, value))
{
this._Beschreibung = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Beschreibung, value), PropertyName_Beschreibung);
this.FirePropertyChanged(PropertyName_Beschreibung);
}
}
}
protected override void InitByDataContract(TokenDC pDataContract)
{
this._Beschreibung = pDataContract.Beschreibung;
}
protected override TokenDC MapToDataContract(TokenDC pDataContract, bool doCommit)
{
pDataContract.Beschreibung = _Beschreibung;
return pDataContract;
}
}
}