public ActionResult Create(ProjectModel pm) { if (pb.AddProject(pm)) { return(RedirectToAction("index", "Project")); } else { ModelState.AddModelError("Error", "添加项目失败!"); var temppm = pb.GetProjectByID(pm.ID); return(View(temppm)); } }