private void CfPExecute_Load(object sender, EventArgs e) { try { var ExecuteStatus = DataEnum.GetEnumData(context, "CF.ExecuteStatus"); ExecuteModeTextEdit.Properties.DataSource = DataEnum.GetEnumData("treatment"); riluePriority.DataSource = DataEnum.GetEnumData(context, "CF.Priority"); repositoryItemExecuteStatusLookUpEdit.DataSource = ExecuteStatus; ExecuteStatusTextEdit.Properties.DataSource = ExecuteStatus; this.AddSysOperLogs(this.Text, OperateStatus.查询); using (SRBase.BaseServiceClient client = new SRBase.BaseServiceClient()) { var ret = client.GetCraftsParameterContrastList(context.SessionID); if (ret.IsSuccess) { rilueParameterName.DataSource = ret.Data; } else { ClsMsg.ShowWarningMsg(ret.Message); } } bgwWait.RunWorkerAsync("LoadTreeData"); } catch (Exception ex) { Utils.Logger.Error(ex.ToString()); ClsMsg.ShowErrMsg(ex.Message); } }
/// <summary> /// 加载数据 /// </summary> /// <param name="e"></param> private void LoadData(DoWorkEventArgs e) { using (SRBase.BaseServiceClient client = new SRBase.BaseServiceClient()) { var ret = client.GetCraftsParameterContrastList(context.SessionID); if (ret.IsSuccess) { e.Result = ret.Data; } else { bgwWait.ReportProgress(PubConstant.WaitMessageStatus.WARNING); } } }