Beispiel #1
0
 private void dataGridViewTaiKhoan_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         int r = dataGridViewTaiKhoan.CurrentCell.RowIndex;
         txtMaNhanVien.Text = dataGridViewTaiKhoan.Rows[r].Cells[0].Value.ToString();
         txtTenNV.Text      = dataGridViewTaiKhoan.Rows[r].Cells[1].Value.ToString();
         txtTenDN.Text      = dataGridViewTaiKhoan.Rows[r].Cells[2].Value.ToString();
         string a = dataGridViewTaiKhoan.Rows[r].Cells[3].Value.ToString();
         txtMK.Text = qltk.LayMK(txtTenDN.Text);
         if (a == "Quản lí")
         {
             radioButtonQuanLi.Checked = true;
         }
         else
         {
             radioButtonNhanVien.Checked = true;
         }
         cbbTrangThai.Text = dataGridViewTaiKhoan.Rows[r].Cells[4].Value.ToString();
     }
     catch
     {
     }
 }