Esempio n. 1
0
        // GET: UserManager
        public ActionResult Index(int?page)
        {
            // Show message
            if (Session["mes"] != null)
            {
                ViewBag.message = Session["mes"];
                Session.Remove("mes");
            }
            if (Session["mes_er"] != null)
            {
                ViewBag.message_er = Session["mes_er"];
                Session.Remove("mes_er");
            }

            ViewBag.Active = "manager";
            CustomPrincipal prin     = (CustomPrincipal)User;
            IPagedList      ListUser = null;

            if (prin.ROLE.Equals(ConstanAppkey.ADMIN()))
            {
                ListUser = userModels.GetItems(page ?? 1, ConstanAppkey.PAGESIZE());
            }
            else if (prin.ROLE.Equals(ConstanAppkey.MOD()))
            {
                ListUser = userModels.GetItemsMod(page ?? 1, ConstanAppkey.PAGESIZE(), prin);
            }
            return(View(ListUser));
        }