Add virtual GetSource with no params to abstract pricelist tool

This commit is contained in:
Sergey Chebotar 2022-01-09 10:49:41 +03:00
parent 762127a4aa
commit 379fb6d996
3 changed files with 8 additions and 2 deletions

View File

@ -39,6 +39,11 @@ namespace RehauSku.PriceListTools
}
}
public virtual void GetSource()
{
throw new NotImplementedException();
}
public virtual void GetSource(string[] files)
{
ExcelApp.ScreenUpdating = false;

View File

@ -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("Неверный диапазон");
}

View File

@ -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();