110 lines
3.2 KiB
C#
110 lines
3.2 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";
|
|
|
|
private DateTime _VertretungsZeitraumVon;
|
|
|
|
private DateTime _VertretungsZeitraumBis;
|
|
|
|
private long? _CustomerOid;
|
|
|
|
private long? _EmployeeOid;
|
|
|
|
|
|
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 virtual long? CustomerOid
|
|
{
|
|
get
|
|
{
|
|
return this._CustomerOid;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._CustomerOid, value))
|
|
{
|
|
this._CustomerOid = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual long? EmployeeOid
|
|
{
|
|
get
|
|
{
|
|
return this._EmployeeOid;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._EmployeeOid, value))
|
|
{
|
|
this._EmployeeOid = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
protected override void InitByDataContract(VertretungDC pDataContract)
|
|
{
|
|
this._VertretungsZeitraumVon = pDataContract.VertretungsZeitraumVon;
|
|
this._VertretungsZeitraumBis = pDataContract.VertretungsZeitraumBis;
|
|
|
|
this._CustomerOid = pDataContract.CustomerOid;
|
|
this._EmployeeOid = pDataContract.EmployeeOid;
|
|
}
|
|
|
|
protected override VertretungDC MapToDataContract(VertretungDC pDataContract, bool doCommit)
|
|
{
|
|
pDataContract.VertretungsZeitraumVon = _VertretungsZeitraumVon;
|
|
pDataContract.VertretungsZeitraumBis = _VertretungsZeitraumBis;
|
|
|
|
pDataContract.CustomerOid = _CustomerOid;
|
|
pDataContract.EmployeeOid = _EmployeeOid;
|
|
|
|
return pDataContract;
|
|
}
|
|
}
|
|
} |