protected override void DoNew()
        {
            EvidenceInfo frmForm = new EvidenceInfo();

            frmForm.FormState = "new";
            frmForm.ShowDialog();
            btnStatus(true);
            ShowData();
        }
        private void btnNewEvidence_Click(object sender, EventArgs e)
        {
            // Create a new instance of EvidenceInfoForm
            EvidenceInfo EvidenceInfoForm = new EvidenceInfo();

            // Display the form as top most form.
            EvidenceInfoForm.TopMost = true;

            // Show the settings form
            EvidenceInfoForm.Show();
        }
 protected override void DoEdit()
 {
     if (dgvEvidenceList.RowCount > 0)
     {
         EvidenceInfo frmForm = new EvidenceInfo();
         frmForm.FormState  = "edit";
         frmForm.EvidenceID = dgvEvidenceList.Rows[SelectRowIndex].Cells[colEvidenceID.Name].Value.ToString();
         frmForm.ShowDialog();
         btnStatus(true);
     }
     ShowData();
 }
 private void dgvEvidenceList_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (dgvEvidenceList.RowCount > 0)
     {
         EvidenceInfo frmForm = new EvidenceInfo();
         frmForm.FormState  = "edit";
         frmForm.EvidenceID = dgvEvidenceList.Rows[SelectRowIndex].Cells[colEvidenceID.Name].Value.ToString();
         frmForm.ShowDialog();
         btnStatus(true);
     }
     ShowData();
 }