public override int GetHashCode() { unchecked { var hashCode = (PotrName != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(PotrName) : 0); hashCode = (hashCode * 397) ^ (ProductName != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(ProductName) : 0); hashCode = (hashCode * 397) ^ ProductCount.GetHashCode(); hashCode = (hashCode * 397) ^ SummaUsd.GetHashCode(); hashCode = (hashCode * 397) ^ SummaRfRb.GetHashCode(); return(hashCode); } }
public int CompareTo(ShipmentForDiler other) { const StringComparison comparisonIgnoreCase = StringComparison.OrdinalIgnoreCase; if (ReferenceEquals(this, other)) { return(0); } if (ReferenceEquals(null, other)) { return(1); } var potrNameComparison = string.Compare(PotrName, other.PotrName, comparisonIgnoreCase); if (potrNameComparison != 0) { return(potrNameComparison); } var productNameComparison = string.Compare(ProductName, other.ProductName, comparisonIgnoreCase); if (productNameComparison != 0) { return(productNameComparison); } var productCountComparison = ProductCount.CompareTo(other.ProductCount); if (productCountComparison != 0) { return(productCountComparison); } var summaUsdComparison = SummaUsd.CompareTo(other.SummaUsd); if (summaUsdComparison != 0) { return(summaUsdComparison); } return(SummaRfRb.CompareTo(other.SummaRfRb)); }
public override int GetHashCode() { unchecked { var hashCode = (TerritoryName != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(TerritoryName) : 0); hashCode = (hashCode * 397) ^ Ceh.GetHashCode(); hashCode = (hashCode * 397) ^ NumberTtn.GetHashCode(); hashCode = (hashCode * 397) ^ NumberAkt.GetHashCode(); hashCode = (hashCode * 397) ^ ShipmentDate.GetHashCode(); hashCode = (hashCode * 397) ^ (ProductName != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(ProductName) : 0); hashCode = (hashCode * 397) ^ (CompanyName != null ? StringComparer.OrdinalIgnoreCase.GetHashCode(CompanyName) : 0); hashCode = (hashCode * 397) ^ ProductCount.GetHashCode(); hashCode = (hashCode * 397) ^ CostWithoutNds.GetHashCode(); hashCode = (hashCode * 397) ^ SummaWithoutNds.GetHashCode(); hashCode = (hashCode * 397) ^ SummaNds.GetHashCode(); hashCode = (hashCode * 397) ^ SummaWithNds.GetHashCode(); hashCode = (hashCode * 397) ^ SummaWithoutNdsAndTaxes.GetHashCode(); hashCode = (hashCode * 397) ^ SummaUsd.GetHashCode(); hashCode = (hashCode * 397) ^ UsdRate.GetHashCode(); hashCode = (hashCode * 397) ^ RusRate.GetHashCode(); return(hashCode); } }
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)); }