Ejemplo n.º 1
0
        private void GetDuplicateStructures(string filename, string molfile)
        {
            try
            {
                // txtTANNo.Text = strTANNumber;

                int       totalRecCnt = 0;
                DataTable dtDupRecs   = ChemistryOperations.GetDuplicateRecords(filename, molfile, out totalRecCnt);
                if (dtDupRecs != null)
                {
                    if (dtDupRecs.Rows.Count > 1)
                    {
                        pnlDups.Enabled = true;

                        SearchResults  = dtDupRecs;
                        lblRecCnt.Text = dtDupRecs.Rows.Count.ToString() + " duplicates out of  " + totalRecCnt + "  records";

                        ToTalRecCnt = totalRecCnt;

                        MaxRecCnt = dtDupRecs.Rows.Count;

                        currRecIndex = 1;

                        numGoToRec.Value   = 1;
                        numGoToRec.Minimum = 1;
                        numGoToRec.Maximum = MaxRecCnt;
                        numGoToRec.Value   = currRecIndex;
                    }
                    else
                    {
                        MessageBox.Show("No duplicate records found", "No Duplicates", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }