protected void BackButton_Click(object sender, System.EventArgs e) { _report.Close(false); string reportId = _user.ReportSystem.GetReportTypeCode(_report.GetType()).ToString(); _report = null; Response.Redirect(Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + reportId); }
public void CreateReportTabs(FI.UI.Web.Controls.Tabs.TabView tv, string contentType) { int reportTabId = 0; int rootTabId = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Storecheck_Reports); tv.AddTab(rootTabId, " List ", Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + _report.GetTypeCode().ToString(), false, false); FI.Common.Data.FIDataTable rptTable = _user.ReportSystem.GetReportHeaders(_report.GetType()); foreach (System.Data.DataRow row in rptTable.Rows) { decimal rptId = decimal.Parse(row["id"].ToString()); bool rptSelected = (bool)row["is_selected"]; bool rptOpen = (_report != null && rptId == _report.ID?true:false); string rptName = (string)row["name"]; FI.BusinessObjects.Report.SharingEnum rptSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["sharing_status"].ToString()); FI.BusinessObjects.Report.SharingEnum rptMaxSubscriberSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["max_subscriber_sharing_status"].ToString()); if (rptSelected) { int reportType = _report.GetTypeCode(); reportTabId = tv.AddTab(rootTabId, rptName, Request.ApplicationPath + "/ReportList.aspx?content=Load&action=Open&rptid=" + rptId + "&rpttype=" + reportType.ToString(), rptOpen, false); if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber) { tv.AddImage(reportTabId, "images/share.gif"); } else if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber) { tv.AddImage(reportTabId, "images/share_change.gif"); } else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber) { tv.AddImage(reportTabId, "images/distr.gif"); } else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber) { tv.AddImage(reportTabId, "images/distr_change.gif"); } } } this.AddNotDeliveredTab(tv, reportTabId, (contentType == "NotDelivered"?true:false)); this.AddNeverDeliveredTab(tv, reportTabId, (contentType == "NeverDelivered"?true:false)); this.AddDeliveredTab(tv, reportTabId, (contentType == "Delivered"?true:false)); this.AddDesignTab(tv, reportTabId, (contentType == "" || contentType == null?true:false)); }