Example #1
0
        private Model.SymptomShowItem JTokenToModel(JToken item)
        {
            Model.SymptomShowItem oSymptomShowItem = new Model.SymptomShowItem();

            int    id          = int.Parse(item["id"].ToString() ?? "-1");
            int    count       = int.Parse(item["count"].ToString() ?? "0");
            int    rcount      = int.Parse(item["rcount"].ToString() ?? "0");
            int    fcount      = int.Parse(item["fcount"].ToString() ?? "0");
            string name        = item["name"].ToString() ?? "";
            string img         = item["img"].ToString() ?? "";
            string keywords    = item["keywords"].ToString() ?? "";
            string description = item["description"].ToString() ?? "";
            string department  = item["department"].ToString() ?? "";
            string place       = item["place"].ToString() ?? "";
            string message     = item["message"].ToString() ?? "";
            string disease     = item["disease"].ToString() ?? "";
            string causetext   = item["causetext"].ToString() ?? "";
            string checks      = item["checks"].ToString() ?? "";
            string drug        = item["drug"].ToString() ?? "";

            //string detailtext = item["detailtext"].ToString() ?? "";

            oSymptomShowItem.id          = id;
            oSymptomShowItem.count       = count;
            oSymptomShowItem.rcount      = rcount;
            oSymptomShowItem.fcount      = fcount;
            oSymptomShowItem.keywords    = keywords;
            oSymptomShowItem.name        = name;
            oSymptomShowItem.img         = img;
            oSymptomShowItem.description = description;
            oSymptomShowItem.department  = department;
            oSymptomShowItem.place       = place;
            oSymptomShowItem.message     = message;
            oSymptomShowItem.disease     = disease;
            oSymptomShowItem.causetext   = causetext;
            oSymptomShowItem.drug        = drug;
            //oSymptomShowItem.detailtext = detailtext;
            oSymptomShowItem.checks = checks;

            return(oSymptomShowItem);
        }
Example #2
0
        private Model.SymptomShowItem JTokenToModel(JToken item)
        {
            Model.SymptomShowItem oSymptomShowItem = new Model.SymptomShowItem();

            int id = int.Parse(item["id"].ToString() ?? "-1");
            int count = int.Parse(item["count"].ToString() ?? "0");
            int rcount = int.Parse(item["rcount"].ToString() ?? "0");
            int fcount = int.Parse(item["fcount"].ToString() ?? "0");
            string name = item["name"].ToString() ?? "";
            string img = item["img"].ToString() ?? "";
            string keywords = item["keywords"].ToString() ?? "";
            string description = item["description"].ToString() ?? "";
            string department = item["department"].ToString() ?? "";
            string place = item["place"].ToString() ?? "";
            string message = item["message"].ToString() ?? "";
            string disease = item["disease"].ToString() ?? "";
            string causetext = item["causetext"].ToString() ?? "";
            string checks = item["checks"].ToString() ?? "";
            string drug = item["drug"].ToString() ?? "";
            //string detailtext = item["detailtext"].ToString() ?? "";

            oSymptomShowItem.id = id;
            oSymptomShowItem.count = count;
            oSymptomShowItem.rcount = rcount;
            oSymptomShowItem.fcount = fcount;
            oSymptomShowItem.keywords = keywords;
            oSymptomShowItem.name = name;
            oSymptomShowItem.img = img;
            oSymptomShowItem.description = description; 
            oSymptomShowItem.department = department;
            oSymptomShowItem.place = place;
            oSymptomShowItem.message = message;
            oSymptomShowItem.disease = disease;
            oSymptomShowItem.causetext = causetext;
            oSymptomShowItem.drug = drug;
            //oSymptomShowItem.detailtext = detailtext;
            oSymptomShowItem.checks = checks;

            return oSymptomShowItem;
        }