Exemplo n.º 1
0
 public ActionResult Create(Employee employee)
 {
     string strResult = string.Empty;
     bool bResult = EmployeeService.Add(employee, out strResult);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 2
0
 //
 // POST: /Department/Edit/5
 public ActionResult Edit(Employee employee)
 {
     bool bResult = EmployeeService.Save(employee);
     string msg = bResult ? "修改成功" : "修改失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, null), "text", JsonRequestBehavior.AllowGet);
 }