private void OnDisplayHopDongList() { Result result = CompanyContractBus.GetContractList(); if (result.IsOK) { MethodInvoker method = delegate { cboMaHopDong.DataSource = result.QueryResult; }; if (InvokeRequired) { BeginInvoke(method); } else { method.Invoke(); } } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("CompanyContractBus.GetNoCompletedContractList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetNoCompletedContractList")); } }
private void OnDisplayContractList() { lock (ThisLock) { Result result = CompanyContractBus.GetContractList(_name, _isMaHopDong); if (result.IsOK) { dgContract.Invoke(new MethodInvoker(delegate() { ClearData(); DataTable dt = result.QueryResult as DataTable; if (_dtTemp == null) { _dtTemp = dt.Clone(); } UpdateChecked(dt); dgContract.DataSource = dt; })); } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("CompanyContractBus.GetContractList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetContractList")); } } }
private void OnDisplayHopDongList() { Result result = CompanyContractBus.GetContractList(); if (result.IsOK) { cboMaHopDong.DataSource = result.QueryResult as DataTable; } else { MsgBox.Show(this.Text, result.GetErrorAsString("CompanyContractBus.GetContractList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetContractList")); } }
public void DisplayAsThread() { UpdateGUI(); Result result = CompanyContractBus.GetContractList(); if (result.IsOK) { DataTable dtContract = result.QueryResult as DataTable; cboHopDong.DataSource = dtContract; } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("CompanyContractBus.GetContractList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetContractList")); } }
public void DisplayComboHopDong() { Result result = CompanyContractBus.GetContractList(); if (result.IsOK) { DataTable dt = result.QueryResult as DataTable; DataRow newRow = dt.NewRow(); newRow["CompanyContractGUID"] = Guid.Empty.ToString(); newRow["ContractName"] = string.Empty; dt.Rows.InsertAt(newRow, 0); cboMaHopDong.DataSource = dt; } else { MsgBox.Show(Application.ProductName, result.GetErrorAsString("CompanyContractBus.GetNoCompletedContractList"), IconType.Error); Utility.WriteToTraceLog(result.GetErrorAsString("CompanyContractBus.GetNoCompletedContractList")); } }