public OperationResult Update(UpdateSYS_DICTIONARYModel model) { var entity = SYS_DICTIONARYList.First(t => t.DictionaryValue == model.DictionaryValue); entity.DictionaryName = model.DictionaryName; entity.DictionaryValue = model.DictionaryValue; entity.Remark = model.Remark; SYS_DICTIONARYRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public ActionResult Edit(int DictionaryValue) { var model = new UpdateSYS_DICTIONARYModel(); var entity = SYS_DICTIONARYService.SYS_DICTIONARYList.FirstOrDefault(t => t.DictionaryValue == DictionaryValue); if (null != entity) { model = new UpdateSYS_DICTIONARYModel { DictionaryValue = entity.DictionaryValue }; } return(PartialView(model)); }
public ActionResult Edit(UpdateSYS_DICTIONARYModel model) { if (ModelState.IsValid) { this.UpdateBaseData <UpdateSYS_DICTIONARYModel>(model); OperationResult result = SYS_DICTIONARYService.Update(model); if (result.ResultType == OperationResultType.Success) { return(Json(result)); } else { return(PartialView(model)); } } else { return(PartialView(model)); } }