//
        // GET: /Dispatch/

        public ActionResult Index(int?page)
        {
            if (page.HasValue)
            {
                ViewBag.Page = page;
                return(View(DispatchDAO.List(page.Value)));
            }
            else
            {
                ViewBag.Page = page;
                Boolean disablePaging = false;
                Boolean.TryParse(ConfigurationManager.AppSettings["DisablePaging"].ToString(), out disablePaging);

                if (disablePaging == false)
                {
                    return(RedirectToAction("Index", new { @page = 0 }));
                }
                else
                {
                    return(View(DispatchDAO.List()));
                }
            }
        }