Exemplo n.º 1
0
 public ContractCostChangeKey(ContractCostChangeBase entity)
 {
     this.Entity = entity;
     if (entity != null)
     {
         this.contractCostChangeCode = entity.ContractCostChangeCode;
     }
 }
Exemplo n.º 2
0
 public virtual bool Equals(ContractCostChangeBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
Exemplo n.º 3
0
        public static bool Equals(ContractCostChangeBase Object1, ContractCostChangeBase Object2)
        {
            if ((Object1 == null) && (Object2 == null))
            {
                return(true);
            }
            if ((Object1 == null) ^ (Object2 == null))
            {
                return(false);
            }
            bool flag = true;

            if (Object1.ContractCostChangeCode != Object2.ContractCostChangeCode)
            {
                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.ContractCostCode != null) && (Object2.ContractCostCode != null))
            {
                if (Object1.ContractCostCode != Object2.ContractCostCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.ContractCostCode == null) ^ (Object2.ContractCostCode == null))
            {
                flag = false;
            }
            if ((Object1.ContractChangeCode != null) && (Object2.ContractChangeCode != null))
            {
                if (Object1.ContractChangeCode != Object2.ContractChangeCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.ContractChangeCode == null) ^ (Object2.ContractChangeCode == null))
            {
                flag = false;
            }
            if (Object1.Cash.HasValue && Object2.Cash.HasValue)
            {
                if (Object1.Cash != Object2.Cash)
                {
                    flag = false;
                }
            }
            else if (!Object1.Cash.HasValue ^ !Object2.Cash.HasValue)
            {
                flag = false;
            }
            if (Object1.ChangeCash.HasValue && Object2.ChangeCash.HasValue)
            {
                if (Object1.ChangeCash != Object2.ChangeCash)
                {
                    flag = false;
                }
            }
            else if (!Object1.ChangeCash.HasValue ^ !Object2.ChangeCash.HasValue)
            {
                flag = false;
            }
            if (Object1.NewCash.HasValue && Object2.NewCash.HasValue)
            {
                if (Object1.NewCash != Object2.NewCash)
                {
                    flag = false;
                }
            }
            else if (!Object1.NewCash.HasValue ^ !Object2.NewCash.HasValue)
            {
                flag = false;
            }
            if (Object1.OriginalCash.HasValue && Object2.OriginalCash.HasValue)
            {
                if (Object1.OriginalCash != Object2.OriginalCash)
                {
                    flag = false;
                }
            }
            else if (!Object1.OriginalCash.HasValue ^ !Object2.OriginalCash.HasValue)
            {
                flag = false;
            }
            if (Object1.TotalChangeCash.HasValue && Object2.TotalChangeCash.HasValue)
            {
                if (Object1.TotalChangeCash != Object2.TotalChangeCash)
                {
                    flag = false;
                }
            }
            else if (!Object1.TotalChangeCash.HasValue ^ !Object2.TotalChangeCash.HasValue)
            {
                flag = false;
            }
            if ((Object1.MoneyType != null) && (Object2.MoneyType != null))
            {
                if (Object1.MoneyType != Object2.MoneyType)
                {
                    flag = false;
                }
            }
            else if ((Object1.MoneyType == null) ^ (Object2.MoneyType == null))
            {
                flag = false;
            }
            if (Object1.ExchangeRate.HasValue && Object2.ExchangeRate.HasValue)
            {
                if (Object1.ExchangeRate != Object2.ExchangeRate)
                {
                    flag = false;
                }
            }
            else if (!Object1.ExchangeRate.HasValue ^ !Object2.ExchangeRate.HasValue)
            {
                flag = false;
            }
            if (Object1.Money.HasValue && Object2.Money.HasValue)
            {
                if (Object1.Money != Object2.Money)
                {
                    flag = false;
                }
            }
            else if (!Object1.Money.HasValue ^ !Object2.Money.HasValue)
            {
                flag = false;
            }
            if (Object1.ChangeMoney.HasValue && Object2.ChangeMoney.HasValue)
            {
                if (Object1.ChangeMoney != Object2.ChangeMoney)
                {
                    flag = false;
                }
            }
            else if (!Object1.ChangeMoney.HasValue ^ !Object2.ChangeMoney.HasValue)
            {
                flag = false;
            }
            if (Object1.NewMoney.HasValue && Object2.NewMoney.HasValue)
            {
                if (Object1.NewMoney != Object2.NewMoney)
                {
                    flag = false;
                }
            }
            else if (!Object1.NewMoney.HasValue ^ !Object2.NewMoney.HasValue)
            {
                flag = false;
            }
            if (Object1.OriginalMoney.HasValue && Object2.OriginalMoney.HasValue)
            {
                if (Object1.OriginalMoney != Object2.OriginalMoney)
                {
                    flag = false;
                }
            }
            else if (!Object1.OriginalMoney.HasValue ^ !Object2.OriginalMoney.HasValue)
            {
                flag = false;
            }
            if (Object1.TotalChangeMoney.HasValue && Object2.TotalChangeMoney.HasValue)
            {
                if (Object1.TotalChangeMoney != Object2.TotalChangeMoney)
                {
                    flag = false;
                }
            }
            else if (!Object1.TotalChangeMoney.HasValue ^ !Object2.TotalChangeMoney.HasValue)
            {
                flag = false;
            }
            if ((Object1.CostCode != null) && (Object2.CostCode != null))
            {
                if (Object1.CostCode != Object2.CostCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.CostCode == null) ^ (Object2.CostCode == null))
            {
                flag = false;
            }
            if ((Object1.CostBudgetSetCode != null) && (Object2.CostBudgetSetCode != null))
            {
                if (Object1.CostBudgetSetCode != Object2.CostBudgetSetCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.CostBudgetSetCode == null) ^ (Object2.CostBudgetSetCode == null))
            {
                flag = false;
            }
            if ((Object1.Description != null) && (Object2.Description != null))
            {
                if (Object1.Description != Object2.Description)
                {
                    flag = false;
                }
            }
            else if ((Object1.Description == null) ^ (Object2.Description == null))
            {
                flag = false;
            }
            if (Object1.Status.HasValue && Object2.Status.HasValue)
            {
                if (Object1.Status != Object2.Status)
                {
                    flag = false;
                }
                return(flag);
            }
            if (!Object1.Status.HasValue ^ !Object2.Status.HasValue)
            {
                flag = false;
            }
            return(flag);
        }