コード例 #1
0
        public static string GetwallTags(string Premalink)
        {
            try
            {
                var blltag = new BllTag();

                JObject o = JObject.FromObject(new
                {
                    Tag = new
                    {
                        Item =
                            from p in blltag.GetTagsbyPremalink(Premalink)
                            select new
                        {
                            Id   = p.TagId,
                            Vote = p.VoteType,
                            p.TagName
                        }
                    }
                });

                return(o.ToString());
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
            }
            return(null);
        }
コード例 #2
0
        public static string GetTagsbyPremalink(string Premalink)
        {
            try
            {
                HttpCookie cookie = HttpContext.Current.Request.Cookies["Tagged"];
                JObject    o;

                if (cookie != null)
                {
                    var blltag = new BllTag();
                    var lsttag = new List <DtoTag>();
                    lsttag = blltag.GetTagsbyPremalink(Premalink);

                    if (lsttag != null && lsttag.Count > 0)
                    {
                        o = JObject.FromObject(new
                        {
                            Tag = new
                            {
                                Item =
                                    from p in lsttag
                                    select new
                                {
                                    Id   = p.TagId,
                                    Vote = p.VoteType,
                                    p.TagName
                                }
                            }
                        });

                        return(o.ToString());
                    }
                }
                else
                {
                    return(null);
                }

                return(null);
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
            }
            return(null);
        }