private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { DataTable _maindt; //取模型数据 ResultDs = new DataSet(); using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { _maindt = _rsc.GetMainTableDataByKey(this.QueryRequest.QueryModelName, this.QueryModel.MainTable.TableName, this.MainKeyID); _maindt.TableName = this.QueryModel.MainTable.TableName; ResultDs.Tables.Add(_maindt); foreach (MDModel_Table _ct in this.QueryModel.ChildTableDict.Values) { DataTable _dt = _rsc.GetChildTableDataByKey(this.QueryRequest.QueryModelName, _ct.TableName, this.MainKeyID); _dt.TableName = _ct.TableName; ResultDs.Tables.Add(_dt); } //取用户级别 UserLevel = _rsc.GetUserLevel(); //取审核数据 SHData = _rsc.GetDataCheckInfo(this.QueryRequest.QueryModelName, this.MainKeyID, ref SHID); CurrentWHXH = _rsc.GetDataCheckWHXH(QueryModel.MainTable.TableName, QueryModel.MainTable.TableDefine.Table.MainKey, this.MainKeyID); } }
private void simpleButton1_Click(object sender, EventArgs e) { string _msg = ""; using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { if (this.sinoUC_SHInput1.CheckInput(ref _msg)) { foreach (DataRow _dr in this.SelectedRows) { string _mainkeyId = _dr["MAINID"].ToString(); string CurrentWHXH = _rsc.GetDataCheckWHXH(MainTableName, MainKeyName, _mainkeyId); string SHID = ""; string SHJLID = _rsc.GetDataCheckInfoJLID(QueryModelName, _mainkeyId, this.CurrentLevel, ref SHID); bool _ret = this.sinoUC_SHInput1.ShData(_dr, CurrentWHXH, this.CurrentLevel, SHID, SHJLID); if (_ret) { _dr["GX_STATE"] = 0; } } this.DialogResult = DialogResult.Cancel; this.Close(); } else { XtraMessageBox.Show(_msg, "ϵͳÌáʾ", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }