コード例 #1
0
        /// <summary>
        /// 显示查询模型方式的详细信息
        /// </summary>
        /// <param name="_df"></param>
        /// <param name="_dr"></param>
        private void ShowDetailByQueryModel(MD_GuideLineDetailDefine _df, DataRow _dr)
        {
            //取链接明细参数定义
            List <MD_GuideLineDetailParameter> _detailParamList = MC_GuideLine.GetGuideLineDetailParam(_df.DetailParameterMeta);
            MD_GuideLineDetailParameter        _param           = _detailParamList[0];
            string             _data = ReplaceVerByRowData(_dr, _param.DataValue);
            ShowDetailDataArgs _args = new ShowDetailDataArgs(_df.DetailMethodID, _param.Name, _data);

            RaiseShowDetailDatal(_args);
        }
コード例 #2
0
        /// <summary>
        /// 以指标方式显示详细信息
        /// </summary>
        /// <param name="_df"></param>
        /// <param name="_dr"></param>
        private void ShowDetailByGuideLine(MD_GuideLineDetailDefine _df, DataRow _dr)
        {
            MDQuery_GuideLineParameter _param;
            List <MD_GuideLine>        _gls;
            string _guideLineID = _df.DetailMethodID;

            using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient())
            {
                _gls = _msc.GetRootGuideLineList(_guideLineID).ToList <MD_GuideLine>();
            }

            //取链接明细参数定义
            List <MD_GuideLineDetailParameter> _detailParamList = MC_GuideLine.GetGuideLineDetailParam(_df.DetailParameterMeta);
            Dictionary <string, string>        _detailParamDict = new Dictionary <string, string>();

            foreach (MD_GuideLineDetailParameter _dparam in _detailParamList)
            {
                _detailParamDict.Add(_dparam.Name, _dparam.DataValue);
            }

            if (_gls.Count > 0)
            {
                //取指标
                MD_GuideLine _guideLine = _gls[0];

                //建立查询参数
                List <MDQuery_GuideLineParameter> _queryParams = new List <MDQuery_GuideLineParameter>();

                //建立指标参数字典
                List <MD_GuideLineParameter> _gParam = MC_GuideLine.GetParametersFromMeta(_guideLine.GuideLineMeta);
                foreach (MD_GuideLineParameter _p in _gParam)
                {
                    if (_detailParamDict.ContainsKey(_p.ParameterName))
                    {
                        string _dataDefine = _detailParamDict[_p.ParameterName];
                        string _data       = ReplaceVerByRowData(_dr, _dataDefine);
                        _param = new MDQuery_GuideLineParameter(_p, _data);
                        _queryParams.Add(_param);
                    }
                    else
                    {
                        XtraMessageBox.Show("缺少参数定义!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
                RaiseShowDetailDatal(new ShowDetailDataArgs(_guideLine, _queryParams));
            }
        }
コード例 #3
0
        public Dialog_EditGuideLineDetailParam(MD_GuideLineDetailDefine _detailDefine)
        {
            InitializeComponent();
            if (_detailDefine.DetailMethodID == "" && _detailDefine.QueryDetailType != "其它")
            {
                return;
            }
            DetailDefine = _detailDefine;
            switch (_detailDefine.QueryDetailType)
            {
            case "查询模型":
                this.panelQueryModel.Visible = true;
                this.panelGuideLine.Visible  = false;
                this.panelOther.Visible      = false;
                this.panelQueryModel.BringToFront();
                InitDetailParm(_detailDefine);
                if (_detailDefine.DetailParameterMeta != null && _detailDefine.DetailParameterMeta != "")
                {
                    DetailParam = MC_GuideLine.GetGuideLineDetailParam(_detailDefine.DetailParameterMeta);
                    MD_GuideLineDetailParameter _p = DetailParam[0];
                    int _selectedIndex             = -1;
                    for (int i = 0; i < this.comboBoxEdit1.Properties.Items.Count; i++)
                    {
                        SelectTableColumn _stc = this.comboBoxEdit1.Properties.Items[i] as SelectTableColumn;
                        if (_stc.Column.TableColumn.ColumnName == _p.Name)
                        {
                            _selectedIndex = i;
                            break;
                        }
                    }
                    if (_selectedIndex >= 0)
                    {
                        this.comboBoxEdit1.SelectedIndex = _selectedIndex;
                    }
                    this.te_Value.EditValue = _p.DataValue;
                }
                break;

            case "指标定义":
                this.panelQueryModel.Visible = false;
                this.panelGuideLine.Visible  = true;
                this.panelOther.Visible      = false;
                this.panelGuideLine.BringToFront();
                if (_detailDefine.DetailParameterMeta != null && _detailDefine.DetailParameterMeta != "")
                {
                    DetailParam = MC_GuideLine.GetGuideLineDetailParam(_detailDefine.DetailParameterMeta);
                }
                else
                {
                    DetailParam = InitDetailParm(_detailDefine);
                }
                this.sinoCommonGrid1.DataSource = DetailParam;
                break;

            case "其它":
                this.panelGuideLine.Visible  = false;
                this.panelQueryModel.Visible = false;
                this.panelOther.Visible      = true;
                this.panelOther.BringToFront();
                if (_detailDefine.DetailParameterMeta != null && _detailDefine.DetailParameterMeta != "")
                {
                    this.memoEdit1.EditValue = _detailDefine.DetailParameterMeta;
                }
                break;
            }
        }