private void UPCWizard_Btn_Click(object sender, RibbonControlEventArgs e) { string[] mySheet = new string[1]; mySheet[0] = Globals.ThisAddIn.Application.ActiveSheet.Name; DataTable dtTable = global::DataPrepTools.CreateDataSet.ExcelToDataSet(mySheet); if (dtTable != null) { string uniqueField = global::DataPrepTools.DupsSingleMulti.DupCheck(dtTable); if (uniqueField != null) { UPCWizard.AccessToDataSet(dtTable, uniqueField); } } }
private void DupsSingleMulti_Btn_Click(object sender, RibbonControlEventArgs e) { string[] mySheet = new string[1]; mySheet[0] = Globals.ThisAddIn.Application.ActiveSheet.Name; DataTable dtTable = global::DataPrepTools.CreateDataSet.ExcelToDataSet(mySheet); if (dtTable != null) { string uniqueField = global::DataPrepTools.DupsSingleMulti.DupCheck(dtTable); if (uniqueField != null) { DialogResult results = MessageBox.Show("No duplicates have been found. Would you like to run the UPC Wizard?", "Launch UPC Wizard", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (results == DialogResult.Yes) { UPCWizard.AccessToDataSet(dtTable, uniqueField); } } } }