в слой контрактов добавлены классы клиенты и изменены классы заказов
This commit is contained in:
parent
3f2810f136
commit
abe669a7c9
@ -12,6 +12,8 @@ namespace SushiBarContracts.BindingModel
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int SushiId { get; set; }
|
public int SushiId { get; set; }
|
||||||
|
public int ClientId { get; set; }
|
||||||
|
public string ClientFIO { get; set; } = string.Empty;
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
public double Sum { get; set; }
|
public double Sum { get; set; }
|
||||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
|
20
SushiBarContracts/BusinessLogicsContracts/IClientLogic.cs
Normal file
20
SushiBarContracts/BusinessLogicsContracts/IClientLogic.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using SushiBarContracts.BindingModel;
|
||||||
|
using SushiBarContracts.SearchModel;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IClientLogic
|
||||||
|
{
|
||||||
|
List<ClientViewModel> ReadList(ClientSearchModel? model);
|
||||||
|
ClientViewModel? ReadElement(ClientSearchModel model);
|
||||||
|
bool Create(ClientBindingModel model);
|
||||||
|
bool Update(ClientBindingModel model);
|
||||||
|
bool Delete(ClientBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
15
SushiBarContracts/SearchModel/ClientSearchModel.cs
Normal file
15
SushiBarContracts/SearchModel/ClientSearchModel.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModel
|
||||||
|
{
|
||||||
|
public class ClientSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Email { get; set; }
|
||||||
|
public string? Password { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@ namespace SushiBarContracts.SearchModel
|
|||||||
public class OrderSearchModel
|
public class OrderSearchModel
|
||||||
{
|
{
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
|
public int? ClientId { get; set; }
|
||||||
public DateTime? DateFrom { get; set; }
|
public DateTime? DateFrom { get; set; }
|
||||||
public DateTime? DateTo { get; set; }
|
public DateTime? DateTo { get; set; }
|
||||||
|
|
||||||
|
21
SushiBarContracts/StoragesContracts/IClientStorage.cs
Normal file
21
SushiBarContracts/StoragesContracts/IClientStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.BindingModel;
|
||||||
|
using SushiBarContracts.SearchModel;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IClientStorage
|
||||||
|
{
|
||||||
|
List<ClientViewModel> GetFullList();
|
||||||
|
List<ClientViewModel> GetFilteredList(ClientSearchModel model);
|
||||||
|
ClientViewModel? GetElement(ClientSearchModel model);
|
||||||
|
ClientViewModel? Insert(ClientBindingModel model);
|
||||||
|
ClientViewModel? Update(ClientBindingModel model);
|
||||||
|
ClientViewModel? Delete(ClientBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
26
SushiBarContracts/ViewModels/ClientViewModel.cs
Normal file
26
SushiBarContracts/ViewModels/ClientViewModel.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using SushiBarDataModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ClientViewModel : IClientModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("ФИО Клиента")]
|
||||||
|
public string ClientFIO { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Логин (эл. почтаы)")]
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Пароль")]
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -10,9 +10,13 @@ namespace SushiBarContracts.ViewModels
|
|||||||
[DisplayName("Номер")]
|
[DisplayName("Номер")]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int SushiId { get; set; }
|
public int SushiId { get; set; }
|
||||||
|
public int ClientId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[DisplayName("Изделие")]
|
[DisplayName("Имя клиента")]
|
||||||
|
public string ClientFIO { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Суши")]
|
||||||
public string SushiName { get; set; } = string.Empty;
|
public string SushiName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user