aboutsummaryrefslogtreecommitdiff
path: root/src/PriceListTools/PriceList.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2021-12-28 17:15:30 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2021-12-28 17:15:30 +0300
commitdf1a2f9d91c78e7a87a8b1be643c0f7269cad761 (patch)
tree4252ced95efaff4f92fd46c94d6f12aa623323b7 /src/PriceListTools/PriceList.cs
parent54fc3320e7d64d7903b4d091fe0d5c15df01fd78 (diff)
Show message box if sku is not found during export
Diffstat (limited to 'src/PriceListTools/PriceList.cs')
-rw-r--r--src/PriceListTools/PriceList.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/PriceListTools/PriceList.cs b/src/PriceListTools/PriceList.cs
index 1460c07..e67d573 100644
--- a/src/PriceListTools/PriceList.cs
+++ b/src/PriceListTools/PriceList.cs
@@ -44,7 +44,16 @@ namespace RehauSku.PriceListTools
foreach (KeyValuePair<string, double> kvp in values)
{
Range cell = ws.Columns[skuColumn].Find(kvp.Key);
- ws.Cells[cell.Row, amountColumn].Value = kvp.Value;
+ if (cell == null)
+ {
+ System.Windows.Forms.MessageBox.Show
+ ($"Артикул {kvp.Key} отсутствует в таблице заказов {RegistryUtil.PriceListPath}",
+ "Отсутствует позиция в конечной таблице заказов",
+ System.Windows.Forms.MessageBoxButtons.OK,
+ System.Windows.Forms.MessageBoxIcon.Information);
+ }
+ else
+ ws.Cells[cell.Row, amountColumn].Value = kvp.Value;
}
AutoFilter filter = ws.AutoFilter;