91 lines
2.9 KiB
C#
91 lines
2.9 KiB
C#
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
using System;
|
|
|
|
namespace BeWo.ViewModel
|
|
{
|
|
public class VertretungVM : AbstractDCMapperVM<VertretungDC>
|
|
{
|
|
public static string PropertyName_VertretungsZeitraumVon = "VertretungsZeitraumVon";
|
|
|
|
public static string PropertyName_VertretungsZeitraumBis = "VertretungsZeitraumBis";
|
|
|
|
public static string PropertyName_Notice = "Notice";
|
|
|
|
private DateTime _VertretungsZeitraumVon;
|
|
|
|
private DateTime _VertretungsZeitraumBis;
|
|
|
|
private string _Notice;
|
|
|
|
|
|
public VertretungVM(VertretungDC pDC)
|
|
: base(pDC, true)
|
|
{
|
|
}
|
|
|
|
public DateTime VertretungsZeitraumVon
|
|
{
|
|
get { return this._VertretungsZeitraumVon; }
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._VertretungsZeitraumVon, value))
|
|
{
|
|
this._VertretungsZeitraumVon = value;
|
|
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.VertretungsZeitraumVon, value), PropertyName_VertretungsZeitraumVon);
|
|
this.FirePropertyChanged(PropertyName_VertretungsZeitraumVon);
|
|
}
|
|
}
|
|
}
|
|
|
|
public DateTime VertretungsZeitraumBis
|
|
{
|
|
get { return this._VertretungsZeitraumBis; }
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._VertretungsZeitraumBis, value))
|
|
{
|
|
this._VertretungsZeitraumBis = value;
|
|
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.VertretungsZeitraumBis, value), PropertyName_VertretungsZeitraumBis);
|
|
this.FirePropertyChanged(PropertyName_VertretungsZeitraumBis);
|
|
}
|
|
}
|
|
}
|
|
|
|
public string Notice
|
|
{
|
|
get { return _Notice; }
|
|
|
|
set
|
|
{
|
|
if (AreDifferent(_Notice, value))
|
|
{
|
|
_Notice = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.Notice, value), PropertyName_Notice);
|
|
FirePropertyChanged(PropertyName_Notice);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
protected override void InitByDataContract(VertretungDC pDataContract)
|
|
{
|
|
this._VertretungsZeitraumVon = pDataContract.VertretungsZeitraumVon;
|
|
this._VertretungsZeitraumBis = pDataContract.VertretungsZeitraumBis;
|
|
this._Notice = pDataContract.Notice;
|
|
|
|
}
|
|
|
|
protected override VertretungDC MapToDataContract(VertretungDC pDataContract, bool doCommit)
|
|
{
|
|
pDataContract.VertretungsZeitraumVon = _VertretungsZeitraumVon;
|
|
pDataContract.VertretungsZeitraumBis = _VertretungsZeitraumBis;
|
|
pDataContract.Notice = _Notice;
|
|
|
|
|
|
return pDataContract;
|
|
}
|
|
}
|
|
} |