private void RefreshParams(string strParams) { string id = this.buttonEdit1.EditValue.ToString(); if (id != null && id != string.Empty) { Dictionary <string, string> _psdict = new Dictionary <string, string>(); foreach (string _s in strParams.Split(';')) { if (_s != null && _s.Trim() != "") { string[] _vs = _s.Split('='); _psdict.Add(_vs[0], _vs[1]); } } glid = id; List <MD_GuideLineDetailParameter> _ret = new List <MD_GuideLineDetailParameter>(); MetaDataServiceClient _mdc = new MetaDataServiceClient(); MD_GuideLine _gl = _mdc.GetGuideLineDefine(id); List <MD_GuideLineParameter> _gParam = MC_GuideLine.GetParametersFromMeta(_gl.GuideLineMeta); foreach (MD_GuideLineParameter _p in _gParam) { if (_psdict.ContainsKey(_p.ParameterName)) { _ret.Add(new MD_GuideLineDetailParameter(_p.ParameterName, _p.DisplayTitle, _p.ParameterType, _psdict[_p.ParameterName])); } else { _ret.Add(new MD_GuideLineDetailParameter(_p.ParameterName, _p.DisplayTitle, _p.ParameterType, "")); } } this.sinoCommonGrid1.DataSource = _ret; } }
private void RefreshParams() { string id = this.buttonEdit1.EditValue.ToString(); if (id != null && id != string.Empty) { glid = id; List <MD_GuideLineDetailParameter> _ret = new List <MD_GuideLineDetailParameter>(); using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { MD_GuideLine _gl = _mdc.GetGuideLineDefine(id); List <MD_GuideLineParameter> _gParam = MC_GuideLine.GetParametersFromMeta(_gl.GuideLineMeta); foreach (MD_GuideLineParameter _p in _gParam) { _ret.Add(new MD_GuideLineDetailParameter(_p.ParameterName, _p.DisplayTitle, _p.ParameterType, "")); } this.sinoCommonGrid1.DataSource = _ret; } } }
private List <MD_GuideLineDetailParameter> InitDetailParm(MD_GuideLineDetailDefine _detailDefine) { using (MetaDataServiceClient _mdc = new MetaDataServiceClient()) { List <MD_GuideLineDetailParameter> _ret = new List <MD_GuideLineDetailParameter>(); switch (_detailDefine.QueryDetailType) { case "查询模型": MD_QueryModel _model = _mdc.GetQueryModelByName(_detailDefine.DetailMethodID); MD_ViewTable _viewTable = _mdc.GetMainTableOfQueryModel(_model.QueryModelID); this.comboBoxEdit1.Properties.Items.Clear(); this.comboBoxEdit1.EditValue = null; foreach (MD_ViewTableColumn _col in _viewTable.Columns) { SelectTableColumn _item = new SelectTableColumn(_col); if (_col.TableColumn.ColumnName == _viewTable.Table.MainKey) { _item.Title += " [主键] "; } this.comboBoxEdit1.Properties.Items.Add(_item); } this.te_Type.EditValue = ""; this.te_Title.EditValue = ""; this.te_Value.EditValue = ""; break; case "指标定义": MD_GuideLine _gl = _mdc.GetGuideLineDefine(_detailDefine.DetailMethodID); List <MD_GuideLineParameter> _gParam = MC_GuideLine.GetParametersFromMeta(_gl.GuideLineMeta); foreach (MD_GuideLineParameter _p in _gParam) { _ret.Add(new MD_GuideLineDetailParameter(_p.ParameterName, _p.DisplayTitle, _p.ParameterType, "")); } break; } return(_ret); } }