Move ConvertTool to another file
This commit is contained in:
parent
35930ebda4
commit
dca27ebcc3
22
src/PriceListTools/ConvertTool.cs
Normal file
22
src/PriceListTools/ConvertTool.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -2,31 +2,9 @@
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
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
|
||||
{
|
||||
protected private Application ExcelApp = (Application)ExcelDnaUtil.Application;
|
||||
|
Loading…
Reference in New Issue
Block a user