public static int _CreateRootTabs(FI.UI.Web.Controls.Tabs.TabView tv, string UserName, bool UserLoggedIn, bool NavigationEnabled, RootTabsEnum ActiveTab) { int tabId=0; int activeTabId=0; string activeLabelStr=ActiveTab.ToString().Replace("_", " "); if(UserLoggedIn) { tv.EnableLogoutButton=true; tv.LogoutHref="~/Default.aspx?action=Logout"; tv.WelcomeNote=FI.Common.AppConfig.AppName + "-[" + UserName + "]"; } else { tv.EnableLogoutButton=false; tv.WelcomeNote=FI.Common.AppConfig.AppName; } string label=""; string href=""; label=RootTabsEnum.Home.ToString(); href=(NavigationEnabled? "~/Default.aspx?action=Home" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); label=RootTabsEnum.Olap_Reports.ToString().Replace("_", " "); href=(NavigationEnabled? "~/ReportList.aspx?content=List&rpttype=0" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); if(!FI.Common.AppConfig.HideCustomReports) { label=RootTabsEnum.Custom_SQL_Reports.ToString().Replace("_", " "); href=(NavigationEnabled? "~/ReportList.aspx?content=List&rpttype=2" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); label=RootTabsEnum.Custom_MDX_Reports.ToString().Replace("_", " "); href=(NavigationEnabled? "~/ReportList.aspx?content=List&rpttype=3" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); label=RootTabsEnum.Storecheck_Reports.ToString().Replace("_", " "); href=(NavigationEnabled? "~/ReportList.aspx?content=List&rpttype=1" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); } label=RootTabsEnum.Administrative_Tools.ToString().Replace("_", " "); href=(NavigationEnabled? "~/UserList.aspx" : ""); tabId=tv.AddTab(0 , label , href , (activeLabelStr==label) , false); activeTabId=(activeLabelStr==label?tabId:activeTabId); return activeTabId; }
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)); }
private int AddDeliveredTab(FI.UI.Web.Controls.Tabs.TabView tv, int parentId, bool isActive) { string capt=null; if(_report.DataSource==FI.BusinessObjects.StorecheckReport.DataSourceEnum.Deliveries) capt=" Delivered Within " + _report.Days + " Days "; else if(_report.DataSource==FI.BusinessObjects.StorecheckReport.DataSourceEnum.Sales) capt=" Sold Within " + _report.Days + " Days "; else capt=" Transactions Within " + _report.Days + " Days "; return tv.AddTab(parentId , capt , Request.ApplicationPath + "/StorecheckReport/Table.aspx?content=Delivered", isActive , false); }