예제 #1
0
 public ContractBillKey(ContractBillBase entity)
 {
     this.Entity = entity;
     if (entity != null)
     {
         this.code = entity.Code;
     }
 }
예제 #2
0
 public virtual bool Equals(ContractBillBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
예제 #3
0
        public static bool Equals(ContractBillBase Object1, ContractBillBase Object2)
        {
            if ((Object1 == null) && (Object2 == null))
            {
                return(true);
            }
            if ((Object1 == null) ^ (Object2 == null))
            {
                return(false);
            }
            bool flag = true;

            if (Object1.Code != Object2.Code)
            {
                flag = false;
            }
            if ((Object1.ProjectCode != null) && (Object2.ProjectCode != null))
            {
                if (Object1.ProjectCode != Object2.ProjectCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.ProjectCode == null) ^ (Object2.ProjectCode == null))
            {
                flag = false;
            }
            if ((Object1.ContractCode != null) && (Object2.ContractCode != null))
            {
                if (Object1.ContractCode != Object2.ContractCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.ContractCode == null) ^ (Object2.ContractCode == null))
            {
                flag = false;
            }
            if ((Object1.BillNo != null) && (Object2.BillNo != null))
            {
                if (Object1.BillNo != Object2.BillNo)
                {
                    flag = false;
                }
            }
            else if ((Object1.BillNo == null) ^ (Object2.BillNo == null))
            {
                flag = false;
            }
            if (Object1.BillMoney.HasValue && Object2.BillMoney.HasValue)
            {
                if (Object1.BillMoney != Object2.BillMoney)
                {
                    flag = false;
                }
                return(flag);
            }
            if (!Object1.BillMoney.HasValue ^ !Object2.BillMoney.HasValue)
            {
                flag = false;
            }
            return(flag);
        }