Esempio n. 1
0
        private List <Navigator> Build_Navigator(List <Navigator> list, string PageIndexID, string RootPageIndexID)
        {
            MySQL_DataConn myDP = new MySQL_DataConn(ConfigurationManager.ConnectionStrings["e2CMS"].ConnectionString);

            DataRow myDR = myDP.Get_Navigator(PageIndexID);

            Navigator myNavigator = new Navigator(myDR);

            if (DataEval.IsEmptyQuery(myNavigator.PageIndexID))
            {
                return(list);
            }
            else
            {
                if (myNavigator.PageIndexID == "-1" ||
                    myNavigator.Parent_PageIndexID == "-1" ||
                    myNavigator.PageIndexID == RootPageIndexID)
                {
                    list.Insert(0, myNavigator);
                    return(list);
                }
                else
                {
                    list.Insert(0, myNavigator);
                    return(Build_Navigator(list, myNavigator.Parent_PageIndexID, RootPageIndexID));
                }
            }
        }
Esempio n. 2
0
        public Navigator Get_Navigator_Home(string PageIndexID)
        {
            MySQL_DataConn myDP = new MySQL_DataConn(ConfigurationManager.ConnectionStrings["e2CMS"].ConnectionString);

            DataRow myDR = myDP.Get_Navigator(PageIndexID);

            return(new Navigator(myDR));
        }
Esempio n. 3
0
        public List <Menu> Get_Menu(string PageIndexID, bool DisplaySameLevel, bool DisplayCategory)
        {
            MySQL_DataConn myDP = new MySQL_DataConn(ConfigurationManager.ConnectionStrings["e2CMS"].ConnectionString);

            DataSet myDS = myDP.Get_Menu(PageIndexID, DisplaySameLevel, DisplayCategory);

            List <Menu> list = new List <Menu>();

            foreach (DataRow myDR in myDS.Tables[0].Rows)
            {
                list.Add(new Menu(myDR));
            }

            return(list);
        }