Esempio n. 1
0
        private DrugShowItem JTokenToModel(JToken item)
        {
            Model.DrugShowItem oDrugShowItem = new Model.DrugShowItem();
            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() ?? "";
            string message  = item["message"].ToString() ?? "";
            int    price    = int.Parse(item["price"].ToString());
            string tag      = item["tag"].ToString() ?? "";
            string keywords = item["keywords"].ToString() ?? "";
            string type     = item["type"].ToString() ?? "";


            oDrugShowItem.id       = id;
            oDrugShowItem.count    = count;
            oDrugShowItem.rcount   = rcount;
            oDrugShowItem.fcount   = fcount;
            oDrugShowItem.name     = name;//疾病名称
            oDrugShowItem.img      = img;
            oDrugShowItem.message  = message;
            oDrugShowItem.price    = price;
            oDrugShowItem.tag      = tag;
            oDrugShowItem.keywords = keywords;
            oDrugShowItem.type     = type;


            return(oDrugShowItem);
        }
Esempio n. 2
0
        private DrugShowItem JTokenToModel(JToken item)
        {
            Model.DrugShowItem oDrugShowItem = new Model.DrugShowItem();
            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() ?? "";
            string message = item["message"].ToString() ?? "";
            int price = int.Parse(item["price"].ToString());
            string tag = item["tag"].ToString() ?? "";
            string keywords = item["keywords"].ToString() ?? "";
            string type = item["type"].ToString() ?? "";


            oDrugShowItem.id = id;
            oDrugShowItem.count = count;
            oDrugShowItem.rcount = rcount;
            oDrugShowItem.fcount = fcount;
            oDrugShowItem.name = name;//疾病名称
            oDrugShowItem.img = img;
            oDrugShowItem.message = message;
            oDrugShowItem.price = price;
            oDrugShowItem.tag = tag;
            oDrugShowItem.keywords = keywords;
            oDrugShowItem.type = type;


            return oDrugShowItem;
        }