From 6396dcaf90d7b48f1532b2a9536f7b5f6176c9f8 Mon Sep 17 00:00:00 2001 From: ArtemEmelyanov Date: Wed, 3 May 2023 19:40:14 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B8?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D1=8B=20?= =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FishFactoryContracts/BindingModels/ShopBindingModel.cs | 1 + .../FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs | 2 ++ .../FishFactoryContracts/StoragesContracts/IShopStorage.cs | 2 ++ FishFactory/FishFactoryContracts/ViewModels/ShopViewModel.cs | 3 +++ FishFactory/FishFactoryDataModels/IShopModel.cs | 1 + 5 files changed, 9 insertions(+) diff --git a/FishFactory/FishFactoryContracts/BindingModels/ShopBindingModel.cs b/FishFactory/FishFactoryContracts/BindingModels/ShopBindingModel.cs index 285c4ff..b829394 100644 --- a/FishFactory/FishFactoryContracts/BindingModels/ShopBindingModel.cs +++ b/FishFactory/FishFactoryContracts/BindingModels/ShopBindingModel.cs @@ -22,5 +22,6 @@ namespace FishFactoryContracts.BindingModels get; set; } = new(); + public int MaxCountCanneds { get; set; } } } diff --git a/FishFactory/FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs b/FishFactory/FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs index 5d0338d..a5a320d 100644 --- a/FishFactory/FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs +++ b/FishFactory/FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs @@ -18,5 +18,7 @@ namespace FishFactoryContracts.BusinessLogicsContracts bool Update(ShopBindingModel model); bool Delete(ShopBindingModel model); bool AddCannedInShop(ShopSearchModel model, ICannedModel canned, int count); + bool AddCanneds(ICannedModel canned, int count); + bool SellCanneds(ICannedModel canned, int count); } } diff --git a/FishFactory/FishFactoryContracts/StoragesContracts/IShopStorage.cs b/FishFactory/FishFactoryContracts/StoragesContracts/IShopStorage.cs index 7c1dfa6..4d39c04 100644 --- a/FishFactory/FishFactoryContracts/StoragesContracts/IShopStorage.cs +++ b/FishFactory/FishFactoryContracts/StoragesContracts/IShopStorage.cs @@ -1,6 +1,7 @@ using FishFactoryContracts.BindingModels; using FishFactoryContracts.SearchModels; using FishFactoryContracts.ViewModels; +using FishFactoryDataModels.Models; using System; using System.Collections.Generic; using System.Linq; @@ -17,5 +18,6 @@ namespace FishFactoryContracts.StoragesContracts ShopViewModel? Insert(ShopBindingModel model); ShopViewModel? Update(ShopBindingModel model); ShopViewModel? Delete(ShopBindingModel model); + bool SellCanneds(ICannedModel model, int count); } } diff --git a/FishFactory/FishFactoryContracts/ViewModels/ShopViewModel.cs b/FishFactory/FishFactoryContracts/ViewModels/ShopViewModel.cs index 43b167e..778e3b7 100644 --- a/FishFactory/FishFactoryContracts/ViewModels/ShopViewModel.cs +++ b/FishFactory/FishFactoryContracts/ViewModels/ShopViewModel.cs @@ -21,6 +21,9 @@ namespace FishFactoryContracts.ViewModels [DisplayName("Дата открытия")] public DateTime DateOpening { get; set; } = DateTime.Now; + [DisplayName("Максимальное количество консерв")] + public int MaxCountCanneds { get; set; } + public Dictionary ListCanneds { get; diff --git a/FishFactory/FishFactoryDataModels/IShopModel.cs b/FishFactory/FishFactoryDataModels/IShopModel.cs index dfba83f..dcea084 100644 --- a/FishFactory/FishFactoryDataModels/IShopModel.cs +++ b/FishFactory/FishFactoryDataModels/IShopModel.cs @@ -13,5 +13,6 @@ namespace FishFactoryDataModels string Address { get; } DateTime DateOpening { get; } Dictionary ListCanneds { get; } + int MaxCountCanneds { get; } } }