public static IList <ELongHotelRoomAdapter> GetHotelRoomList(string hotelId)
        {
            IList <ELongHotelRoomAdapter> list = new List <ELongHotelRoomAdapter>();
            string      path = string.Format(PATH_HOTEL_ID_CN, hotelId);
            XmlDocument doc  = GetDoc(path);

            XmlNamespaceManager xnm   = GetXnmQ1();
            XmlNodeList         nodes = doc.SelectNodes("q1:HotelDetail/q1:roomInfo/q1:room", xnm);

            foreach (XmlNode node in nodes)
            {
                ELongHotelRoomAdapter room = new ELongHotelRoomAdapter();
                room.from(node, xnm, "q1:", "");
                room.exHotelId = hotelId;
                list.Add(room);
            }
            return(list);
        }
        public static IList<ELongHotelRoomAdapter> GetHotelRoomList(string hotelId)
        {
            IList<ELongHotelRoomAdapter> list = new List<ELongHotelRoomAdapter>();
            string path = string.Format(PATH_HOTEL_ID_CN, hotelId);
            XmlDocument doc = GetDoc(path);

            XmlNamespaceManager xnm = GetXnmQ1();
            XmlNodeList nodes = doc.SelectNodes("q1:HotelDetail/q1:roomInfo/q1:room", xnm);
            foreach (XmlNode node in nodes)
            {
                ELongHotelRoomAdapter room = new ELongHotelRoomAdapter();
                room.from(node, xnm, "q1:", "");
                room.exHotelId = hotelId;
                list.Add(room);
            }
            return list;
        }
Beispiel #3
0
 public void from(ELongHotelRoomAdapter adapter)
 {
     this.id = string.Format("{0}::{1}", adapter.exHotelId, adapter.roomTypeId);
     this.roomTypeId = adapter.roomTypeId;
     this.roomName = adapter.roomName;
     this.roomTypeNum = ObjectUtil.ParseInt(adapter.roomTypeNum, 0);
     this.area = ObjectUtil.ParseDouble(adapter.area, 0);
     this.floor = adapter.floor;
     this.hasBroadnet = ObjectUtil.Parse(adapter.hasBroadnet,"0");
     this.broadnetFee = ObjectUtil.Parse(adapter.broadnetFee,"0");
     this.bedDescription = adapter.bedDescription;
     this.bedType = adapter.bedType;
     this.note = adapter.note;
     this.hotelFk = adapter.exHotelId;
 }