Beispiel #1
0
        public static int RateEmotion(string Premalink, int EmotionId, string Rate)
        {
            BLLEmotions bllemotion  = new BLLEmotions();
            int         returnvalue = 0;

            HttpCookie cookie;

            cookie = HttpContext.Current.Request.Cookies["Tagged"];

            if (Rate == "plus")
            {
                returnvalue = bllemotion.IncrementEmotion(Premalink, EmotionId, Convert.ToInt64(cookie["userId"]));
            }
            else if (Rate == "minus")
            {
                returnvalue = bllemotion.DecrementEmotion(Premalink, EmotionId, Convert.ToInt64(cookie["userId"]));
            }


            return(returnvalue);
        }
Beispiel #2
0
        public static string GetPremalinkEmotions(string Premalink)
        {
            BLLEmotions bllemotion = new BLLEmotions();

            JObject o = JObject.FromObject(new
            {
                Emotion = new
                {
                    Item =
                        from E in bllemotion.GetPremalinkEmotions(Premalink, 1)
                        select new
                    {
                        Id          = E.Emotionid,
                        Vote        = E.TotalCount,
                        Name        = E.EmotionName,
                        UserEmotion = E.IsActive
                    }
                }
            });

            return(o.ToString());
        }
Beispiel #3
0
        public static IEnumerable EmotionIntellisense(string PrefixText, string Premalink)
        {
            BLLEmotions bllemotion = new BLLEmotions();

            return(bllemotion.EmotionIntellisense(Premalink, PrefixText));
        }