Правки

This commit is contained in:
gg12 darfren 2024-04-15 15:31:58 +04:00
parent 94dacd99f1
commit d2241ea027
6 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ namespace IceCreamShopContracts.BindingModels
{
public int Id { get; set; }
public int IceCreamId { get; set; }
public int ImplementerId { get; set; }
public int? ImplementerId { get; set; } = null;
public int ClientId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }

View File

@ -16,7 +16,7 @@ namespace IceCreamShopContracts.ViewModels
public int Id { get; set; }
public int IceCreamId { get; set; }
public int ClientId { get; set; }
public int ImplementerId { get; set; }
public int? ImplementerId { get; set; } = null;
[DisplayName("Клиент")]
public string ClientFIO { get; set; } = string.Empty;
[DisplayName("Мороженное")]

View File

@ -11,7 +11,7 @@ namespace IceCreamShopDataModels.Models
{
int IceCreamId { get; }
int ClientId { get; }
int ImplementerId { get; }
int? ImplementerId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }

View File

@ -30,8 +30,8 @@ namespace IceCreamShopDatabaseImplement.Models
public int ClientId { get; private set; }
public virtual Client Client { get; private set; }
[Required]
public int ImplementerId { get; private set; }
public virtual Implementer Implementer { get; private set; }
public int? ImplementerId { get; private set; } = null;
public virtual Implementer? Implementer { get; private set; }
public static Order? Create(IceCreamShopDataBase context, OrderBindingModel model)
{
if (model == null)
@ -78,7 +78,7 @@ namespace IceCreamShopDatabaseImplement.Models
IceCreamName = IceCream.IceCreamName,
Id = Id,
ClientFIO = Client.ClientFIO,
ImplementerFIO = Implementer.ImplementerFIO
ImplementerFIO = (Implementer != null ? Implementer.ImplementerFIO : string.Empty)
};
}

View File

@ -15,7 +15,7 @@ namespace IceCreamShopFileImplement.Models
{
public int Id { get; private set; }
public int IceCreamId { get; private set; }
public int ImplementerId { get; private set; }
public int? ImplementerId { get; private set; } = null;
public int ClientId { get; private set; }
public int Count { get; private set; }
public double Sum { get; private set; }

View File

@ -18,7 +18,7 @@ namespace IceCreamShopListImplement.Models
public int Id { get; private set; }
public int IceCreamId { get; private set; }
public int ClientId { get; private set; }
public int ImplementerId { get; private set; }
public int? ImplementerId { get; private set; }
public int Count { get; private set; }
public double Sum { get; private set; }
public OrderStatus Status { get; private set; }