Beispiel #1
0
        public ActionResult SiderBar()
        {
            List <Menu> backendMenu = new List <Menu>();

            if ((Session[WebInfo.SysMemSkey] == null ? null : (Request.Cookies["sessionId"] != null ? MemberDAO.Current(Request.Cookies["sessionId"].Value) : null)) == null)
            {
                ViewBag.BackendMenu = backendMenu;
                return(HttpNotFound());

                //return View();
            }
            if (MemberDAO.SysCurrent != null)
            {
                if (PageCache.SiteID == 0)
                {
                    backendMenu         = BackendMenuDAO.GetManagerRoots().ToList();
                    ViewBag.BackendMenu = backendMenu;
                    return(View("Backend/SiderBar"));
                }
                else
                {
                    long               SiteID = PageCache.SiteID;
                    MemberModels       mem    = MemberDAO.SysCurrent;
                    List <MenusModels> mm     = MenusDAO.GetData(SiteID);
                    backendMenu         = BackendMenuDAO.GetRoots(SiteID).ToList();
                    ViewBag.SiteID      = SiteID;
                    ViewBag.MenuList    = mm;
                    ViewBag.BackendMenu = backendMenu;

                    return(View("Backend/SiderBar", new { SiteId = SiteID }));
                }
            }
            ViewBag.BackendMenu = backendMenu;
            return(View());
        }
Beispiel #2
0
 // GET: BackEnd
 public ActionResult Sites()
 {
     ViewBag.Member    = Session[WebInfo.SysMemSkey] == null ? null : (Request.Cookies["sessionId"] != null ? MemberDAO.Current(Request.Cookies["sessionId"].Value) : null);
     ViewBag.UploadUrl = uploadUrl;
     if (ViewBag.Member != null)
     {
         var backendMenu = BackendMenuDAO.GetManagerRoots().ToList();
         ViewBag.BackendMenu = backendMenu;
         return(View());
     }
     else
     {
         Response.Redirect(Url.Action("Login"));
         return(View());
     }
 }
Beispiel #3
0
        public ActionResult mySites()
        {
            ViewBag.Member = Request.Cookies["sessionId"] != null?MemberDAO.Current(Request.Cookies["sessionId"].Value) : null;

            if (ViewBag.Member != null)
            {
                List <WorkV3.Models.SitesModels> mm = WorkV3.Models.DataAccess.SitesDAO.GetDatas();
                var backendMenu = BackendMenuDAO.GetManagerRoots().ToList();
                ViewBag.BackendMenu = backendMenu;
                return(View(mm));
            }
            else
            {
                Response.Redirect(Url.Action("Login"));
                return(View());
            }
        }