29 lines
1000 B
C#
29 lines
1000 B
C#
namespace BS.Shared.DataContracts
|
|
{
|
|
public partial class AccountingTransactionDC
|
|
{
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj is AccountingTransactionDC)
|
|
{
|
|
var y = (AccountingTransactionDC)obj;
|
|
if (this.AccountingTransactionOid == null && y.AccountingTransactionOid == null)
|
|
{
|
|
return this.GetHashCode() == y.GetHashCode();
|
|
}
|
|
|
|
if (this.AccountingTransactionOid != null && y.AccountingTransactionOid != null)
|
|
{
|
|
return this.AccountingTransactionOid == y.AccountingTransactionOid;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return this.AccountingTransactionOid.HasValue ? this.GetType().Name.GetHashCode() ^ this.AccountingTransactionOid.GetHashCode() : base.GetHashCode();
|
|
}
|
|
}
|
|
} |