示例#1
0
 public ActionResult updateProject(ProjectView projectView)
 {
     ProjectView project = null;
     if (projectView != null) {
         try {
             RequestMgr requestMgr = new RequestMgr(ConsoleFactory.getRequestSvc());
             project = requestMgr.updateProject(projectView);
             TempData["error"] = "Update Successful";
             TempData["valid"] = true;
             return RedirectToAction("Project", "Console", new { id = project.ID });
         } catch (Exception e) {
             project = projectView;
             project.isNew = false;
             TempData["error"] = e.Message;
             TempData["valid"] = false;
             return RedirectToAction("Project", "Console", new { id = projectView.ID });
         }
     }
     return Dashboard(null, null);
 }