private VO_ServiceAddRQ getParametros(string sId) { VO_ServiceAddRQ vo_ServiceAddRQ = new VO_ServiceAddRQ(); VO_HotelValuedAvailRQ vo_HotelValuedAvailRQ = clsSesiones.getParametrosHotel(); VO_HotelInfo vo_HotelInfo = new VO_HotelInfo(); VO_HotelRoom vo_HotelRoom = new VO_HotelRoom(); DataSet dsRoomType = clsSesiones.getResultadoHotel(); string sWhere = COLUMN_SELECCION + "=" + sId + ""; vo_ServiceAddRQ.Credentials = vo_HotelValuedAvailRQ.Credentials; vo_ServiceAddRQ.lHotelOccupancy = vo_HotelValuedAvailRQ.lHotelOccupancy; // Traemos la tabla DataTable dtHotelRoom = dsRoomType.Tables[TABLA_HOTEL_ROOM]; DataRow[] drHotelRoom = dtHotelRoom.Select(sWhere); vo_ServiceAddRQ.AvailToken = drHotelRoom[0][COLUMN_AVAIL_TOKEN].ToString(); vo_ServiceAddRQ.IncomingOffice = drHotelRoom[0][COLUMN_INCOMING_CODE].ToString(); vo_ServiceAddRQ.ContractName = drHotelRoom[0][COLUMN_CONTRACT_NAME].ToString(); vo_ServiceAddRQ.DateFrom = drHotelRoom[0][COLUMN_DATE_FROM].ToString(); vo_ServiceAddRQ.DateTo = drHotelRoom[0][COLUMN_DATE_TO].ToString(); vo_HotelInfo.Code = drHotelRoom[0][COLUMN_HOTEL_INFO_CODE].ToString(); vo_HotelInfo.Destination = vo_HotelValuedAvailRQ.Destination; vo_HotelRoom.BoardCode = drHotelRoom[0][COLUMN_BOARD_CODE].ToString(); vo_HotelRoom.RoomTypeCharacteristic = drHotelRoom[0][COLUMN_CHARASTERISTIC].ToString(); vo_HotelRoom.RoomTypeCode = drHotelRoom[0][COLUMN_CODE].ToString(); vo_HotelRoom.SHRUI = drHotelRoom[0][COLUMN_SHRUI].ToString(); try { for (int j = 0; j < vo_ServiceAddRQ.lHotelOccupancy.Count; j++) { VO_HotelRoom vo_HotelRoomId = new VO_HotelRoom(); vo_HotelRoomId.BoardCode = drHotelRoom[j][COLUMN_BOARD_CODE].ToString(); vo_HotelRoomId.RoomTypeCharacteristic = drHotelRoom[j][COLUMN_CHARASTERISTIC].ToString(); vo_HotelRoomId.RoomTypeCode = drHotelRoom[j][COLUMN_CODE].ToString(); vo_HotelRoomId.SHRUI = drHotelRoom[j][COLUMN_SHRUI].ToString(); vo_ServiceAddRQ.lHotelOccupancy[j].HotelRoom = vo_HotelRoomId; } } catch { } vo_ServiceAddRQ.HotelInfo = vo_HotelInfo; vo_ServiceAddRQ.HotelRoom = vo_HotelRoom; return(vo_ServiceAddRQ); }
public VO_ServiceAddRQ( VO_Credentials vCredentials, string savailToken, string sContractName, string sIncomingOffice, string sDateFrom, string sDateTo, VO_HotelInfo vHotelInfo, List <VO_HotelOccupancy> lvHotelOccupancy, VO_HotelRoom vHotelRoom) { this.vCredentials = vCredentials; this.savailToken = savailToken; this.sContractName = sContractName; this.sIncomingOffice = sIncomingOffice; this.sDateFrom = sDateFrom; this.sDateTo = sDateTo; this.vHotelInfo = vHotelInfo; this.lvHotelOccupancy = lvHotelOccupancy; this.vHotelRoom = vHotelRoom; }