Esempio n. 1
0
 private void dgvBenhNhan_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         string        num          = dgvBenhNhan.Rows[e.RowIndex].Cells["SickNum"].Value.ToString().Trim();
         PatientDetail patienDetail = new PatientDetail(num);
         patienDetail.RefreshDgv += updateDgv;
         patienDetail.ShowDialog();
     }
 }
Esempio n. 2
0
        private void btnChiTiet_Click(object sender, EventArgs e)
        {
            int selectedRowCount =
                dgvBenhNhan.Rows.GetRowCount(DataGridViewElementStates.Selected);

            if (selectedRowCount <= 0)
            {
                return;
            }
            try
            {
                currRowIndex = dgvBenhNhan.SelectedRows[selectedRowCount - 1].Index;
                string        num          = dgvBenhNhan.Rows[currRowIndex].Cells["SickNum"].Value.ToString().Trim();
                PatientDetail patienDetail = new PatientDetail(num);
                patienDetail.RefreshDgv += updateDgv;
                patienDetail.ShowDialog();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }