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