//occurs when cell clicked in dataGridView, use only in history field,Open the history form for current mutation.
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 14)//if press on history column
            {
                string mutationId = _mutationList.ElementAt(e.RowIndex).MutId;
                try
                {
                    List<Patient> patientList = MainBL.getPatientListWithMutation(mutationId);
                    HistoryForm hf = new HistoryForm(patientList, _mainForm);
                    _mainForm.Enabled = false;
                    hf.Show();
                }
                catch (Exception)
                {
                    GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");

                }
                
            }
            if(e.ColumnIndex==15)//ADDED LINK TO NCBI REFSNP TO OPEN BROWSER WHEN CLICKED
            {
                String tempRs = mutationDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                String ncbiUrl = "http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?rs=" + tempRs;
                try
                {
                    System.Diagnostics.Process.Start(ncbiUrl);
                }
                catch (Exception)
                {
                    GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");

                }

            }
        }
Example #2
0
 //occurs when cell clicked in dataGridView, use only in history field,Open the history form for current mutation.
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 14)
     {
         string mutationId = _mutationList.ElementAt(e.RowIndex).MutId;
         try
         {
             List <Patient> patientList = MainBL.getPatientListWithMutation(mutationId);
             HistoryForm    hf          = new HistoryForm(patientList, _mainForm);
             _mainForm.Enabled = false;
             hf.Show();
         }
         catch (Exception)
         {
             GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");
         }
     }
 }
        //occurs when cell clicked in dataGridView, use only in history field,Open the history form for current mutation.
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 14)
            {
                string mutationId = _mutationList.ElementAt(e.RowIndex).MutId;
                try
                {
                    List<Patient> patientList = MainBL.getPatientListWithMutation(mutationId);
                    HistoryForm hf = new HistoryForm(patientList, _mainForm);
                    _mainForm.Enabled = false;
                    hf.Show();
                }
                catch (Exception)
                {
                    GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");

                }
                
            }
        }