private void btnChonBenhNhan_Click(object sender, EventArgs e) { dlgSelectPatient dlg = new dlgSelectPatient(PatientSearchType.BenhNhan); if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { DataRow patientRow = dlg.PatientRow; if (patientRow != null) { txtBenhNhan.Tag = patientRow["PatientGUID"].ToString(); txtBenhNhan.Text = patientRow["FullName"].ToString(); } } }
private void dgBenhNhanNgoaiGoiKham_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 3 && e.RowIndex >= 0) { dlgSelectPatient dlg = new dlgSelectPatient(PatientSearchType.BenhNhan); if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { string patientGUID = dlg.PatientRow["PatientGUID"].ToString(); string tenBenhNhan = dlg.PatientRow["FullName"].ToString(); dgBenhNhanNgoaiGoiKham.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = tenBenhNhan; dgBenhNhanNgoaiGoiKham.Rows[e.RowIndex].Cells["PatientGUID"].Value = patientGUID; } } }
private void btnChonBenhNhan_Click(object sender, EventArgs e) { dlgSelectPatient dlg = new dlgSelectPatient(PatientSearchType.BenhNhan); if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { DataRow patientRow = dlg.PatientRow; if (patientRow != null) { txtTenKhachHang.Tag = patientRow["PatientGUID"].ToString(); txtTenKhachHang.Text = patientRow["FullName"].ToString(); txtSoDienThoai.Text = patientRow["Mobile"].ToString(); txtDiaChi.Text = patientRow["Address"].ToString(); txtMaKhachHang.Text = patientRow["FileNum"].ToString(); } } }
private void btnChonBenhNhan_Click(object sender, EventArgs e) { dlgSelectPatient dlg = new dlgSelectPatient(PatientSearchType.BenhNhan); if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { _patientRow = dlg.PatientRow; if (_patientRow != null) { txtTenBenhNhan.Tag = _patientRow["PatientGUID"].ToString(); txtTenBenhNhan.Text = _patientRow["FullName"].ToString(); txtNgaySinh.Text = _patientRow["DobStr"].ToString(); txtGioiTinh.Text = _patientRow["GenderAsStr"].ToString(); txtDienThoai.Text = _patientRow["Mobile"].ToString(); txtDiaChi.Text = _patientRow["Address"].ToString(); } } }