Example #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);
 }
Example #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);
        }