예제 #1
0
 public ActionResult Create(Department department)
 {
     string strResult = string.Empty;
     bool bResult = DepartmentService.Add(department, out strResult);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet);
 }
예제 #2
0
 //
 // POST: /Department/Edit/
 public ActionResult Edit(Department department)
 {
     bool bResult = DepartmentService.Save(department);
     string msg = bResult ? "修改成功" : "修改失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet);
 }