private HospitalShowItem JTokenToModel(JToken item) { Model.HospitalShowItem oHospitalShowItem = new Model.HospitalShowItem(); 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 name = item["name"].ToString() ?? ""; string img = item["img"].ToString() ?? ""; long area = long.Parse(item["area"].ToString()); //区域 string address = item["address"].ToString() ?? ""; // 地址 float x = float.Parse(item["x"].ToString()); // 地图x float y = float.Parse(item["y"].ToString()); // 地图y string tel = item["tel"].ToString() ?? ""; // 电话 string fax = item["fax"].ToString() ?? ""; // 传真 string zipcode = item["zipcode"].ToString() ?? ""; // 邮编 string url = item["url"].ToString() ?? ""; // 网站URL string mail = item["mail"].ToString() ?? ""; // 医院邮箱 string gobus = item["gobus"].ToString() ?? ""; // 坐车方式 string level = item["level"].ToString() ?? ""; // 医院等级 string nature = item["nature"].ToString() ?? ""; // 经营性质 string mtype = item["mtype"].ToString() ?? ""; // 医保类型 oHospitalShowItem.id = id; oHospitalShowItem.count = count; oHospitalShowItem.rcount = rcount; oHospitalShowItem.fcount = fcount; oHospitalShowItem.name = name;//疾病名称 oHospitalShowItem.img = img;//图片 oHospitalShowItem.area = area; oHospitalShowItem.address = address; oHospitalShowItem.x = x; oHospitalShowItem.y = y; oHospitalShowItem.tel = tel; oHospitalShowItem.fax = fax; oHospitalShowItem.zipcode = zipcode; oHospitalShowItem.url = url; oHospitalShowItem.mail = mail; oHospitalShowItem.gobus = gobus; oHospitalShowItem.level = level; oHospitalShowItem.nature = nature; oHospitalShowItem.mtype = mtype; return oHospitalShowItem; }
private HospitalShowItem JTokenToModel(JToken item) { Model.HospitalShowItem oHospitalShowItem = new Model.HospitalShowItem(); 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 name = item["name"].ToString() ?? ""; string img = item["img"].ToString() ?? ""; long area = long.Parse(item["area"].ToString()); //区域 string address = item["address"].ToString() ?? ""; // 地址 float x = float.Parse(item["x"].ToString()); // 地图x float y = float.Parse(item["y"].ToString()); // 地图y string tel = item["tel"].ToString() ?? ""; // 电话 string fax = item["fax"].ToString() ?? ""; // 传真 string zipcode = item["zipcode"].ToString() ?? ""; // 邮编 string url = item["url"].ToString() ?? ""; // 网站URL string mail = item["mail"].ToString() ?? ""; // 医院邮箱 string gobus = item["gobus"].ToString() ?? ""; // 坐车方式 string level = item["level"].ToString() ?? ""; // 医院等级 string nature = item["nature"].ToString() ?? ""; // 经营性质 string mtype = item["mtype"].ToString() ?? ""; // 医保类型 oHospitalShowItem.id = id; oHospitalShowItem.count = count; oHospitalShowItem.rcount = rcount; oHospitalShowItem.fcount = fcount; oHospitalShowItem.name = name; //疾病名称 oHospitalShowItem.img = img; //图片 oHospitalShowItem.area = area; oHospitalShowItem.address = address; oHospitalShowItem.x = x; oHospitalShowItem.y = y; oHospitalShowItem.tel = tel; oHospitalShowItem.fax = fax; oHospitalShowItem.zipcode = zipcode; oHospitalShowItem.url = url; oHospitalShowItem.mail = mail; oHospitalShowItem.gobus = gobus; oHospitalShowItem.level = level; oHospitalShowItem.nature = nature; oHospitalShowItem.mtype = mtype; return(oHospitalShowItem); }