public ActionResult Comment(PlanLogCommentViewModel model) { ServiceResult result = new ServiceResult(); if (!ModelState.IsValid) { result.Message = "表单输入有误,请仔细填写表单!"; result.AddServiceError("表单输入有误,请仔细填写表单!"); } else { try { PlanLogService.Comment(model); result.Message = "点评计划日志成功!"; } catch (Exception ex) { result.Message = "点评计划日志失败!"; result.AddServiceError(Utilities.GetInnerMostException(ex)); LogHelper.WriteLog("用户:" + CookieHelper.MemberID + "点评计划日志失败!", ex); } } return Json(result); }
public void Comment(PlanLogCommentViewModel model) { PlanLog entity = Find(model.ID); db.Attach<PlanLog>(entity); entity.Comment = model.Comment; entity.CommentTitme = model.CommentTime; db.Commit(); }
public ActionResult Comment(int ID) { var entity = PlanLogService.Find(ID); var model = new PlanLogCommentViewModel() { ID = entity.ID, Comment = entity.Comment, CommentTime = entity.CommentTitme }; return PartialView(model); }