diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-09 10:49:41 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-09 10:49:41 +0300 |
commit | 379fb6d99673e390e701b0b16e10dbc2d4edb148 (patch) | |
tree | 7ae745ba238e050fe6009e2784c845b5d394b196 /src | |
parent | 762127a4aa1ee393f19e08018830bc8ba023c050 (diff) |
Add virtual GetSource with no params to abstract pricelist tool
Diffstat (limited to 'src')
-rw-r--r-- | src/PriceListTools/AbstractPriceListTool.cs | 5 | ||||
-rw-r--r-- | src/PriceListTools/ExportTool.cs | 3 | ||||
-rw-r--r-- | src/Ribbon/RibbonController.cs | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/PriceListTools/AbstractPriceListTool.cs b/src/PriceListTools/AbstractPriceListTool.cs index 04d11af..1aef0be 100644 --- a/src/PriceListTools/AbstractPriceListTool.cs +++ b/src/PriceListTools/AbstractPriceListTool.cs @@ -39,6 +39,11 @@ namespace RehauSku.PriceListTools } } + public virtual void GetSource() + { + throw new NotImplementedException(); + } + public virtual void GetSource(string[] files) { ExcelApp.ScreenUpdating = false; diff --git a/src/PriceListTools/ExportTool.cs b/src/PriceListTools/ExportTool.cs index fbafbdd..9a2c5fd 100644 --- a/src/PriceListTools/ExportTool.cs +++ b/src/PriceListTools/ExportTool.cs @@ -17,10 +17,11 @@ namespace RehauSku.PriceListTools Selection = ExcelApp.Selection; } - public override void GetSource(string[] files) + public override void GetSource() { if (Selection != null && Selection.Columns.Count == 2) FillSkuAmountDict(); + else throw new Exception("Неверный диапазон"); } diff --git a/src/Ribbon/RibbonController.cs b/src/Ribbon/RibbonController.cs index d0eb590..15bd1a0 100644 --- a/src/Ribbon/RibbonController.cs +++ b/src/Ribbon/RibbonController.cs @@ -65,7 +65,7 @@ namespace RehauSku.Ribbon { using (ExportTool exportTool = new ExportTool()) { - exportTool.GetSource(null); + exportTool.GetSource(); string exportFile = PriceList.CreateNewFile(); exportTool.OpenNewPrice(exportFile); exportTool.FillPriceList(); |