Ejemplo n.º 1
0
 public ActionResult List(int page)
 {
     if (Session["UserLogin"] != null)
     {
         UserLogin        em = (UserLogin)Session["UserLogin"];
         AuthorizationDao au = new AuthorizationDao();
         if (au.CheckAccess(em.GroupEmployeeID, 9) == true)
         {
             //OrderDao order_dao = new OrderDao();
             //IEnumerable<Order> list = order_dao.ListOrder();
             //return View("List", list);
             OrderDao            order_dao = new OrderDao();
             IEnumerable <Order> list      = order_dao.ListOrder_Paging(page, 10);
             ViewBag.Count        = order_dao.CountOrder();
             ViewBag.RequiredPage = page;
             return(View("List", list));
         }
         else
         {
             return(RedirectToAction("Error", "Error"));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login", new { Area = "" }));
     }
 }