public ActionResult RenderItems(int?page, string order)
        {
            string message = (string)TempData["StatusMessage"];

            ViewBag.message = message;

            var options = new TaskFilterOptions()
            {
                Order = string.IsNullOrEmpty(order) ? string.Empty : order.ToLower()
            };

            ViewBag.order = order;

            int pageNo     = page ?? 1;
            int total      = _taskService.Total(options);
            int totalPages = System.Convert.ToInt32(Math.Ceiling((decimal)total / (decimal)10));

            if (totalPages > pageNo)
            {
                ViewBag.Next = (pageNo + 1);
            }

            var model = _taskService.GetAll(options, new PagingSettings()
            {
                PageCount = 10, PageIndex = pageNo
            });

            return(PartialView("Controls/_RenderItems", model));
        }
        public ActionResult Index(string order)
        {
            string message = (string)TempData["StatusMessage"];

            ViewBag.message = message;

            var options = new TaskFilterOptions()
            {
                Order = string.IsNullOrEmpty(order) ? string.Empty : order.ToLower()
            };

            ViewBag.order = order;

            List <Task> model = _taskService.GetAll(options);

            return(View(model));
        }