public static string voteTag(long premalinkId, long TagId, string vote)
        {
            try
            {
                HttpCookie _cookie;
                _cookie = HttpContext.Current.Request.Cookies["Tagged"];

                long result;

                if (_cookie != null && Int64.TryParse(UtilityClass.DecryptStringAES(_cookie["d"]), out result))
                {
                    if (result > 0)
                    {
                        var blltag = new BllTag();
                        var news   = new DtoNewsFeed();

                        news.TagId       = TagId;
                        news.UserId      = Convert.ToInt64(UtilityClass.DecryptStringAES(_cookie["d"]));
                        news.Title       = vote;
                        news.PremalinkId = premalinkId;
                        blltag.VoteContent(news);
                        return("1");
                    }
                    return(null);
                }
                return(null);
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
            }
            return(null);
        }
Beispiel #2
0
 public static void voteTag(long premalinkId, long TagId, string vote, int UserID)
 {
     try
     {
         var blltag = new BllTag();
         var news   = new DtoNewsFeed
         {
             TagId       = TagId,
             UserId      = Convert.ToInt32(UserID),
             Title       = vote,
             PremalinkId = premalinkId
         };
         news.UserId = UserID;
         blltag.VoteContent(news);
     }
     catch (Exception ex)
     {
         ex.ToExceptionless().Submit();
     }
 }