Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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("_", " ");
            string homeLabel      = RootTabsEnum.Home.ToString();

            //tv.WelcomeNote = FI.Common.AppConfig.AppName;

            //if(UserLoggedIn)
            //{
            //    //tv.EnableLogoutButton=true;
            //    //tv.LogoutHref="~/Default.aspx?action=Logout";
            //    tv.WelcomeNote = FI.Common.AppConfig.AppName; // +"-[" + UserName + "]";
            //    homeLabel = "Home: " + UserName;
            //}
            //else
            //{
            //    //tv.EnableLogoutButton=false;
            //    tv.WelcomeNote=FI.Common.AppConfig.AppName;
            //}

            if (UserLoggedIn)
            {
                homeLabel = "Home: " + UserName;
            }

            string label = "";
            string href  = "";

            label       = RootTabsEnum.Home.ToString();
            href        = (NavigationEnabled? "~/Default.aspx?action=Home" : "");
            tabId       = tv.AddTab(0, homeLabel, 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);
        }
Ejemplo n.º 3
0
 protected int CreateRootTabs(FI.UI.Web.Controls.Tabs.TabView tv, string UserName, bool UserLoggedIn, bool NavigationEnabled, RootTabsEnum ActiveTab)
 {
     int ret=_CreateRootTabs(tv, UserName, UserLoggedIn, NavigationEnabled, ActiveTab);
     tv.CssStyleNum=_user.CssStyle;
     return ret;
 }
Ejemplo n.º 4
0
        protected int CreateRootTabs(FI.UI.Web.Controls.Tabs.TabView tv, string UserName, bool UserLoggedIn, bool NavigationEnabled, RootTabsEnum ActiveTab)
        {
            int ret = _CreateRootTabs(tv, UserName, UserLoggedIn, NavigationEnabled, ActiveTab);

            tv.CssStyleNum = _user.CssStyle;
            return(ret);
        }