示例#1
0
        private void CreateInputField()
        {
            if (this.ReportID == "")
            {
                return;
            }
            if (rptFacade == null)
            {
                rptFacade = new ReportViewFacade(this.DataProvider);
            }
            designMain = (RptViewDesignMain)rptFacade.GetRptViewDesignMain(this.ReportID);
            if (designMain == null)
            {
                return;
            }
            if (this.GetRequestParam("preview") != "1")
            {
                if (designMain.Status != ReportDesignStatus.Publish)
                {
                    return;
                }
            }
            if (this.IsPostBack == false && this.GetRequestParam("preview") != "1")
            {
                if (CheckAccessReportRight() == false)
                {
                    return;
                }
            }

            RptViewUserSubscription[] userSubscr = rptFacade.GetNeedInputByReportId(this.ReportID, this.GetUserCode());

            RptViewFilterUI[] filterUI = rptFacade.GetRptViewFilterUIByReportId(this.ReportID);

            // 添加控件
            this.tbInput.Rows.Clear();
            for (int i = 0; i < userSubscr.Length;)
            {
                HtmlTableRow row = new HtmlTableRow();
                for (int n = 0; n < 3; n++)
                {
                    if (i <= userSubscr.Length - 1)
                    {
                        if (userSubscr[i].InputValue == "")
                        {
                            existNeedInputField = true;
                        }
                        HtmlTableCell[] cells = GenerateCell(userSubscr[i], filterUI);
                        row.Cells.Add(cells[0]);
                        row.Cells.Add(cells[1]);
                        i++;
                    }
                }
                this.tbInput.Rows.Add(row);
            }
        }