Exemplo n.º 1
0
 public ActionResult AddActionCommentLike(ProfileActionCommentLike value)
 {
     ProfileRepository.AddProfileActionCommentLike((long)value.ProfileActionCommentId, (long)user.ProfileId);
     LoadCommentResult result = new LoadCommentResult();
     result.Profile = ProfileRepository.GetProfile(user.ProfileId);
     result.ProfileActionComment = ProfileRepository.GetProfileActionsComment((long)value.ProfileActionCommentId);
     if (result.ProfileActionComment != null)
     {
         result.Action = ProfileRepository.GetProfileAction((long)result.ProfileActionComment.ProfileActionId);
     }
     result.Action = new ProfileAction();
     return PartialView("LoadComment", result);
 }
Exemplo n.º 2
0
        public ActionResult AddComment(ProfileActionComment value)
        {
            LoadCommentResult result = new LoadCommentResult();
            result.Profile = ProfileRepository.GetProfile(user.ProfileId);
            result.Action = ProfileRepository.GetProfileAction((long)value.ProfileActionId);

            if (user.ProfileId == value.ProfileId)
            {
                value.Date = DateTime.Now;
                long id = ProfileRepository.AddProfileActionComment(value);
                result.ProfileActionComment = ProfileRepository.GetProfileActionsComment(id);
            }
            return PartialView("LoadComment", result);
        }