예제 #1
0
        public ActionResult Review(string option)
        {
            if (((User)Session["user"]) == null || ((User)Session["user"]).UserType.ToLower() != "e")
            {
                return(RedirectToAction("Index", "Home"));
            }

            List <PotholeModel> model = potholeDAL.GetAllPotholes();

            if (option == "uninspected")
            {
                model = potholeDAL.GetPotholesUninspected();
            }
            else if (option == "inspected")
            {
                model = potholeDAL.GetInspectedOnly();
            }
            else if (option == "inRepair")
            {
                model = potholeDAL.GetRepairsInProgress();
            }
            else if (option == "complete")
            {
                model = potholeDAL.GetRepairedPotholes();
            }

            return(View("Review", model));
        }