private void OnAdd() { dlgAddCanDo dlg = new dlgAddCanDo(_patientGUID); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }
private void OnEdit() { if (dgCanDo.SelectedRows == null || dgCanDo.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 cân đo.", IconType.Information); return; } DataRow drCanDo = (dgCanDo.SelectedRows[0].DataBoundItem as DataRowView).Row; bool allowEdit = _isChuyenBenhAn ? false : Global.AllowEditCanDo; dlgAddCanDo dlg = new dlgAddCanDo(_patientGUID, drCanDo, allowEdit); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } }