30 lines
841 B
C#
30 lines
841 B
C#
using RhSolutions.Models;
|
|
|
|
namespace RhSolutions.Controllers
|
|
{
|
|
internal class ConvertTool : ToolBase
|
|
{
|
|
private SourcePriceList Current { get; set; }
|
|
|
|
public ConvertTool()
|
|
{
|
|
Current = new SourcePriceList(ExcelApp.ActiveWorkbook);
|
|
}
|
|
|
|
public override void FillTarget()
|
|
{
|
|
using (ProgressBar = new ProgressBar("Заполняю строки...", Current.PositionAmount.Count))
|
|
using (ResultBar = new ResultBar())
|
|
{
|
|
foreach (var kvp in Current.PositionAmount)
|
|
{
|
|
FillPositionAmountToColumns(kvp, TargetFile.AmountCell.Column);
|
|
ProgressBar.Update();
|
|
}
|
|
|
|
FilterByAmount();
|
|
ResultBar.Update();
|
|
}
|
|
}
|
|
}
|
|
} |