Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        public override void Init(string _title, string _menuName, object _param)
        {
            this.Text = _title;
            Param     = _param.ToString();
            string _queryViewNames = StrUtils.GetMetaByName("查询模型", Param).Trim();

            if (_queryViewNames != "")
            {
                foreach (string _qvName in _queryViewNames.Split(','))
                {
                    if (!ModelNameList.Contains(_qvName))
                    {
                        ModelNameList.Add(_qvName);
                        using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
                        {
                            ModelDict.Add(_qvName, _mdc.GetQueryModelByName(_qvName));
                        }
                    }
                }
            }
            InitTree();
            this._initFinished = true;
            RaiseMenuChanged();
        }