/// <summary> /// 发审核公告 /// </summary> private void SendSHMsg() { DataTable _dt; string JY_Info = ""; foreach (MDQuery_TableColumn _tc in this.QueryRequest.MainResultTable.Columns) { string _str = this.CurrentRow[_tc.ColumnAlias].ToString(); JY_Info += string.Format("{0}: {1}", _tc.ColumnTitle, _str); JY_Info += "\r\n"; } string _shyj = GetSHYJ(); SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient(); string _dw = _rsc.GetSjshInfo_HGJS(this.QueryRequest, MainKeyID); string _title = _dw + "数据质量问题"; string _msg = string.Format("{0}存在数据质量问题,修改建议如下:\r\n{2} \r\n\r\n数据概要信息:\r\n{1}", _dw, JY_Info, _shyj); switch (this.xtraTabControl1.SelectedTabPageIndex) { case 0: CreateSHMsg(this.sinoUC_SHInput1, _title, _msg); break; case 1: CreateSHMsg(this.sinoUC_SHInput2, _title, _msg); break; case 2: CreateSHMsg(this.sinoUC_SHInput3, _title, _msg); break; } }
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); } } }
private void ShowData() { using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { List <ReportHisDataRow> _ret = _rsc.GetSjsh_HisData(this.QueryModel.FullQueryModelName, MainKeyID, HisWHXH).ToList <ReportHisDataRow>(); this.gridControl1.DataSource = _ret; } }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { DataSet _ds = _rsc.GetDataCheckBoardList(); MessageList = _ds.Tables[0]; } }
internal void InitForm(List <DataRow> _selectedRows, string _queryModelName, string _mainTableName, string _mainKey) { QueryModelName = _queryModelName; MainTableName = _mainTableName; MainKeyName = _mainKey; using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { CurrentLevel = _rsc.GetUserLevel(); } SelectedRows = _selectedRows; this.sinoUC_SHInput1.SetCurrentSHR(); this.sinoUC_SHInput1.CanEdit = true; }
private bool DoSH(string CurrentJLID, string CurrentLevel, string CurrentID, string _shjg, string _shr, string _xgyj, string CurrentWHXH) { using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { string _ret = _rsc.SaveDataCheckResult(CurrentJLID, CurrentLevel, CurrentID, _shjg, _shr, _xgyj, CurrentWHXH); if (_ret == "-1") { return(false); } else { this.CurrentJLID = _ret; return(true); } } }
protected override bool SaveRule() { MC_QueryRequsetFactory _rf = new MC_QueryRequsetFactory(); _rf.QueryModelName = _queryModel.FullQueryModelName; this.sinoSZUC_ConditionPanel1.InsertConditions2QueryRequest(_rf); string _gzsf = MC_CheckRule.QueryRequestToRule(_rf.GetQueryRequest(), this._queryModel); using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { if (!_rsc.ChangeDataCheckRule(CurrentRule.ID, _gzsf)) { XtraMessageBox.Show("修改算法失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return(false); } return(true); } }
/// <summary> /// 检查规则 /// </summary> /// <param name="_rule"></param> private void CheckRule(MD_CheckRule _rule, MDModel_QueryModel _queryModel) { DataSet _lsdt; MDQuery_Request _request = MC_CheckRule.RuleToQueryRequest(_rule, _queryModel, this.CheckParam.Request); if (_request == null) { return; } using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { _lsdt = _rsc.QueryData(_request); } if (_lsdt != null && _lsdt.Tables.Count > 0) { DataTable _dt = _lsdt.Tables[0]; if (_dt.Rows.Count > 0) { writeRuleCheckRusult(_dt, _rule.RuleName); } } }
public void InitRuleList(string _qv) { DataSet _ds; QueryModelName = _qv; using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { _ds = _rsc.GetRuleList(QueryModelName); } if (_ds != null && _ds.Tables.Count > 0) { RuleList = _ds.Tables[0]; RuleList.Columns.Add("STATE", typeof(bool)); foreach (DataRow _dr in RuleList.Rows) { _dr["STATE"] = false; } RuleList.AcceptChanges(); this.gridControl1.DataSource = RuleList; } }
private List <MD_CheckRule> GetRuleList() { CurrencyManager cm_Meta2 = (CurrencyManager)this.BindingContext[_ruleList, ""]; cm_Meta2.EndCurrentEdit(); this.sinoCommonGrid1.MainView.PostEditor(); List <MD_CheckRule> _ret = new List <MD_CheckRule>(); foreach (MD_CheckRule _rule in _ruleList) { if (_rule.State) { _ret.Add(_rule); } } using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { //_rsc.SaveCheckRuleState(this.QueryModelName, _ret); } return(_ret); }
/// <summary> /// 查询记录 /// </summary> private DataTable QueryRecord() { SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient(); return(_rsc.QueryDataWithWHXH(this.CheckParam.Request, this.CheckParam.DWDM)); }
public void ImportRule(IApplication _application) { Dialog_ImportRules _frm = new Dialog_ImportRules(); _frm.InitRuleList(this._queryModel.FullQueryModelName); if (_frm.ShowDialog() == DialogResult.OK) { List <DataRow> _ret = _frm.SelectedRules; if (_ret.Count > 0) { using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { foreach (DataRow _row in _ret) { MD_CheckRule _findRule = null; string _gzmc = _row["GZMC"].ToString(); if (FindRule(_gzmc, ref _findRule)) { if (XtraMessageBox.Show(string.Format("规则{0}已经存在,是否覆盖?", _gzmc), "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { _rsc.RecoverRuleDefine(_findRule.ID, _row["ID"].ToString()); //刷新规则列表 RefreshRuleList(true); } } else { _rsc.ImportRule(_row["ID"].ToString()); //刷新规则列表 RefreshRuleList(true); } } } } } }
public void DelRule(IApplication _application) { if (RuleSelected) { int _index = this.gridView1.FocusedRowHandle; MD_CheckRule _selectRule = this.gridView1.GetRow(_index) as MD_CheckRule; using (SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient _rsc = new SinoSZClientBase.MetaDataQueryService.MetaDataQueryServiceClient()) { if (_rsc.DelDataCheckRule(_selectRule.ID)) { //刷新规则列表 RefreshRuleList(true); } else { XtraMessageBox.Show("删除规则失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } }