2011-01-30 07:14:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.Entities
|
|
|
|
|
{
|
|
|
|
|
public class SettleOption
|
|
|
|
|
{
|
2011-01-31 20:33:22 +00:00
|
|
|
|
public virtual int SettleOptionID { get; set; }
|
|
|
|
|
public virtual string Name { get; set; }
|
2011-01-30 07:14:05 +00:00
|
|
|
|
|
|
|
|
|
public override bool Equals(System.Object obj)
|
|
|
|
|
{
|
|
|
|
|
if (obj is SettleOption)
|
|
|
|
|
return (this == (SettleOption)obj);
|
|
|
|
|
else
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
return SettleOptionID.GetHashCode() ^ Name.GetHashCode();
|
|
|
|
|
}
|
|
|
|
|
public static bool operator ==(SettleOption a, SettleOption b)
|
|
|
|
|
{
|
|
|
|
|
if (object.ReferenceEquals(null, a))
|
|
|
|
|
return object.ReferenceEquals(null, b);
|
|
|
|
|
|
|
|
|
|
if (!(a is SettleOption))
|
|
|
|
|
return false;
|
|
|
|
|
if (!(b is SettleOption))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
return (a.SettleOptionID == b.SettleOptionID)
|
|
|
|
|
&& (a.Name == b.Name);
|
|
|
|
|
}
|
|
|
|
|
public static bool operator !=(SettleOption a, SettleOption b)
|
|
|
|
|
{
|
|
|
|
|
return !(a == b);
|
|
|
|
|
}
|
|
|
|
|
//public enum SettleOption
|
|
|
|
|
//{
|
|
|
|
|
// Unsettled = 0,
|
|
|
|
|
// Cash = 1,
|
|
|
|
|
// CreditCard = 2,
|
|
|
|
|
// NoCharge = 3,
|
|
|
|
|
// BillToCompany = 4,
|
|
|
|
|
// Staff = 5
|
|
|
|
|
//}
|
|
|
|
|
//public class SettleOption
|
|
|
|
|
//{
|
|
|
|
|
// public static readonly SettleOption Unsettled = new SettleOption(0);
|
|
|
|
|
// public static readonly SettleOption Cash = new SettleOption(1);
|
|
|
|
|
// public static readonly SettleOption CreditCard = new SettleOption(2);
|
|
|
|
|
// public static readonly SettleOption NoCharge = new SettleOption(3);
|
|
|
|
|
// public static readonly SettleOption BillToCompany = new SettleOption(4);
|
|
|
|
|
// public static readonly SettleOption Staff = new SettleOption(5);
|
|
|
|
|
|
|
|
|
|
// public int SettleOptionID { get; private set; }
|
|
|
|
|
|
|
|
|
|
// private SettleOption(int settleOption)
|
|
|
|
|
// {
|
|
|
|
|
// this.SettleOptionID = settleOption;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
}
|