Example #1
0
 //
 // POST: /Unit/Edit/
 public ActionResult Edit(Unit unit)
 {
     bool bResult = UnitService.Save(unit);
     string msg = bResult ? "修改成功" : "修改失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet);
 }
Example #2
0
 public ActionResult Create(Unit unit)
 {
     bool bResult = UnitService.Add(unit);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet);
 }