Add OnButtonPressed method to Riboon controller

This commit is contained in:
Sergey Chebotar 2021-12-07 08:28:21 +03:00
parent 878b5d2b6a
commit f4ea6bd071

View File

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