private void OnEditChiDinh() { if (_isChuyenBenhAn) { return; } if (dgChiTiet.SelectedRows == null || dgChiTiet.SelectedRows.Count <= 0) { MsgBox.Show(Application.ProductName, "Vui lòng chọn 1 chỉ định.", IconType.Information); return; } DataRow drChiDinh = (dgChiTiet.SelectedRows[0].DataBoundItem as DataRowView).Row; Result result = ChiDinhBus.GetChiTietChiDinhList(drChiDinh["ChiDinhGUID"].ToString()); if (result.IsOK) { DataTable dtChiTiet = result.QueryResult as DataTable; dlgAddChiDinh dlg = new dlgAddChiDinh(_patientRow, drChiDinh, dtChiTiet, _dtDichVuChiDinh); if (dlg.ShowDialog(this) == DialogResult.OK) { DisplayAsThread(); } } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("ChiDinhBus.GetChiTietChiDinhList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("ChiDinhBus.GetChiTietChiDinhList")); return; } }
private void OnAddChiDinh() { dlgAddChiDinh dlg = new dlgAddChiDinh(_patientRow); dlg.OnAddChiDinhEvent += new AddChiDinhHandler(dlg_OnAddChiDinhEvent); dlg.ShowDialog(this); }