public static long voteTag(string premalink, long TagId, string vote) { try { var blltag = new BllTag(); var tag = new DtoTag(); var cookie1 = HttpContext.Current.Request.Cookies["Tagged"]; if (cookie1 != null) { tag.TagId = TagId; tag.UserId = Convert.ToInt64(UtilityClass.DecryptStringAES(cookie1["d"])); tag.VoteType = vote; tag.Link = premalink; return(blltag.VoteTag(tag)); } return(-2); } catch (Exception ex) { ex.ToExceptionless().Submit(); } return(0); }
public static void voteTag(string premalink, long tagId, string vote, string flow, long TagId, long profileUserId) { try { HttpCookie cookie = HttpContext.Current.Request.Cookies["Tagged"]; var blltag = new BllTag(); var tag = new DtoTag(); tag.TagId = tagId; tag.UserId = Convert.ToInt64(UtilityClass.DecryptStringAES(cookie["d"])); tag.VoteType = vote; tag.Link = premalink; if (flow.ToLower() == "userprofile") { tag.UserId = profileUserId; blltag.VoteUserTag(tag); } else if (flow.ToLower() == "tagged") { tag.TagId = tagId; tag.TagCount = TagId; blltag.VoteTagged(tag); } else { blltag.VoteTag(tag); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }