aboutsummaryrefslogtreecommitdiff
path: root/src/PriceListTools/PriceList.cs
diff options
context:
space:
mode:
authorSerghei Cebotari <51533848+schebotar@users.noreply.github.com>2022-01-28 18:20:30 +0300
committerGitHub <noreply@github.com>2022-01-28 18:20:30 +0300
commitec1d38f2d4926ddd89dc8f17d29617ea4ddefa82 (patch)
tree9fd3a44e58693dc9bbc8d0e406ba4de21b39ec86 /src/PriceListTools/PriceList.cs
parentd688578a46e3a3383371c1df952fa2898c828a9a (diff)
parent2ad016bb4c332ecad6d12d824a84f15616ecea38 (diff)
Merge pull request #12 from schebotar/dev
Dev
Diffstat (limited to 'src/PriceListTools/PriceList.cs')
-rw-r--r--src/PriceListTools/PriceList.cs48
1 files changed, 13 insertions, 35 deletions
diff --git a/src/PriceListTools/PriceList.cs b/src/PriceListTools/PriceList.cs
index bc11a17..65ff3df 100644
--- a/src/PriceListTools/PriceList.cs
+++ b/src/PriceListTools/PriceList.cs
@@ -1,42 +1,20 @@
using Microsoft.Office.Interop.Excel;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
namespace RehauSku.PriceListTools
{
internal class PriceList
{
- public readonly string Name;
- public readonly PriceListSheet OfferSheet;
- public List<PriceListSheet> Sheets { get; private set; }
-
- private const string offerSheetHeader = "КП";
-
- public PriceList(Workbook workbook)
- {
- Name = workbook.Name;
- Sheets = new List<PriceListSheet>();
-
- foreach (Worksheet worksheet in workbook.Sheets)
- {
- PriceListSheet priceListSheet = new PriceListSheet(worksheet);
-
- if (priceListSheet.FillSkuAmount())
- Sheets.Add(priceListSheet);
- }
-
- OfferSheet = Sheets.Where(s => s.Name == offerSheetHeader).FirstOrDefault();
- }
-
- public static string CreateNewFile()
- {
- string fileExtension = Path.GetExtension(RegistryUtil.PriceListPath);
- string path = Path.GetTempFileName() + fileExtension;
-
- File.Copy(RegistryUtil.PriceListPath, path);
- return path;
- }
+ protected const string amountHeader = "Кол-во";
+ protected const string skuHeader = "Актуальный материал";
+ protected const string groupHeader = "Программа";
+ protected const string nameHeader = "Наименование";
+
+ public Range amountCell { get; protected set; }
+ public Range skuCell { get; protected set; }
+ public Range groupCell { get; protected set; }
+ public Range nameCell { get; protected set; }
+
+ public Worksheet Sheet { get; protected set; }
+ public string Name { get; protected set; }
}
-}
-
+} \ No newline at end of file