RhSolutions-AddIn/src/PriceListTools/ConvertTool.cs

30 lines
851 B
C#
Raw Normal View History

2022-12-19 20:25:35 +03:00
using RhSolutions.Interface;
2022-01-28 09:27:19 +03:00
2022-12-19 20:25:35 +03:00
namespace RhSolutions.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-04-01 17:55:36 +03:00
using (ProgressBar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count))
using (ResultBar = new ResultBar())
2022-02-02 10:23:50 +03:00
{
2022-04-01 17:55:36 +03:00
foreach (var kvp in Current.PositionAmount)
{
FillPositionAmountToColumns(kvp, TargetFile.AmountCell.Column);
ProgressBar.Update();
}
2022-04-01 17:55:36 +03:00
FilterByAmount();
ResultBar.Update();
}
2022-01-28 09:16:10 +03:00
}
}
}