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;