diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-26 18:22:32 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-26 18:22:32 +0300 |
commit | 54fc3320e7d64d7903b4d091fe0d5c15df01fd78 (patch) | |
tree | ac8b9aa1e883a85339a594b2797ab319cca73c4e /Source/PriceListTools/PriceListUtil.cs | |
parent | 20cfbfcca3a779c04aecdca5e4b465651e2be42a (diff) |
Move to /src
Diffstat (limited to 'Source/PriceListTools/PriceListUtil.cs')
-rw-r--r-- | Source/PriceListTools/PriceListUtil.cs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Source/PriceListTools/PriceListUtil.cs b/Source/PriceListTools/PriceListUtil.cs deleted file mode 100644 index 14797d9..0000000 --- a/Source/PriceListTools/PriceListUtil.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections.Generic; -using System.IO; - -namespace RehauSku.PriceListTools -{ - static class PriceListUtil - { - public static string CreateNewExportFile() - { - string fileExtension = Path.GetExtension(RegistryUtil.PriceListPath); - string path = Path.GetTempFileName() + fileExtension; - - File.Copy(RegistryUtil.PriceListPath, path); - return path; - } - - public static void AddValues(this Dictionary<string, double> SkuAmount, PriceList priceList) - { - object[,] amountCells = priceList.ActiveSheet.amountCells; - object[,] skuCells = priceList.ActiveSheet.skuCells; - - for (int row = priceList.ActiveSheet.headerRow.Value + 1; row < amountCells.GetLength(0); row++) - { - object amount = amountCells[row, 1]; - object sku = skuCells[row, 1]; - - if (amount != null && (double)amount != 0) - { - if (SkuAmount.ContainsKey(sku.ToString())) - { - SkuAmount[sku.ToString()] += (double)amount; - } - - else - SkuAmount.Add(sku.ToString(), (double)amount); - } - } - } - } -} - |