Exemple #1
0
        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);
                }
            }
        }
Exemple #2
0
        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);
                    }
                }
            }
        }