private void OnDisplayTrieuChungList() { lock (ThisLock) { Result result = SymptomBus.GetSymptomList(_name, _type); if (result.IsOK) { dgSymptom.Invoke(new MethodInvoker(delegate() { ClearData(); DataTable dt = result.QueryResult as DataTable; if (_dtTemp == null) { _dtTemp = dt.Clone(); } UpdateChecked(dt); dgSymptom.DataSource = dt; })); } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("ThuocBus.GetThuocList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("ThuocBus.GetThuocList")); } } }
private void InitData() { dtpkNgay.Value = DateTime.Now; //DocStaff List <byte> staffTypes = new List <byte>(); staffTypes.Add((byte)StaffType.BacSi); staffTypes.Add((byte)StaffType.BacSiSieuAm); staffTypes.Add((byte)StaffType.BacSiNgoaiTongQuat); staffTypes.Add((byte)StaffType.BacSiNoiTongQuat); staffTypes.Add((byte)StaffType.BacSiPhuKhoa); Result result = DocStaffBus.GetDocStaffList(staffTypes); if (!result.IsOK) { MsgBox.Show(this.Text, result.GetErrorAsString("DocStaffBus.GetDocStaffList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("DocStaffBus.GetDocStaffList")); return; } else { cboDocStaff.DataSource = result.QueryResult; } if (Global.StaffType == StaffType.BacSi || Global.StaffType == StaffType.BacSiSieuAm || Global.StaffType == StaffType.BacSiNgoaiTongQuat || Global.StaffType == StaffType.BacSiNoiTongQuat || Global.StaffType == StaffType.BacSiPhuKhoa) { cboDocStaff.SelectedValue = Global.UserGUID; cboDocStaff.Enabled = false; } //Symptom result = SymptomBus.GetSymptomList(); if (!result.IsOK) { MsgBox.Show(this.Text, result.GetErrorAsString("SymptomBus.GetSymptomList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("SymptomBus.GetSymptomList")); return; } else { cboTrieuChung.DataSource = result.QueryResult; } }