RhSolutions-AddIn/RhSolutions.AddIn/Controllers/ConvertTool.cs

27 lines
724 B
C#
Raw Normal View History

2023-03-28 10:36:36 +03:00
namespace RhSolutions.Controllers;
2022-01-28 09:27:19 +03:00
2023-03-28 10:36:36 +03:00
internal class ConvertTool : ToolBase
2022-01-28 09:16:10 +03:00
{
2023-03-28 10:36:36 +03:00
private SourcePriceList Current { get; set; }
2022-01-28 09:16:10 +03:00
2023-03-28 10:36:36 +03:00
public ConvertTool()
{
Current = new SourcePriceList(ExcelApp.ActiveWorkbook);
}
2022-01-28 09:16:10 +03:00
2023-03-28 10:36:36 +03:00
public override void FillTarget()
{
using (ProgressBar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count))
using (ResultBar = new ResultBar())
2022-01-28 09:16:10 +03:00
{
2023-03-28 10:36:36 +03:00
foreach (var kvp in Current.PositionAmount)
2022-02-02 10:23:50 +03:00
{
2023-03-28 10:36:36 +03:00
FillPositionAmountToColumns(kvp, TargetFile.AmountCell.Column);
ProgressBar.Update();
2022-04-01 17:55:36 +03:00
}
2023-03-28 10:36:36 +03:00
FilterByAmount();
ResultBar.Update();
2022-01-28 09:16:10 +03:00
}
}
}