198 lines
5.0 KiB
C#
198 lines
5.0 KiB
C#
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.ViewModel
|
|
{
|
|
public class BudgetVM : AbstractDCMapperVM<BudgetDC>
|
|
{
|
|
private long? _BudgetOid;
|
|
private ActivationTypeId _BudgetIsActive;
|
|
private string _BudgetNotice;
|
|
private DateTime? _BudgetInsTs;
|
|
private string _BudgetInsUser;
|
|
private long? _BudgetVersion;
|
|
private string _BudgetUdpUser;
|
|
private SystemEntryID? _BudgetSystemEntryID;
|
|
private string _Name;
|
|
private decimal? _Betragshoehe;
|
|
|
|
public BudgetVM(BudgetDC budgetDC) : base(budgetDC, budgetDC.BudgetOid == null)
|
|
{ }
|
|
|
|
public long? BudgetOid
|
|
{
|
|
get { return _BudgetOid; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetOid, value))
|
|
{
|
|
_BudgetOid = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetOid, value), nameof(_BudgetOid));
|
|
FirePropertyChanged(nameof(_BudgetOid));
|
|
}
|
|
}
|
|
}
|
|
|
|
public ActivationTypeId BudgetIsActive
|
|
{
|
|
get { return _BudgetIsActive; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetIsActive, value))
|
|
{
|
|
_BudgetIsActive = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetIsActive, value), nameof(_BudgetIsActive));
|
|
FirePropertyChanged(nameof(_BudgetIsActive));
|
|
}
|
|
}
|
|
}
|
|
|
|
public string BudgetNotice
|
|
{
|
|
get { return _BudgetNotice; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetNotice, value))
|
|
{
|
|
_BudgetNotice = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetNotice, value), nameof(_BudgetNotice));
|
|
FirePropertyChanged(nameof(_BudgetNotice));
|
|
}
|
|
}
|
|
}
|
|
|
|
public DateTime? BudgetInsTs
|
|
{
|
|
get { return _BudgetInsTs; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetInsTs, value))
|
|
{
|
|
_BudgetInsTs = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetInsTs, value), nameof(_BudgetInsTs));
|
|
FirePropertyChanged(nameof(_BudgetInsTs));
|
|
}
|
|
}
|
|
}
|
|
|
|
public string BudgetInsUser
|
|
{
|
|
get { return _BudgetInsUser; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetInsUser, value))
|
|
{
|
|
_BudgetInsUser = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetInsUser, value), nameof(_BudgetInsUser));
|
|
FirePropertyChanged(nameof(_BudgetInsUser));
|
|
}
|
|
}
|
|
}
|
|
|
|
public long? BudgetVersion
|
|
{
|
|
get { return _BudgetVersion; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetVersion, value))
|
|
{
|
|
_BudgetVersion = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetVersion, value), nameof(_BudgetVersion));
|
|
FirePropertyChanged(nameof(_BudgetVersion));
|
|
}
|
|
}
|
|
}
|
|
|
|
public string BudgetUdpUser
|
|
{
|
|
get { return _BudgetUdpUser; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetUdpUser, value))
|
|
{
|
|
_BudgetUdpUser = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetUdpUser, value), nameof(_BudgetUdpUser));
|
|
FirePropertyChanged(nameof(_BudgetUdpUser));
|
|
}
|
|
}
|
|
}
|
|
|
|
public SystemEntryID? BudgetSystemEntryID
|
|
{
|
|
get { return _BudgetSystemEntryID; }
|
|
set
|
|
{
|
|
if (AreDifferent(_BudgetSystemEntryID, value))
|
|
{
|
|
_BudgetSystemEntryID = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.BudgetSystemEntryID, value), nameof(_BudgetSystemEntryID));
|
|
FirePropertyChanged(nameof(_BudgetSystemEntryID));
|
|
}
|
|
}
|
|
}
|
|
|
|
public string Name
|
|
{
|
|
get { return _Name; }
|
|
set
|
|
{
|
|
if (AreDifferent(_Name, value))
|
|
{
|
|
_Name = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.Name, value), nameof(_Name));
|
|
FirePropertyChanged(nameof(_Name));
|
|
}
|
|
}
|
|
}
|
|
|
|
public decimal? Betragshoehe
|
|
{
|
|
get { return _Betragshoehe; }
|
|
set
|
|
{
|
|
if (AreDifferent(_Betragshoehe, value))
|
|
{
|
|
_Betragshoehe = value;
|
|
StoreDirtyInformation(AreDifferent(DataContract.Betragshoehe, value), nameof(_Betragshoehe));
|
|
FirePropertyChanged(nameof(_Betragshoehe));
|
|
}
|
|
}
|
|
}
|
|
|
|
protected override void InitByDataContract(BudgetDC bDataContract)
|
|
{
|
|
_BudgetOid = bDataContract.BudgetOid;
|
|
_BudgetIsActive = bDataContract.BudgetIsActive;
|
|
_BudgetNotice = bDataContract.BudgetNotice;
|
|
_BudgetInsTs = bDataContract.BudgetInsTs;
|
|
_BudgetInsUser = bDataContract.BudgetInsUser;
|
|
_BudgetVersion = bDataContract.BudgetVersion;
|
|
_BudgetUdpUser = bDataContract.BudgetUdpUser;
|
|
_BudgetSystemEntryID = bDataContract.BudgetSystemEntryID;
|
|
Name = bDataContract.Name;
|
|
Betragshoehe = bDataContract.Betragshoehe;
|
|
}
|
|
|
|
protected override BudgetDC MapToDataContract(BudgetDC bDataContract, bool doCommit)
|
|
{
|
|
bDataContract.BudgetOid = _BudgetOid;
|
|
bDataContract.BudgetIsActive = _BudgetIsActive;
|
|
bDataContract.BudgetNotice = _BudgetNotice;
|
|
bDataContract.BudgetInsTs = _BudgetInsTs;
|
|
bDataContract.BudgetInsUser = _BudgetInsUser;
|
|
bDataContract.BudgetVersion = _BudgetVersion;
|
|
bDataContract.BudgetUdpUser = _BudgetUdpUser;
|
|
bDataContract.BudgetSystemEntryID = _BudgetSystemEntryID;
|
|
bDataContract.Name = _Name;
|
|
bDataContract.Betragshoehe = _Betragshoehe;
|
|
|
|
return bDataContract;
|
|
}
|
|
}
|
|
}
|