public ActionResult Index(int contextContentId,int context)
 {
     ContentCommentModel contentComment = new ContentCommentModel();
     contentComment.ContextId = context;
     contentComment.ContextContentId = contextContentId;
     if (Request.IsAjaxRequest())
         return PartialView(contentComment);
     else
         return View(contentComment);
 }
Beispiel #2
0
        /// <summary>
        /// SaveContentComment
        /// </summary>
        /// <param name="contentComment"></param>
        public void SaveContentComment(ContentCommentModel contentComment)
        {
            ContentCommentDC contentCommentDC = Mapper.Map<ContentCommentModel, ContentCommentDC>(contentComment);
            ServiceResponse<int> saveContentCommentResponse = _contentProxy.Execute(opt => opt.SaveContentComment(contentCommentDC));

            if (saveContentCommentResponse.Status != ResponseStatus.Success)
                HandleError(saveContentCommentResponse.Status, saveContentCommentResponse.ResponseMessage);
            else
                contentComment.ContentCommentId = saveContentCommentResponse.Result;
        }