From 722de64dadd29744972ec5c5eca228f7a2e326e5 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 28 Jan 2022 09:08:35 +0300 Subject: Add convert Tool --- src/PriceListTools/PriceListTool.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/PriceListTools') diff --git a/src/PriceListTools/PriceListTool.cs b/src/PriceListTools/PriceListTool.cs index cbae4d9..918b6de 100644 --- a/src/PriceListTools/PriceListTool.cs +++ b/src/PriceListTools/PriceListTool.cs @@ -6,6 +6,27 @@ 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; -- cgit v1.2.3