aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-01-28 08:51:47 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-01-28 08:51:47 +0300
commit71fcd9ee866cb3b1a221dbd691d78ff4b26f23e4 (patch)
tree56717e01eb3bd3ed44cae1db06db83b815028e8b /src
parent7bb0a82ffbd5c5123bfdbff6ba29f463ab9d1b46 (diff)
Add missing sku list, change missing messagebox
Diffstat (limited to 'src')
-rw-r--r--src/PriceListTools/PriceListTool.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/PriceListTools/PriceListTool.cs b/src/PriceListTools/PriceListTool.cs
index 99eef17..cbae4d9 100644
--- a/src/PriceListTools/PriceListTool.cs
+++ b/src/PriceListTools/PriceListTool.cs
@@ -2,6 +2,7 @@
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
+using System.Linq;
namespace RehauSku.PriceListTools
{
@@ -33,17 +34,15 @@ namespace RehauSku.PriceListTools
protected private void FillColumn(Dictionary<string, double> dictionary, int column)
{
+ List<KeyValuePair<string, double>> missing = new List<KeyValuePair<string, double>>();
+
foreach (var kvp in dictionary)
{
Range cell = TargetFile.Sheet.Columns[TargetFile.skuCell.Column].Find(kvp.Key);
if (cell == null)
{
- System.Windows.Forms.MessageBox.Show
- ($"Артикул {kvp.Key} отсутствует в таблице заказов {RegistryUtil.PriceListPath}",
- "Отсутствует позиция в конечной таблице заказов",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Information);
+ missing.Add(kvp);
}
else
@@ -62,6 +61,12 @@ namespace RehauSku.PriceListTools
}
}
+ string values = string.Join("\n", missing.Select(kvp => kvp.Key).ToArray());
+ System.Windows.Forms.MessageBox.Show
+ ($"{missing.Count} артикулов отсутствует в таблице заказов {RegistryUtil.PriceListPath}",
+ "Отсутствует позиция в конечной таблице заказов",
+ System.Windows.Forms.MessageBoxButtons.OK,
+ System.Windows.Forms.MessageBoxIcon.Information);
}
protected private void FilterByAmount()