private DataTable GetTanDetailsTableFromActiveForm(out string tan_out, out string srcCntrl_out)
        {
            DataTable dtTanDetails = null;
            string    strTanNumber = "";
            string    strSrcCntrl  = "";

            try
            {
                frmCurator              objfrmCurator   = null;
                Forms.frmQryDuplicates  objfrmQueryDups = null;
                Enumeration.frmRGrpEnum objfrmEnum      = null;

                Form objActiveForm = this.ActiveMdiChild;

                if (objActiveForm != null)
                {
                    if (objActiveForm.Name.ToUpper() == "FRMCURATOR")
                    {
                        objfrmCurator = (frmCurator)objActiveForm;
                        dtTanDetails  = objfrmCurator.TANDetailsTbl;
                        strTanNumber  = objfrmCurator.TANNumber;

                        strSrcCntrl = "FRMCURATOR";
                    }
                    else if (objActiveForm.Name.ToUpper() == "FRMQRYDUPLICATES")
                    {
                        objfrmQueryDups = (Forms.frmQryDuplicates)objActiveForm;
                        dtTanDetails    = objfrmQueryDups.ucCheckDuplicates1.SearchResults;
                        strTanNumber    = objfrmQueryDups.ucCheckDuplicates1.TANNumber;

                        strSrcCntrl = "FRMQRYDUPLICATES";
                    }
                    else if (objActiveForm.Name.ToUpper() == "FRMRGRPENUM")
                    {
                        objfrmEnum   = (Enumeration.frmRGrpEnum)objActiveForm;
                        dtTanDetails = objfrmEnum.EnumResultsTbl;
                        strTanNumber = objfrmEnum.TANNumber;

                        string strPageNo    = objfrmEnum.PageNumber;
                        string strPageLabel = objfrmEnum.PageLabel;
                        string strExampleNo = objfrmEnum.ExampleNumber;
                        string strTableNo   = objfrmEnum.TableNumber;

                        strSrcCntrl = "FRMRGRPENUM";

                        RebuildTANDetailsTable_Enum(ref dtTanDetails, strPageNo, strPageLabel, strExampleNo, strTableNo);
                    }
                    tan_out      = strTanNumber;
                    srcCntrl_out = strSrcCntrl;
                    return(dtTanDetails);
                }
            }
            catch (Exception ex)
            {
                PepsiLiteErrorHandling.WriteErrorLog(ex.ToString());
            }
            tan_out      = strTanNumber;
            srcCntrl_out = strSrcCntrl;
            return(dtTanDetails);
        }
 private void checkDuplicatesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Forms.frmQryDuplicates objfrmQryDups = new Forms.frmQryDuplicates();
         objfrmQryDups.MdiParent = this;
         objfrmQryDups.Show();
     }
     catch (Exception ex)
     {
         PepsiLiteErrorHandling.WriteErrorLog(ex.ToString());
     }
 }