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 "; } + + 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(); + } + } + } } }