diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-07 08:28:21 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2021-12-07 08:28:21 +0300 |
commit | f4ea6bd0714665ad13025155bec7bdb5b37d8f06 (patch) | |
tree | f1939140e6d175673a30b75aa7889615fc86b1ac /Source | |
parent | 878b5d2b6a4d807376f3255e52c8ac9ef97d6bc9 (diff) |
Add OnButtonPressed method to Riboon controller
Diffstat (limited to 'Source')
-rw-r--r-- | Source/DataExport/RibbonController.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/DataExport/RibbonController.cs b/Source/DataExport/RibbonController.cs index a9eedb5..3ae9099 100644 --- a/Source/DataExport/RibbonController.cs +++ b/Source/DataExport/RibbonController.cs @@ -1,6 +1,7 @@ using System.Runtime.InteropServices; using System.Windows.Forms; using ExcelDna.Integration.CustomUI; +using Rehau.Sku.Assist; namespace Ribbon { @@ -22,5 +23,23 @@ namespace Ribbon </ribbon> </customUI>"; } + + public void OnButtonPressed(IRibbonControl control) + { + using (DataWriter dw = new DataWriter()) + { + if (!dw.IsRangeValid()) + { + MessageBox.Show("Выделен неверный диапазон!", "Неверный диапазон", MessageBoxButtons.OK, MessageBoxIcon.Information); + return; + } + + else + { + dw.FillSkuAmountDict(); + dw.FillPriceList(); + } + } + } } } |