Mb not done
This commit is contained in:
parent
d934652b6c
commit
4a958769f0
@ -11,6 +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 double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ namespace ElectronicsShopContracts.SearchModels
|
|||||||
public class OrderSearchModel
|
public class OrderSearchModel
|
||||||
{
|
{
|
||||||
public int? ID { get; set; }
|
public int? ID { get; set; }
|
||||||
|
public int? UserID { get; set; }
|
||||||
public DateTime? DateFrom { get; set; }
|
public DateTime? DateFrom { get; set; }
|
||||||
public DateTime? DateTo { get; set;}
|
public DateTime? DateTo { get; set;}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@ namespace ElectronicsShopContracts.ViewModels
|
|||||||
public class OrderViewModel : IOrderModel
|
public class OrderViewModel : IOrderModel
|
||||||
{
|
{
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
|
[DisplayName("Клиент ID")]
|
||||||
|
public int UserID { get; set; }
|
||||||
|
|
||||||
[DisplayName("Сумма")]
|
[DisplayName("Сумма")]
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
|
@ -11,7 +11,7 @@ namespace ElectronicsShopDataBaseImplement
|
|||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
if (optionsBuilder.IsConfigured == false)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=ZooDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,8 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
public int UserID { get; set; }
|
||||||
|
[Required]
|
||||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
[Required]
|
[Required]
|
||||||
public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно;
|
public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно;
|
||||||
@ -51,6 +53,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
return new Order()
|
return new Order()
|
||||||
{
|
{
|
||||||
ID = model.ID,
|
ID = model.ID,
|
||||||
|
UserID=model.UserID,
|
||||||
Sum = model.Sum,
|
Sum = model.Sum,
|
||||||
Status = model.Status,
|
Status = model.Status,
|
||||||
PaymeantOption = model.PaymeantOption,
|
PaymeantOption = model.PaymeantOption,
|
||||||
@ -69,6 +72,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ID = model.ID;
|
ID = model.ID;
|
||||||
|
UserID = model.UserID;
|
||||||
Sum = model.Sum;
|
Sum = model.Sum;
|
||||||
PaymeantOption = model.PaymeantOption;
|
PaymeantOption = model.PaymeantOption;
|
||||||
Status = model.Status;
|
Status = model.Status;
|
||||||
@ -83,11 +87,12 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
public OrderViewModel GetViewModel => new()
|
public OrderViewModel GetViewModel => new()
|
||||||
{
|
{
|
||||||
ID = ID,
|
ID = ID,
|
||||||
|
UserID = UserID,
|
||||||
Sum = Sum,
|
Sum = Sum,
|
||||||
PaymeantOption = PaymeantOption,
|
PaymeantOption = PaymeantOption,
|
||||||
Status = Status,
|
Status = Status,
|
||||||
DateCreate = DateCreate,
|
DateCreate = DateCreate,
|
||||||
DateImplement=DateImplement,
|
DateImplement = DateImplement,
|
||||||
ProductList = ProductList
|
ProductList = ProductList
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ namespace ElectronicsShopDataModels.Models
|
|||||||
public interface IOrderModel : IID
|
public interface IOrderModel : IID
|
||||||
{
|
{
|
||||||
double Sum { get; }
|
double Sum { get; }
|
||||||
|
int UserID { get; }
|
||||||
OrderStatus Status { get; }
|
OrderStatus Status { get; }
|
||||||
PaymeantOption PaymeantOption { get; }
|
PaymeantOption PaymeantOption { get; }
|
||||||
DateTime DateCreate { get; }
|
DateTime DateCreate { get; }
|
||||||
|
@ -11,7 +11,6 @@ namespace ElectronicsShopDataModels
|
|||||||
//ID role
|
//ID role
|
||||||
int RoleID { get; }
|
int RoleID { get; }
|
||||||
|
|
||||||
|
|
||||||
string FirstName { get; }
|
string FirstName { get; }
|
||||||
string LastName { get; }
|
string LastName { get; }
|
||||||
string Password { get; }
|
string Password { get; }
|
||||||
|
Loading…
Reference in New Issue
Block a user