narsil/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs

42 lines
1023 B
C#
Raw Normal View History

2010-03-02 17:56:21 +00:00
using System;
using System.Runtime.Serialization;
namespace Tanshu.Accounts.Contracts
{
[DataContract]
public class JournalBO
{
[DataMember]
public Guid JournalID { get; set; }
[DataMember]
public Guid VoucherID { get; set; }
[DataMember]
public Guid LedgerID { get; set; }
[DataMember]
public Guid CostCenterID { get; set; }
[DataMember]
public decimal Amount { get; set; }
private int debit;
[DataMember]
public int Debit
{
get { return debit; }
set
{
if ((value == 1) || (value == -1))
debit = value;
else
throw new ArgumentException("Debit can only be -1 or 1");
}
}
[DataMember]
public decimal SignedAmount
{
get { return Amount * Debit; }
}
[DataMember]
public byte[] timestamp { get; set; }
}
}