From f773128233026f15f813d71bf714854b2e349437 Mon Sep 17 00:00:00 2001 From: Danila_Mochalov Date: Sun, 12 Feb 2023 16:37:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=85=D1=80=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8=D1=89?= =?UTF-8?q?=D0=B0=20=D0=B8=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=B0=D0=B3=D0=B0=D0=B7=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogicContracts/IShopLogic.cs | 14 +++++++++++-- .../StorageContracts/IShopStorage.cs | 21 +++++++++++++++++++ .../ViewModels/ShopViewModel.cs | 2 +- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs diff --git a/LawFirm/LawFirmContracts/BusinessLogicContracts/IShopLogic.cs b/LawFirm/LawFirmContracts/BusinessLogicContracts/IShopLogic.cs index cac08f7..257f5dc 100644 --- a/LawFirm/LawFirmContracts/BusinessLogicContracts/IShopLogic.cs +++ b/LawFirm/LawFirmContracts/BusinessLogicContracts/IShopLogic.cs @@ -1,4 +1,8 @@ -using System; +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; +using LawFirmDataModels.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,7 +10,13 @@ using System.Threading.Tasks; namespace LawFirmContracts.BusinessLogicContracts { - internal interface IShopLogic + public interface IShopLogic { + ShopViewModel? ReadElement(ShopSearchModel model); + List ReadList(ShopSearchModel? model); + bool Create(ShopBindingModel model); + bool Update(ShopBindingModel model); + bool Delete(ShopBindingModel model); + bool SupplyDocuments(ShopSearchModel model, IDocumentModel document, int count); } } diff --git a/LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs b/LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs new file mode 100644 index 0000000..f84055a --- /dev/null +++ b/LawFirm/LawFirmContracts/StorageContracts/IShopStorage.cs @@ -0,0 +1,21 @@ +using LawFirmContracts.BindingModels; +using LawFirmContracts.SearchModels; +using LawFirmContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LawFirmContracts.StorageContracts +{ + public interface IShopStorage + { + ShopViewModel? GetElement(ShopSearchModel model); + List GetFullList(); + List GetFilteredList(ShopSearchModel model); + ShopViewModel? Insert(ShopBindingModel model); + ShopViewModel? Update(ShopBindingModel model); + ShopViewModel? Delete(ShopBindingModel model); + } +} diff --git a/LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs index 7c8b52c..8912255 100644 --- a/LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs +++ b/LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace LawFirmContracts.ViewModels { - internal class ShopViewModel : IShopModel + public class ShopViewModel : IShopModel { [DisplayName("Название магазина")] public string Name { get; set; } = string.Empty;