public ActionResult ConfirmProject(int Id) { ViewBag.EnquiryID = Id; TempData["EnquiryIDClient"] = Id; Project p = new Project(); p.EnquiryID = Id; BusinessFlow.Controllers.ProjectsController pdc = new ProjectsController(); try { pdc.Create(p); new JavaScriptResult { Script = "alert('You are done!');" }; } catch { return(new JavaScriptResult { Script = "alert('You are not done!');" }); } return(View()); }
public ActionResult ConfirmProject(int Id) { ViewBag.EnquiryID = Id; TempData["EnquiryIDClient"] = Id; Project p = new Project(); p.EnquiryID = Id; BusinessFlow.Controllers.ProjectsController pdc = new ProjectsController(); try { pdc.Create(p); new JavaScriptResult { Script = "alert('You are done!');" }; } catch { return new JavaScriptResult { Script = "alert('You are not done!');" }; } return View(); }