コード例 #1
0
 public virtual bool Equals(ContractMaterialPlanBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
コード例 #2
0
 public ContractMaterialPlanKey(ContractMaterialPlanBase entity)
 {
     this.Entity = entity;
     if (entity != null)
     {
         this.contractMaterialPlanCode = entity.ContractMaterialPlanCode;
     }
 }
コード例 #3
0
        public static bool Equals(ContractMaterialPlanBase Object1, ContractMaterialPlanBase Object2)
        {
            if ((Object1 == null) && (Object2 == null))
            {
                return(true);
            }
            if ((Object1 == null) ^ (Object2 == null))
            {
                return(false);
            }
            bool flag = true;

            if (Object1.ContractMaterialPlanCode != Object2.ContractMaterialPlanCode)
            {
                flag = false;
            }
            if ((Object1.ContractMaterialCode != null) && (Object2.ContractMaterialCode != null))
            {
                if (Object1.ContractMaterialCode != Object2.ContractMaterialCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.ContractMaterialCode == null) ^ (Object2.ContractMaterialCode == 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.PlanDate.HasValue && Object2.PlanDate.HasValue)
            {
                if (Object1.PlanDate != Object2.PlanDate)
                {
                    flag = false;
                }
            }
            else if (!Object1.PlanDate.HasValue ^ !Object2.PlanDate.HasValue)
            {
                flag = false;
            }
            if (Object1.PlanQty.HasValue && Object2.PlanQty.HasValue)
            {
                if (Object1.PlanQty != Object2.PlanQty)
                {
                    flag = false;
                }
                return(flag);
            }
            if (!Object1.PlanQty.HasValue ^ !Object2.PlanQty.HasValue)
            {
                flag = false;
            }
            return(flag);
        }