diff options
author | Serghei Cebotari <51533848+schebotar@users.noreply.github.com> | 2022-01-28 18:20:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 18:20:30 +0300 |
commit | ec1d38f2d4926ddd89dc8f17d29617ea4ddefa82 (patch) | |
tree | 9fd3a44e58693dc9bbc8d0e406ba4de21b39ec86 /src/PriceListTools/ConvertTool.cs | |
parent | d688578a46e3a3383371c1df952fa2898c828a9a (diff) | |
parent | 2ad016bb4c332ecad6d12d824a84f15616ecea38 (diff) |
Merge pull request #12 from schebotar/dev
Dev
Diffstat (limited to 'src/PriceListTools/ConvertTool.cs')
-rw-r--r-- | src/PriceListTools/ConvertTool.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/PriceListTools/ConvertTool.cs b/src/PriceListTools/ConvertTool.cs new file mode 100644 index 0000000..48e93d2 --- /dev/null +++ b/src/PriceListTools/ConvertTool.cs @@ -0,0 +1,37 @@ +using System; + +namespace RehauSku.PriceListTools +{ + internal class ConvertTool : PriceListTool + { + private Source Current; + + public void GetCurrent() + { + 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; + } + } + + public void FillTarget() + { + ExcelApp.ScreenUpdating = false; + FillColumnsWithDictionary(Current.PositionAmount, TargetFile.amountCell.Column); + FilterByAmount(); + ExcelApp.ScreenUpdating = true; + + Forms.Dialog.SaveWorkbookAs(); + } + } +}
\ No newline at end of file |