public ActionResult Index()
 {
     if (AuthValidator.IsAdministrator(Session["Email"].ToString(), Session["Role"].ToString()))
     {
         return(RedirectToAction("AdminIndex", "Home"));
     }
     else
     {
         return(View());
     }
 }
示例#2
0
 // GET: tbl_empoyee
 public ActionResult Index()
 {
     if (AuthValidator.IsAdministrator(Session["Email"].ToString(), Session["Role"].ToString()))
     {
         var tbl_empoyee = db.tbl_empoyee.Include(t => t.tbl_role);
         return(View(tbl_empoyee.ToList()));
     }
     else
     {
         return(RedirectToAction("index", "Login"));
     }
 }