fix
This commit is contained in:
parent
8ef811e533
commit
be5db49184
@ -11,7 +11,7 @@ namespace ElectronicsShopContracts.BindingModels
|
|||||||
public class OrderBindingModel : IOrderModel
|
public class OrderBindingModel : IOrderModel
|
||||||
{
|
{
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
public int UserID { get; set; }
|
public int ClientID { get; set; }
|
||||||
public int? ImplementerID { get; set; }
|
public int? ImplementerID { get; set; }
|
||||||
public int PaymentID { get; set; }
|
public int PaymentID { get; set; }
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
@ -12,11 +12,11 @@ namespace ElectronicsShopContracts.SearchModels
|
|||||||
{
|
{
|
||||||
public int? ID { get; set; }
|
public int? ID { get; set; }
|
||||||
//public int? OplataID { get; set; }
|
//public int? OplataID { get; set; }
|
||||||
public int? UserID { get; set; }
|
public int? ClientID { get; set; }
|
||||||
public OrderStatus OrderStatus { get; set; }
|
public OrderStatus OrderStatus { get; set; }
|
||||||
public PaymeantOption PaymeantOption { get; set; }
|
public PaymeantOption PaymeantOption { get; set; }
|
||||||
public DateTime? DateFrom { get; set; }
|
public DateTime? DateFrom { get; set; }
|
||||||
public DateTime? DateTo { get; set;}
|
public DateTime? DateTo { get; set;}
|
||||||
public Dictionary<int, (IProductModel, int)>? ProductList { get; set; }
|
public Dictionary<int, (IProductModel, int)> ProductList { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,9 @@ namespace ElectronicsShopContracts.ViewModels
|
|||||||
{
|
{
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
[DisplayName("Клиент ID")]
|
[DisplayName("Клиент ID")]
|
||||||
public int UserID { get; set; }
|
public int ClientID { get; set; }
|
||||||
[DisplayName("Исполнитель ID")]
|
[DisplayName("Исполнитель ID")]
|
||||||
public int ImplementerID { get; set; }
|
public int? ImplementerID { get; set; }
|
||||||
[DisplayName("Оплата ID")]
|
[DisplayName("Оплата ID")]
|
||||||
public int PaymentID { get; set; }
|
public int PaymentID { get; set; }
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ namespace ElectronicsShopContracts.ViewModels
|
|||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
|
||||||
[DisplayName("Статус")]
|
[DisplayName("Статус")]
|
||||||
public OrderStatus OrderStatus { get; set; } = OrderStatus.Неизвестен;
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
|
|
||||||
[DisplayName("Стутус оплаты")]
|
[DisplayName("Стутус оплаты")]
|
||||||
public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно;
|
public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно;
|
||||||
@ -35,6 +35,5 @@ namespace ElectronicsShopContracts.ViewModels
|
|||||||
public DateTime? DateImplement { get; set; }
|
public DateTime? DateImplement { get; set; }
|
||||||
[DisplayName("Корзина")]
|
[DisplayName("Корзина")]
|
||||||
public Dictionary<int, (IProductModel, int)> ProductList { get; set; } = new();
|
public Dictionary<int, (IProductModel, int)> ProductList { get; set; } = new();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,8 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
[ForeignKey("UserID")]
|
[ForeignKey("ClientID")]
|
||||||
public int UserID { get; set; }
|
public int ClientID { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
[Required]
|
[Required]
|
||||||
@ -53,7 +53,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
return new Order()
|
return new Order()
|
||||||
{
|
{
|
||||||
ID = model.ID,
|
ID = model.ID,
|
||||||
UserID=model.UserID,
|
ClientID=model.ClientID,
|
||||||
Sum = model.Sum,
|
Sum = model.Sum,
|
||||||
Status = model.Status,
|
Status = model.Status,
|
||||||
PaymeantOption = model.PaymeantOption,
|
PaymeantOption = model.PaymeantOption,
|
||||||
@ -72,7 +72,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ID = model.ID;
|
ID = model.ID;
|
||||||
UserID = model.UserID;
|
ClientID = model.ClientID;
|
||||||
Sum = model.Sum;
|
Sum = model.Sum;
|
||||||
PaymeantOption = model.PaymeantOption;
|
PaymeantOption = model.PaymeantOption;
|
||||||
Status = model.Status;
|
Status = model.Status;
|
||||||
@ -87,7 +87,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
public OrderViewModel GetViewModel => new()
|
public OrderViewModel GetViewModel => new()
|
||||||
{
|
{
|
||||||
ID = ID,
|
ID = ID,
|
||||||
UserID = UserID,
|
ClientID = ClientID,
|
||||||
Sum = Sum,
|
Sum = Sum,
|
||||||
PaymeantOption = PaymeantOption,
|
PaymeantOption = PaymeantOption,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
|
@ -9,7 +9,7 @@ namespace ElectronicsShopDataModels.Models
|
|||||||
{
|
{
|
||||||
public interface IOrderModel : IID
|
public interface IOrderModel : IID
|
||||||
{
|
{
|
||||||
int UserID { get; }
|
int ClientID { get; }
|
||||||
int? ImplementerID { get; }
|
int? ImplementerID { get; }
|
||||||
int PaymentID { get; }
|
int PaymentID { get; }
|
||||||
OrderStatus Status { get; }
|
OrderStatus Status { get; }
|
||||||
|
Loading…
Reference in New Issue
Block a user