Existing code

This commit is contained in:
Stoyan Zlatev
2023-04-04 11:12:07 +02:00
parent 994af6e7af
commit fdfb42da9e
55 changed files with 2239 additions and 39 deletions
@@ -0,0 +1,32 @@
namespace LaaProductionWeb.Services.Models
{
using System.Collections.Generic;
public class OrderInfoModel
{
public int OrderNr { get; set; }
public int ProductionOrderNr { get; set; }
public string ClientName { get; set; }
public string Nr
=> this.OrderNr > 0
? $"{this.OrderNr}"
: this.ProductionOrderNr > 0
? $"{this.ProductionOrderNr}"
: default(string);
public static readonly OrderInfoComparer Comparer
= new OrderInfoComparer();
public class OrderInfoComparer : IEqualityComparer<OrderInfoModel>
{
public bool Equals(OrderInfoModel x, OrderInfoModel y)
=> x?.OrderNr == y?.OrderNr;
public int GetHashCode(OrderInfoModel obj)
=> obj?.OrderNr ?? default(int);
}
}
}