// 修改 public ResultEntity <int> UpdateOutMemberInfo(OutMemberInfo uie) { ResultEntity <int> result; try { int IntRet = 0; var repResult = dal.Update <OutMemberInfo>(uie); if (repResult) { IntRet = 1; } if (IntRet > 0) { result = new ResultEntity <int>(true, ConstantDefine.TipSaveSuccess, IntRet); } else { result = new ResultEntity <int>(ConstantDefine.TipSaveFail); } } catch (Exception ex) { Loger.LogErr(ex); result = new ResultEntity <int>(ex.Message); } return(result); }
public ActionResult SaveOutMemberInfo(OutMemberInfo entity) { ResponseEntity <int> response; if (entity.Id == 0) { entity.IsDelete = 0; entity.CreateBy = ""; entity.CreateTime = DateTime.Now; entity.UpdateBy = ""; entity.UpdateTime = DateTime.Now; var result = new OutMemberInfoBLL().InsertOutMemberInfo(entity); response = new ResponseEntity <int>(result.Success, result.Message, result.Data); } else { entity.UpdateBy = ""; entity.UpdateTime = DateTime.Now; var result = new OutMemberInfoBLL().UpdateOutMemberInfo(entity); response = new ResponseEntity <int>(result.Success, result.Message, result.Data); } return(Json(response, JsonRequestBehavior.AllowGet)); }
// 添加 public ResultEntity <int> InsertOutMemberInfo(OutMemberInfo uie) { ResultEntity <int> result; try { int IntRet = 0; var repResult = dal.Insert <OutMemberInfo>(uie); if (repResult != null) { IntRet = int.Parse(repResult.ToString()); } if (IntRet > 0) { result = new ResultEntity <int>(true, ConstantDefine.TipSaveSuccess, IntRet); } else { result = new ResultEntity <int>(ConstantDefine.TipSaveFail); } } catch (Exception ex) { Loger.LogErr(ex); result = new ResultEntity <int>(ex.Message); } return(result); }