public ActionResult DeleteOrder(int id) { Category category = new Category(); ViewBag.Category = category.GetCategories(); AdminOrder adminOrder = new AdminOrder(); adminOrder.DeleteOrder(id); var data = adminOrder.GetOrders(); return(PartialView(data)); }
// GET: AdminOrders public ActionResult Index(int?page) { Category category = new Category(); ViewBag.Category = category.GetCategories(); AdminOrder adminOrder = new AdminOrder(); var data = adminOrder.GetOrders(); int pageSize = 10; int pageNumber = (page ?? 1); return(View(data.ToPagedList(pageNumber, pageSize))); }