コード例 #1
0
        public RatecommentsAj(string searchid, string ratecommentid)
        {
            string result = string.Empty;

            string[] ratecommentidlst;


            string HRoomRatecomBodyRS = GetHotelResBodyRQ(searchid, ratecommentid);

            result = XMLRead.GetResponse(HRoomRatecomBodyRS);
            RateCommentdto objRateCommentdto = new RateCommentdto();

            ratecommentidlst = ratecommentid.Split('|');


            XMLRead.SaveJSONTextFile(HRoomRatecomBodyRS, result, searchid + "_" + ratecommentidlst[1] + "_RoomRatecomment");
            string filePathRQ = Path.Combine(HttpRuntime.AppDomainAppPath, "HotelRRatecomments/" + searchid + "_" + ratecommentidlst[1] + "_RoomRatecomment" + "-RS.json");

            using (StreamReader r = new StreamReader(filePathRQ))
            {
                string json = r.ReadToEnd();
                objRateCommentdto = JsonConvert.DeserializeObject <RateCommentdto>(json);
            }
            if (objRateCommentdto.rateComments.Count > 0)
            {
                Ratecommentdescription = objRateCommentdto.rateComments[0].description;
            }
        }