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));
     }
 }
Beispiel #2
0
 /// <summary>
 /// 新增项目
 /// </summary>
 public JsonResult AddProject(ProjectAddRequest request)
 {
     return(Json(bll.AddProject(request)));
 }