Esempio n. 1
0
        public ActionResult Update(int potholeId, string status, string severity, string comment)
        {
            int employeeId = ((User)Session["user"]).UserId;

            //PotholeModel existingPothole = potholeDAL.GetOnePothole(model.PotholeID.ToString());

            if (status == "inspect")
            {
                potholeDAL.UpdateInspectDate(employeeId, potholeId);
            }
            else if (status == "repairStart")
            {
                potholeDAL.UpdateStartRepairDate(potholeId);
            }
            else if (status == "repairEnd")
            {
                potholeDAL.UpdateEndRepairDate(potholeId);
            }

            if (severity != null)
            {
                int intSeverity = Convert.ToInt32(severity);

                potholeDAL.UpdateSeverity(potholeId, intSeverity);
            }

            return(RedirectToAction("Review", "Function"));
        }