Esempio n. 1
0
        /// <summary>
        /// 报告加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ReportView_Load(object sender, System.EventArgs e)
        {
            ReportViewModel reportViewModel = new ReportViewModel(this.context);

            Dictionary <string, object> paramDic = reportViewModel.GetParamDic(this.uiEvent, this.ent4BannerDTO);

            if (!paramDic.ContainsKey("funCode"))
            {
                BizAssMessageBoxUtil.ShowWarningMsg("加载报告时未获取到功能节点编码!");
                return;
            }

            string funCode = paramDic["funCode"] as string;

            paramDic.Remove("funCode");
            Control ctrl = XapEvents.GetFuncEvent(this, new GetFuncEventArgs(funCode, paramDic));
            // XCefWebBrowser webBrower = ctrl as XCefWebBrowser;

            EmbedControl webBrower = ctrl as EmbedControl;



            string title = MenuItemController.GetInstance().FuncIdAndNameMapper[funCode];

            StringBuilder msgBuilder = new StringBuilder();
            string        url        = webBrower.Arguments;

            msgBuilder.Append("打开节点[" + title + "];节点编码:" + funCode + " ; 请求地址:" + url);
            string logMsg = LogManagerUtil.GetEnInfo(msgBuilder.ToString(), this.ent4BannerDTO);

            LogManager.GetLogger().InfoEx(logMsg);

            this.Text = title;
            ctrl.Dock = DockStyle.Fill;
            this.AddRender(ctrl);
        }