示例#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);
        }
示例#2
0
        protected override object GetEditObject(GridRecord row)
        {
            if (this._facade == null)
            {
                this._facade = new ReportViewFacade(this.DataProvider);
            }
            object obj = _facade.GetRptViewEntry(row.Items.FindItemByKey("RptEntryCode").Text.ToString());

            if (obj != null)
            {
                return((RptViewEntry)obj);
            }

            return(null);
        }