private void OnDisplayNhanXetKhamLamSangList() { lock (ThisLock) { Result result = NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist(_name); if (result.IsOK) { dgNhanXet.Invoke(new MethodInvoker(delegate() { ClearData(); DataTable dt = result.QueryResult as DataTable; if (_dtTemp == null) { _dtTemp = dt.Clone(); } UpdateChecked(dt); dgNhanXet.DataSource = dt; })); } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist")); } } }
private void InitNhanXet(CoQuan coQuan, ComboBox cboNhanXet) { Result result = NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist((int)coQuan); if (!result.IsOK) { MsgBox.Show(this.Text, result.GetErrorAsString("NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("NhanXetKhamLamSangBus.GetNhanXetKhamLamSangist")); return; } else { DataTable dtNhanXet = result.QueryResult as DataTable; DataRow newRow = dtNhanXet.NewRow(); newRow["NhanXetKhamLamSangGUID"] = Guid.Empty; newRow["NhanXet"] = string.Empty; dtNhanXet.Rows.InsertAt(newRow, 0); cboNhanXet.DataSource = dtNhanXet; } }