|
|
|
|
@ -1875,24 +1875,4 @@ namespace Gremlin.GremlinData.DBClasses
|
|
|
|
|
return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ProductEqualityComparer : IEqualityComparer<Product>
|
|
|
|
|
{
|
|
|
|
|
public bool Equals(Product x, Product y)
|
|
|
|
|
{
|
|
|
|
|
return !((x != null || y != null)
|
|
|
|
|
&& !(x != null && y != null
|
|
|
|
|
&& x.ProductNumber == y.ProductNumber
|
|
|
|
|
&& x.OptionNumber == y.OptionNumber
|
|
|
|
|
&& x.BreakRangeFrom == y.BreakRangeFrom
|
|
|
|
|
&& x.BreakRangeTo == y.BreakRangeTo));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int GetHashCode(Product product)
|
|
|
|
|
{
|
|
|
|
|
StringBuilder sb = new();
|
|
|
|
|
_ = sb.Append(product.ProductNumber).Append(product.OptionNumber).Append(product.BreakRangeFrom).Append(product.BreakRangeTo);
|
|
|
|
|
return sb.ToString().GetHashCode();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|