private InfoShowItem JTokenToModel(JToken item) { Model.InfoShowItem oInfoShowItem = new Model.InfoShowItem(); 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 infoclass = int.Parse(item["infoclass"].ToString()); long time = long.Parse(item["time"].ToString()); string title = item["title"].ToString() ?? ""; oInfoShowItem.id = id; oInfoShowItem.count = count; oInfoShowItem.rcount = rcount; oInfoShowItem.fcount = fcount; oInfoShowItem.img = img;//图片 oInfoShowItem.description = description; oInfoShowItem.keywords = keywords; oInfoShowItem.infoclass = infoclass; oInfoShowItem.time = time; oInfoShowItem.title = title; return oInfoShowItem; }
private InfoShowItem JTokenToModel(JToken item) { Model.InfoShowItem oInfoShowItem = new Model.InfoShowItem(); 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() ?? ""; long time = long.Parse(item["time"].ToString()); string title = item["title"].ToString() ?? ""; oInfoShowItem.id = id; oInfoShowItem.count = count; oInfoShowItem.rcount = rcount; oInfoShowItem.fcount = fcount; oInfoShowItem.img = img;//图片 oInfoShowItem.description = description; oInfoShowItem.keywords = keywords; oInfoShowItem.time = time; oInfoShowItem.title = title; return(oInfoShowItem); }