RhSolutions-AddIn/src/PriceListTools/ConvertTool.cs

32 lines
854 B
C#
Raw Normal View History

2022-02-02 09:46:47 +03:00
using RehauSku.Interface;
2022-01-28 09:27:19 +03:00
namespace RehauSku.PriceListTools
2022-01-28 09:16:10 +03:00
{
2022-02-02 18:02:17 +03:00
internal class ConvertTool : AbstractTool
2022-01-28 09:16:10 +03:00
{
private SourcePriceList Current { get; set; }
2022-01-28 09:16:10 +03:00
public ConvertTool()
2022-01-28 09:16:10 +03:00
{
Current = new SourcePriceList(ExcelApp.ActiveWorkbook);
2022-01-28 09:16:10 +03:00
}
public override void FillTarget()
2022-01-28 09:16:10 +03:00
{
2022-02-04 09:17:12 +03:00
ProgressBar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count);
ResultBar = new ResultBar();
2022-02-02 10:23:50 +03:00
foreach (var kvp in Current.PositionAmount)
2022-02-02 10:23:50 +03:00
{
2022-02-03 21:44:24 +03:00
FillPositionAmountToColumns(kvp, TargetFile.amountCell.Column);
2022-02-04 09:17:12 +03:00
ProgressBar.Update();
2022-02-02 10:23:50 +03:00
}
2022-01-28 09:16:10 +03:00
FilterByAmount();
2022-02-04 09:17:12 +03:00
ResultBar.Update();
2022-01-28 09:16:10 +03:00
Dialog.SaveWorkbookAs();
2022-02-04 09:17:12 +03:00
ExcelApp.StatusBar = false;
2022-01-28 09:16:10 +03:00
}
}
}