Esempio n. 1
0
        public static ReservaDetalleDTO GetReservasDetallesByID(int IDReservaDetalle)
        {
            SqlCommand command = GetDbSprocCommand("usp_ReservasDetalles_GetByID");

            command.Parameters.Add(CreateParameter("@IDDetalleReserva", IDReservaDetalle));
            ReservaDetalleDTO dr = GetSingleDTO <ReservaDetalleDTO>(ref command);

            dr.Pasajero            = PasajeroDB.GetPasajeroByID(dr.IdPasajero);
            dr.ServicioAlojamiento = ServicioAlojamientoDB.GetServicioAlojamientoByID(dr.IdServicioAlojamiento);
            dr.Seguro = SeguroViajeroDB.GetSegurosViajerosByID(dr.IdSeguroViajero);
            return(dr);
        }
Esempio n. 2
0
        public static List <ReservaDetalleDTO> GetAll()
        {
            SqlCommand command          = GetDbSprocCommand("usp_ReservasDetalle_GetAll");
            List <ReservaDetalleDTO> dr = GetDTOList <ReservaDetalleDTO>(ref command);

            foreach (ReservaDetalleDTO re in dr)
            {
                re.Pasajero            = PasajeroDB.GetPasajeroByID(re.IdPasajero);
                re.ServicioAlojamiento = ServicioAlojamientoDB.GetServicioAlojamientoByID(re.IdServicioAlojamiento);
                re.Seguro = SeguroViajeroDB.GetSegurosViajerosByID(re.IdSeguroViajero);
            }
            return(dr);
        }
Esempio n. 3
0
        public static List <ReservaDetalleDTO> GetDetalleByReserva(int idReserva)
        {
            SqlCommand command = GetDbSprocCommand("usp_ReservasDetalle_GetByIDReserva");

            command.Parameters.Add(CreateParameter("@IDReserva", idReserva));


            List <ReservaDetalleDTO> dr = GetDTOList <ReservaDetalleDTO>(ref command);

            foreach (ReservaDetalleDTO re in dr)
            {
                re.Pasajero            = PasajeroDB.GetPasajeroByID(re.IdPasajero);
                re.ServicioAlojamiento = ServicioAlojamientoDB.GetServicioAlojamientoByID(re.IdServicioAlojamiento);
                re.Seguro = SeguroViajeroDB.GetSegurosViajerosByID(re.IdSeguroViajero);
            }
            return(dr);
        }