Ejemplo n.º 1
0
 public JsonResult DeleteComments(int Commentid, int Postid)
 {
     UserPost_Comments UserComments = new UserPost_Comments()
      {
          PostId = Postid,
      };
     int id = UserPostService.DeleteUserComment(Commentid);
     var data = GenericMethods.UserComments(UserComments);
     return Json(data, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 2
0
        public JsonResult DeleteComments(int Commentid, int Postid)
        {
            UserPost_Comments UserComments = new UserPost_Comments()
            {
                PostId = Postid,
            };
            int id   = UserPostService.DeleteUserComment(Commentid);
            var data = GenericMethods.UserComments(UserComments);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
        public JsonResult UserPostComments(int?PostId, string comment)
        {
            UserPost_Comments UserComments = new UserPost_Comments()
            {
                PostId    = PostId,
                Comment   = comment,
                UserId    = Convert.ToInt32(Session["UserId"].ToString()),
                CreatedOn = DateTime.Now,
                Status    = true,
            };
            var data = GenericMethods.UserComments(UserComments);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 4
0
 public int DeleteUserComment(int id)
 {
     try
     {
         using (var context = _dbContextFactory.CreateConnection())
         {
             UserPost_Comments comment = context.UserPost_Comments.Where(x => x.CommentId == id).FirstOrDefault();
             comment.Status = false;
             context.SaveChanges();
             return(id);
         }
     }
     catch (Exception ex)
     {
         _Logger.Error(ex.Message, ex);
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public JsonResult UserPostComments(int? PostId, string comment)
 {
     UserPost_Comments UserComments = new UserPost_Comments()
     {
         PostId = PostId,
         Comment = comment,
         UserId = Convert.ToInt32(Session["UserId"].ToString()),
         CreatedOn = DateTime.Now,
         Status = true,
     };
     var data = GenericMethods.UserComments(UserComments);
     return Json(data, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 6
0
 public List <UserdetailsDTO> UserComments(UserPost_Comments Obj)
 {
     return(_genericMethodsRepo.UserComments(Obj));
 }