Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.InitComponts();
            ////////////////////调试用,自定义的数据授权
#if DEBUG
            List <string> m_DataValidIdItems = new List <string>()
            {
                "zc_nxjc_byc_byf", "zc_nxjc_qtx", "zc_nxjc_tsc_tsf", "zc_nxjc_ychc"
            };
            AddDataValidIdGroup("ProductionOrganization", m_DataValidIdItems);
            mPageOpPermission = "1111";
#elif RELEASE
#endif
            this.OrganisationTree_ProductionLine.Organizations = GetDataValidIdGroup("ProductionOrganization");             //向web用户控件传递数据授权参数
            this.OrganisationTree_ProductionLine.PageName      = "HistoryAmmeterQuery.aspx";                                //向web用户控件传递当前调用的页面名称
            this.OrganisationTree_ProductionLine.LeveDepth     = 5;
            if (!IsPostBack)
            {
            }
            //以下是接收js脚本中post过来的参数
            string m_FunctionName = Request.Form["myFunctionName"] == null ? "" : Request.Form["myFunctionName"].ToString();             //方法名称,调用后台不同的方法
            string m_Parameter1   = Request.Form["myParameter1"] == null ? "" : Request.Form["myParameter1"].ToString();                 //方法的参数名称1
            string m_Parameter2   = Request.Form["myParameter2"] == null ? "" : Request.Form["myParameter2"].ToString();                 //方法的参数名称2
            if (m_FunctionName == "ExcelStream")
            {
                //ExportFile("xls", "导出报表1.xls");
                //string[] m_TagData = new string[] { "10月份", "报表类型:历史表", "汇总人:某某某", "审批人:某某某" };
                string[] m_TagData  = new string[] { };
                string   m_HtmlData = StatisticalReportHelper.CreateExportHtmlTable(mFileRootPath +
                                                                                    REPORT_TEMPLATE_PATH, myDataTable, m_TagData);
                StatisticalReportHelper.ExportExcelFile("xls", "电表历史数据.xls", m_HtmlData);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            base.InitComponts();
            ////////////////////调试用,自定义的数据授权
#if DEBUG
            List <string> m_DataValidIdItems = new List <string>()
            {
                "zc_nxjc_byc_byf", "zc_nxjc_qtx", "zc_nxjc_tsc_tsf", "zc_nxjc_ychc"
            };
            AddDataValidIdGroup("ProductionOrganization", m_DataValidIdItems);
            mPageOpPermission = "1111";
#elif RELEASE
#endif
            this.OrganisationTree_ProductionLine.Organizations = GetDataValidIdGroup("ProductionOrganization");                //向web用户控件传递数据授权参数
            this.OrganisationTree_ProductionLine.PageName      = "CenterControlRecordLog.aspx";                                //向web用户控件传递当前调用的页面名称
            this.OrganisationTree_ProductionLine.LeveDepth     = 5;
            if (!IsPostBack)
            {
            }
            //以下是接收js脚本中post过来的参数
            ///以下是接收js脚本中post过来的参数
            string m_FunctionName = Request.Form["myFunctionName"] == null ? "" : Request.Form["myFunctionName"].ToString();             //方法名称,调用后台不同的方法
            string m_Parameter1   = Request.Form["myParameter1"] == null ? "" : Request.Form["myParameter1"].ToString();                 //方法的参数名称1
            string m_Parameter2   = Request.Form["myParameter2"] == null ? "" : Request.Form["myParameter2"].ToString();                 //方法的参数名称2
            if (m_FunctionName == "ExcelStream")
            {
                //ExportFile("xls", "导出报表1.xls");
                string m_ExportTable = m_Parameter1.Replace("&lt;", "<");
                m_ExportTable = m_ExportTable.Replace("&gt;", ">");
                StatisticalReportHelper.ExportExcelFile("xls", m_Parameter2 + "中控记录版本日志.xls", m_ExportTable);
            }
        }