Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void Comment(PlanLogCommentViewModel model)
 {
     PlanLog entity = Find(model.ID);
     db.Attach<PlanLog>(entity);
     entity.Comment = model.Comment;
     entity.CommentTitme = model.CommentTime;
     db.Commit();
 }
Exemplo n.º 3
0
        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);
        }