129 lines
3.4 KiB
C#
129 lines
3.4 KiB
C#
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
using System;
|
|
|
|
namespace BeWo.ViewModel
|
|
{
|
|
public class ChatMessageVM : AbstractDCMapperVM<ChatMessageDC>
|
|
{
|
|
public static string PropertyName_ChatText = "ChatText";
|
|
|
|
public static string PropertyName_Uhrzeit = "Uhrzeit";
|
|
|
|
public static string PropertyName_IstZugestellt = "IstZugestellt";
|
|
|
|
private string _ChatText;
|
|
|
|
private DateTime _Uhrzeit;
|
|
|
|
private long? _SenderPersonOid;
|
|
|
|
private long? _EmpfängerPersonOid;
|
|
|
|
private int _istZugestellt;
|
|
|
|
|
|
public ChatMessageVM(ChatMessageDC pDC)
|
|
: base(pDC, true)
|
|
{
|
|
}
|
|
|
|
|
|
public virtual string ChatText
|
|
{
|
|
get { return this._ChatText; }
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._ChatText, value))
|
|
{
|
|
this._ChatText = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public DateTime Uhrzeit
|
|
{
|
|
get { return this._Uhrzeit; }
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._Uhrzeit, value))
|
|
{
|
|
this._Uhrzeit = value;
|
|
this.StoreDirtyInformation(this.AreDifferent(DataContract.Uhrzeit, value), PropertyName_Uhrzeit);
|
|
this.FirePropertyChanged(PropertyName_Uhrzeit);
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual long? SenderPersonOid
|
|
{
|
|
get
|
|
{
|
|
return this._SenderPersonOid;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._SenderPersonOid, value))
|
|
{
|
|
this._SenderPersonOid = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual long? EmpfängerPersonOid
|
|
{
|
|
get
|
|
{
|
|
return this._EmpfängerPersonOid;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._EmpfängerPersonOid, value))
|
|
{
|
|
this._EmpfängerPersonOid = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
public virtual int IstZugestellt
|
|
{
|
|
get
|
|
{
|
|
return _istZugestellt;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (AreDifferent(_istZugestellt, value))
|
|
{
|
|
_istZugestellt = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
protected override void InitByDataContract(ChatMessageDC pDataContract)
|
|
{
|
|
this._SenderPersonOid = pDataContract.SenderPersonOid;
|
|
this._EmpfängerPersonOid = pDataContract.EmpfängerPersonOid;
|
|
this._Uhrzeit = pDataContract.Uhrzeit;
|
|
this._ChatText = pDataContract.ChatText;
|
|
_istZugestellt = pDataContract.IstZugestellt;
|
|
}
|
|
|
|
protected override ChatMessageDC MapToDataContract(ChatMessageDC pDataContract, bool doCommit)
|
|
{
|
|
pDataContract.SenderPersonOid = _SenderPersonOid;
|
|
pDataContract.EmpfängerPersonOid = _EmpfängerPersonOid;
|
|
pDataContract.Uhrzeit = _Uhrzeit;
|
|
pDataContract.ChatText = _ChatText;
|
|
pDataContract.IstZugestellt = _istZugestellt;
|
|
|
|
return pDataContract;
|
|
}
|
|
}
|
|
} |