Beispiel #1
0
        protected override object[] LoadDataSource(int inclusive, int exclusive)
        {
            string strValue = this.drpRptId.SelectedValue;

            if (rptFacade == null)
            {
                rptFacade = new ReportViewFacade(this.DataProvider);
            }
            object objEntry = rptFacade.GetRptViewEntry(strValue);

            if (objEntry != null)
            {
                RptViewEntry entry = (RptViewEntry)objEntry;
                if (entry.EntryType == ReportEntryType.Report && entry.ReportID != "")
                {
                    RptViewUserDefault objDef = (RptViewUserDefault)rptFacade.GetRptViewUserDefault(this.GetUserCode());
                    this.chkReportAsDefault.Checked = false;
                    if (objDef != null && objDef.DefaultReportID == entry.ReportID)
                    {
                        this.chkReportAsDefault.Checked = true;
                    }

                    object[] objs = rptFacade.GetNeedInputByReportId(entry.ReportID, this.GetUserCode());
                    this.pagerToolBar.RowCount = objs.Length;
                    return(objs);
                }
            }
            this.chkReportAsDefault.Checked = false;
            this.pagerToolBar.RowCount      = 0;
            return(null);
        }
Beispiel #2
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);
            }
        }