示例#1
0
        public int CompareTo(ControlDebts other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var companyComparison = string.Compare(Company, other.Company, comparisonIgnoreCase);

            if (companyComparison != 0)
            {
                return(companyComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            var ttnComparison = Ttn.CompareTo(other.Ttn);

            if (ttnComparison != 0)
            {
                return(ttnComparison);
            }
            var costComparison = Cost.CompareTo(other.Cost);

            if (costComparison != 0)
            {
                return(costComparison);
            }
            var numberContractComparison = string.Compare(NumberContract, other.NumberContract, comparisonIgnoreCase);

            if (numberContractComparison != 0)
            {
                return(numberContractComparison);
            }
            var formPaymentComparison = string.Compare(FormPayment, other.FormPayment, comparisonIgnoreCase);

            if (formPaymentComparison != 0)
            {
                return(formPaymentComparison);
            }
            var shipmentDateComparison = ShipmentDate.CompareTo(other.ShipmentDate);

            if (shipmentDateComparison != 0)
            {
                return(shipmentDateComparison);
            }
            return(PaymentDate.CompareTo(other.PaymentDate));
        }
        public int CompareTo(AtTheExpenseOfWages other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var ttnComparison = Ttn.CompareTo(other.Ttn);

            if (ttnComparison != 0)
            {
                return(ttnComparison);
            }
            var shipmentDateComparison = ShipmentDate.CompareTo(other.ShipmentDate);

            if (shipmentDateComparison != 0)
            {
                return(shipmentDateComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            var countComparison = Count.CompareTo(other.Count);

            if (countComparison != 0)
            {
                return(countComparison);
            }
            return(Cost.CompareTo(other.Cost));
        }
        public int CompareTo(ForReportOnAccountingSuppliesMonth other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var typeGroupComparison = string.Compare(TypeGroup, other.TypeGroup, comparisonIgnoreCase);

            if (typeGroupComparison != 0)
            {
                return(typeGroupComparison);
            }
            var typeComparison = string.Compare(Type, other.Type, comparisonIgnoreCase);

            if (typeComparison != 0)
            {
                return(typeComparison);
            }
            var categoryComparison = string.Compare(Category, other.Category, comparisonIgnoreCase);

            if (categoryComparison != 0)
            {
                return(categoryComparison);
            }
            var territoryComparison = string.Compare(Territory, other.Territory, comparisonIgnoreCase);

            if (territoryComparison != 0)
            {
                return(territoryComparison);
            }
            var nameComparison = string.Compare(Name, other.Name, comparisonIgnoreCase);

            if (nameComparison != 0)
            {
                return(nameComparison);
            }
            var countComparison = Count.CompareTo(other.Count);

            if (countComparison != 0)
            {
                return(countComparison);
            }
            var costComparison = Cost.CompareTo(other.Cost);

            if (costComparison != 0)
            {
                return(costComparison);
            }
            var summNdsComparison = SummNds.CompareTo(other.SummNds);

            if (summNdsComparison != 0)
            {
                return(summNdsComparison);
            }
            var nameCompanyComparison = string.Compare(NameCompany, other.NameCompany, comparisonIgnoreCase);

            if (nameCompanyComparison != 0)
            {
                return(nameCompanyComparison);
            }
            var ttnComparison = Ttn.CompareTo(other.Ttn);

            if (ttnComparison != 0)
            {
                return(ttnComparison);
            }
            var shipmentDateComparison = ShipmentDate.CompareTo(other.ShipmentDate);

            if (shipmentDateComparison != 0)
            {
                return(shipmentDateComparison);
            }
            var contractNumberComparison = string.Compare(ContractNumber, other.ContractNumber, comparisonIgnoreCase);

            if (contractNumberComparison != 0)
            {
                return(contractNumberComparison);
            }
            var contractDateComparison = ContractDate.CompareTo(other.ContractDate);

            if (contractDateComparison != 0)
            {
                return(contractDateComparison);
            }
            var intentionBayComparison = string.Compare(IntentionBay, other.IntentionBay, comparisonIgnoreCase);

            if (intentionBayComparison != 0)
            {
                return(intentionBayComparison);
            }
            var paymentFormComparison = string.Compare(PaymentForm, other.PaymentForm, comparisonIgnoreCase);

            if (paymentFormComparison != 0)
            {
                return(paymentFormComparison);
            }
            return(string.Compare(WorkGuild, other.WorkGuild, comparisonIgnoreCase));
        }
示例#4
0
        public int CompareTo(ExpenditureOfProductsByTerritory other)
        {
            const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var cehComparison = Ceh.CompareTo((other.Ceh));

            if (cehComparison != 0)
            {
                return(cehComparison);
            }
            var territoryNameComparison = string.Compare(TerritoryName, other.TerritoryName, comparisonIgnoreCase);

            if (territoryNameComparison != 0)
            {
                return(-territoryNameComparison);
            }
            var numberTtnComparison = NumberTtn.CompareTo(other.NumberTtn);

            if (numberTtnComparison != 0)
            {
                return(-numberTtnComparison);
            }
            var numberAktComparison = NumberAkt.CompareTo(other.NumberAkt);

            if (numberAktComparison != 0)
            {
                return(-numberAktComparison);
            }
            var shipmentDateComparison = ShipmentDate.CompareTo(other.ShipmentDate);

            if (shipmentDateComparison != 0)
            {
                return(shipmentDateComparison);
            }
            var productNameComparison = string.Compare(ProductName, other.ProductName, comparisonIgnoreCase);

            if (productNameComparison != 0)
            {
                return(productNameComparison);
            }
            var companyNameComparison = string.Compare(CompanyName, other.CompanyName, comparisonIgnoreCase);

            if (companyNameComparison != 0)
            {
                return(companyNameComparison);
            }
            var productCountComparison = ProductCount.CompareTo(other.ProductCount);

            if (productCountComparison != 0)
            {
                return(productCountComparison);
            }
            var costWithoutNdsComparison = CostWithoutNds.CompareTo(other.CostWithoutNds);

            if (costWithoutNdsComparison != 0)
            {
                return(costWithoutNdsComparison);
            }
            var summaWithoutNdsComparison = SummaWithoutNds.CompareTo(other.SummaWithoutNds);

            if (summaWithoutNdsComparison != 0)
            {
                return(summaWithoutNdsComparison);
            }
            var summaNdsComparison = SummaNds.CompareTo(other.SummaNds);

            if (summaNdsComparison != 0)
            {
                return(summaNdsComparison);
            }
            var summaWithNdsComparison = SummaWithNds.CompareTo(other.SummaWithNds);

            if (summaWithNdsComparison != 0)
            {
                return(summaWithNdsComparison);
            }
            var summaWithoutNdsAndTaxesComparison = SummaWithoutNdsAndTaxes.CompareTo(other.SummaWithoutNdsAndTaxes);

            if (summaWithoutNdsAndTaxesComparison != 0)
            {
                return(summaWithoutNdsAndTaxesComparison);
            }
            var summaUsdComparison = SummaUsd.CompareTo(other.SummaUsd);

            if (summaUsdComparison != 0)
            {
                return(summaUsdComparison);
            }
            var usdRateComparison = UsdRate.CompareTo(other.UsdRate);

            if (usdRateComparison != 0)
            {
                return(usdRateComparison);
            }
            return(RusRate.CompareTo(other.RusRate));
        }