Esempio n. 1
0
 public ContractCostKey(ContractCostBase entity)
 {
     this.Entity = entity;
     if (entity != null)
     {
         this.contractCostCode = entity.ContractCostCode;
     }
 }
Esempio n. 2
0
 public virtual bool Equals(ContractCostBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
Esempio n. 3
0
        public static bool Equals(ContractCostBase Object1, ContractCostBase Object2)
        {
            if ((Object1 == null) && (Object2 == null))
            {
                return(true);
            }
            if ((Object1 == null) ^ (Object2 == null))
            {
                return(false);
            }
            bool flag = true;

            if (Object1.ContractCostCode != Object2.ContractCostCode)
            {
                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.CostCode != null) && (Object2.CostCode != null))
            {
                if (Object1.CostCode != Object2.CostCode)
                {
                    flag = false;
                }
            }
            else if ((Object1.CostCode == null) ^ (Object2.CostCode == null))
            {
                flag = false;
            }
            if (Object1.Amount.HasValue && Object2.Amount.HasValue)
            {
                if (Object1.Amount != Object2.Amount)
                {
                    flag = false;
                }
            }
            else if (!Object1.Amount.HasValue ^ !Object2.Amount.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.UnitPrise.HasValue && Object2.UnitPrise.HasValue)
            {
                if (Object1.UnitPrise != Object2.UnitPrise)
                {
                    flag = false;
                }
            }
            else if (!Object1.UnitPrise.HasValue ^ !Object2.UnitPrise.HasValue)
            {
                flag = false;
            }
            if (Object1.Moneycash.HasValue && Object2.Moneycash.HasValue)
            {
                if (Object1.Moneycash != Object2.Moneycash)
                {
                    flag = false;
                }
            }
            else if (!Object1.Moneycash.HasValue ^ !Object2.Moneycash.HasValue)
            {
                flag = false;
            }
            if (Object1.OriginalMoneycash.HasValue && Object2.OriginalMoneycash.HasValue)
            {
                if (Object1.OriginalMoneycash != Object2.OriginalMoneycash)
                {
                    flag = false;
                }
            }
            else if (!Object1.OriginalMoneycash.HasValue ^ !Object2.OriginalMoneycash.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.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.OriginalMoney.HasValue && Object2.OriginalMoney.HasValue)
            {
                if (Object1.OriginalMoney != Object2.OriginalMoney)
                {
                    flag = false;
                }
                return(flag);
            }
            if (!Object1.OriginalMoney.HasValue ^ !Object2.OriginalMoney.HasValue)
            {
                flag = false;
            }
            return(flag);
        }