2022-01-28 09:27:19 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace RehauSku.PriceListTools
|
2022-01-28 09:16:10 +03:00
|
|
|
|
{
|
|
|
|
|
internal class ConvertTool : PriceListTool
|
|
|
|
|
{
|
|
|
|
|
private Source Current;
|
|
|
|
|
|
|
|
|
|
public void GetCurrent()
|
|
|
|
|
{
|
2022-01-28 09:27:19 +03:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Current = new Source(ExcelApp.ActiveWorkbook);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
catch (Exception exception)
|
|
|
|
|
{
|
|
|
|
|
System.Windows.Forms.MessageBox.Show
|
|
|
|
|
(exception.Message,
|
|
|
|
|
"Ошибка распознавания",
|
|
|
|
|
System.Windows.Forms.MessageBoxButtons.OK,
|
|
|
|
|
System.Windows.Forms.MessageBoxIcon.Information);
|
|
|
|
|
throw exception;
|
|
|
|
|
}
|
2022-01-28 09:16:10 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void FillTarget()
|
|
|
|
|
{
|
|
|
|
|
ExcelApp.ScreenUpdating = false;
|
|
|
|
|
FillColumn(Current.SkuAmount, TargetFile.amountCell.Column);
|
|
|
|
|
FilterByAmount();
|
|
|
|
|
ExcelApp.ScreenUpdating = true;
|
|
|
|
|
|
|
|
|
|
Forms.Dialog.SaveWorkbookAs();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|