From 14c13bec175d079f2e5f3c139e485df9d1c8de4d Mon Sep 17 00:00:00 2001 From: goldfest Date: Thu, 4 Apr 2024 23:58:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogic/ShopLogic.cs | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/TravelCompany/TravelCompanyBusinessLogic/BusinessLogic/ShopLogic.cs b/TravelCompany/TravelCompanyBusinessLogic/BusinessLogic/ShopLogic.cs index 82e6c71..1021630 100644 --- a/TravelCompany/TravelCompanyBusinessLogic/BusinessLogic/ShopLogic.cs +++ b/TravelCompany/TravelCompanyBusinessLogic/BusinessLogic/ShopLogic.cs @@ -1,14 +1,14 @@ using Microsoft.Extensions.Logging; -using TravelCompanyContracts.BindingModels; -using TravelCompanyContracts.BusinessLogicsContracts; -using TravelCompanyContracts.SearchModels; -using TravelCompanyContracts.StoragesContracts; -using TravelCompanyContracts.ViewModels; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using TravelCompanyContracts.BindingModels; +using TravelCompanyContracts.BusinessLogicsContracts; +using TravelCompanyContracts.SearchModels; +using TravelCompanyContracts.StoragesContracts; +using TravelCompanyContracts.ViewModels; namespace TravelCompanyBusinessLogic.BusinessLogics { @@ -125,6 +125,17 @@ namespace TravelCompanyBusinessLogic.BusinessLogics } shop.ShopTravels.Add(model.TravelId, (Travel, model.Count)); } + + _shopStorage.Update(new ShopBindingModel() + { + Id = shop.Id, + ShopName = shop.ShopName, + Adress = shop.Adress, + OpeningDate = shop.OpeningDate, + ShopTravels = shop.ShopTravels, + TravelMaxCount = shop.TravelMaxCount, + }); + return true; }