Esempio n. 1
0
        private LoreShowItem JTokenToModel(JToken item)
        {
            Model.LoreShowItem oLoreShowItem = new Model.LoreShowItem();



            int id = int.Parse(item["id"].ToString());
            int count = int.Parse(item["count"].ToString());
            int rcount = int.Parse(item["rcount"].ToString());
            int fcount = int.Parse(item["fcount"].ToString());
            string img = item["img"].ToString() ?? "";
            string description = item["description"].ToString() ?? "";
            string keywords = item["keywords"].ToString() ?? "";
            int loreclass = int.Parse(item["loreclass"].ToString());
            long time = long.Parse(item["time"].ToString());
            string title = item["title"].ToString() ?? "";

            oLoreShowItem.id = id;
            oLoreShowItem.count = count;
            oLoreShowItem.rcount = rcount;
            oLoreShowItem.fcount = fcount;
            oLoreShowItem.img = img;//图片
            oLoreShowItem.description = description;
            oLoreShowItem.keywords = keywords;
            oLoreShowItem.loreclass = loreclass;
            oLoreShowItem.time = time;
            oLoreShowItem.title = title;


            return oLoreShowItem;
        }
Esempio n. 2
0
        private LoreShowItem JTokenToModel(JToken item)
        {
            Model.LoreShowItem oLoreShowItem = new Model.LoreShowItem();



            int    id          = int.Parse(item["id"].ToString());
            int    count       = int.Parse(item["count"].ToString());
            int    rcount      = int.Parse(item["rcount"].ToString());
            int    fcount      = int.Parse(item["fcount"].ToString());
            string img         = item["img"].ToString() ?? "";
            string description = item["description"].ToString() ?? "";
            string keywords    = item["keywords"].ToString() ?? "";
            int    loreclass   = int.Parse(item["loreclass"].ToString());
            long   time        = long.Parse(item["time"].ToString());
            string title       = item["title"].ToString() ?? "";

            oLoreShowItem.id          = id;
            oLoreShowItem.count       = count;
            oLoreShowItem.rcount      = rcount;
            oLoreShowItem.fcount      = fcount;
            oLoreShowItem.img         = img;//图片
            oLoreShowItem.description = description;
            oLoreShowItem.keywords    = keywords;
            oLoreShowItem.loreclass   = loreclass;
            oLoreShowItem.time        = time;
            oLoreShowItem.title       = title;


            return(oLoreShowItem);
        }