Move ConvertTool to another file

This commit is contained in:
Sergey Chebotar 2022-01-28 09:16:10 +03:00
parent 35930ebda4
commit dca27ebcc3
2 changed files with 22 additions and 22 deletions

View File

@ -0,0 +1,22 @@
namespace RehauSku.PriceListTools
{
internal class ConvertTool : PriceListTool
{
private Source Current;
public void GetCurrent()
{
Current = new Source(ExcelApp.ActiveWorkbook);
}
public void FillTarget()
{
ExcelApp.ScreenUpdating = false;
FillColumn(Current.SkuAmount, TargetFile.amountCell.Column);
FilterByAmount();
ExcelApp.ScreenUpdating = true;
Forms.Dialog.SaveWorkbookAs();
}
}
}

View File

@ -2,31 +2,9 @@
using Microsoft.Office.Interop.Excel; using Microsoft.Office.Interop.Excel;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace RehauSku.PriceListTools namespace RehauSku.PriceListTools
{ {
internal class ConvertTool : PriceListTool
{
private Source Current;
public void GetCurrent()
{
Current = new Source(ExcelApp.ActiveWorkbook);
}
public void FillTarget()
{
ExcelApp.ScreenUpdating = false;
FillColumn(Current.SkuAmount, TargetFile.amountCell.Column);
FilterByAmount();
ExcelApp.ScreenUpdating = true;
Forms.Dialog.SaveWorkbookAs();
}
}
internal abstract class PriceListTool internal abstract class PriceListTool
{ {
protected private Application ExcelApp = (Application)ExcelDnaUtil.Application; protected private Application ExcelApp = (Application)ExcelDnaUtil.Application;