From 3a25137d969f47683b3b9e9fe5f0ba47a123dd62 Mon Sep 17 00:00:00 2001 From: DavidMakarov Date: Thu, 25 Apr 2024 19:18:18 +0400 Subject: [PATCH 1/2] fix dataGridView in FormMain --- FlowerShop/FlowerShop/FormMain.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/FlowerShop/FlowerShop/FormMain.cs b/FlowerShop/FlowerShop/FormMain.cs index bde1d6e..9e57bee 100644 --- a/FlowerShop/FlowerShop/FormMain.cs +++ b/FlowerShop/FlowerShop/FormMain.cs @@ -28,7 +28,6 @@ namespace FlowerShopView { dataGridView.DataSource = list; dataGridView.Columns["FlowerId"].Visible = false; - dataGridView.Columns["FlowerName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } } catch (Exception ex) From 568438587b2a93ea3ef6e50b4e69dd49d23f9f95 Mon Sep 17 00:00:00 2001 From: DavidMakarov Date: Fri, 3 May 2024 15:40:18 +0400 Subject: [PATCH 2/2] full hard_lab2 --- FlowerShop/FlowerShopFileImplement/Implements/ShopStorage.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/FlowerShop/FlowerShopFileImplement/Implements/ShopStorage.cs b/FlowerShop/FlowerShopFileImplement/Implements/ShopStorage.cs index 5543682..7c8b365 100644 --- a/FlowerShop/FlowerShopFileImplement/Implements/ShopStorage.cs +++ b/FlowerShop/FlowerShopFileImplement/Implements/ShopStorage.cs @@ -87,7 +87,6 @@ namespace FlowerShopFileImplement.Implements public bool MakeSale(IFlowerModel model, int count) { - // TODO: разобраться var flower = source.Flowers.FirstOrDefault(x => x.Id == model.Id); int countInShops = source.Shops.SelectMany(x => x.ShopFlowers).Sum(y => y.Key == model.Id ? y.Value.Item2 : 0); @@ -95,7 +94,6 @@ namespace FlowerShopFileImplement.Implements { return false; } - foreach (var shop in source.Shops) { var shopFlowers = shop.ShopFlowers.Where(x => x.Key == model.Id);