private void ShowTabPages(GuideLineLinkItem _gLine) { string[] _guideLineIDs = _gLine.GuideLineID.Split(','); string[] _guideLineTitles = _gLine.ExtendParams.Split(','); this.xtraTabControl1.TabPages.Clear(); using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { for (int i = 0; i < _guideLineIDs.Length; i++) { string _title = (_guideLineTitles.Length > i) ? _guideLineTitles[i] : _gLine.Title; XtraTabPage _tp = this.xtraTabControl1.TabPages.Add(); _tp.Text = _title; string _glid = _guideLineIDs[i]; MD_GuideLine _glDefine = _msc.GetGuideLineByID(_glid); _tp.Tag = _glDefine; SinoSZUC_GuideLineQueryResult _qr = new SinoSZUC_GuideLineQueryResult(); _qr.Dock = DockStyle.Fill; _tp.Controls.Add(_qr); if (i == 0) { this.sinoSZUC_GuideLineDynamicInput21.InitForm(_glDefine); this.sinoSZUC_GuideLineDynamicInput21.WriteParamValue(_gLine.Params); } _qr.QueryFinished += new EventHandler(_qr_QueryFinished); _qr.ShowDetailData += new EventHandler(_qr_ShowDetailData); } if (this.xtraTabControl1.TabPages.Count > 0) { this.xtraTabControl1.SelectedTabPageIndex = 0; } } }
private void navBarControl1_LinkClicked(object sender, NavBarLinkEventArgs e) { if (this.sinoSZUC_GuideLineQueryResult1.IsQuerying) { return; } GuideLineLinkItem _gLine = e.Link.Item.Tag as GuideLineLinkItem; this.xtraTabPage1.Text = _gLine.Title; using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { GuideLineDefine = _msc.GetGuideLineByID(_gLine.GuideLineID); } this.sinoSZUC_GuideLineDynamicInput1.InitForm(GuideLineDefine); this.sinoSZUC_GuideLineDynamicInput1.WriteParamValue(_gLine.Params); if (this.sinoSZUC_GuideLineDynamicInput1.ItemCount > 0) { this.xtraTabPage2.PageVisible = true; } else { this.xtraTabPage2.PageVisible = false; } this.xtraTabControl1.SelectedTabPageIndex = 0; if (this.sinoSZUC_GuideLineDynamicInput1.InputFinised) { QueryParameter = this.sinoSZUC_GuideLineDynamicInput1.GetParamters(); this.sinoSZUC_GuideLineQueryResult1.ShowGuideLineResult(GuideLineDefine, QueryParameter); } this.Cursor = Cursors.WaitCursor; }
public frmGuideLineQueryWithoutInput(string _title, string _guideLineID, string _params, bool _canGroup) { InitializeComponent(); using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { GuideLineDefine = _msc.GetGuideLineByID(_guideLineID); } QueryParameter = MC_GuideLine.CreateQueryParameter(GuideLineDefine, _params); this.sinoSZUC_GuideLineQueryResult1.CanGrouped = _canGroup; this.Text = _title; _initFinished = true; }
public override void Init(string _title, string _menuName, object _param) { this.Text = _title; this._menuPageName = _menuName; Param = _param as string; guideLineID = StrUtils.GetMetaByName2("指标ID", Param); DefalutValueStrings = StrUtils.GetMetaByName2("默认值", Param); MergeColumn = StrUtils.GetMetaByName2("合并列", Param); using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient()) { guideLineDefine = _msc.GetGuideLineByID(guideLineID); } InitForm(); _initFinished = true; RaiseMenuChanged(); }