public ActionResult status(tblstatus model) { jobServices _services = new jobServices(); var msg = _services.AddNewStatus(model.StatusName, model.Color); if (msg.Contains("Error")) { ViewData["error"] = msg; return(View(model)); } else { TempData["error"] = msg; return(RedirectToAction("statusList")); } }