public List <Hotel> BuscarHotelD(Decimal categoria, String ciudad, String nombre,
                                         String pais)
        {
            var query = String.Format(@"Select * FROM LA_REVANCHA.HOTEL WHERE 1 = 1 ");

            if (categoria != 1000)
            {
                query = query + "AND HOT_ESTRELLAS = " + categoria;
            }
            if (nombre != "")
            {
                query = query + "AND HOT_NOMBRE = '" + nombre + "' ";
            }
            if (ciudad != "")
            {
                query = query + "AND HOT_CIUDAD = '" + ciudad + "' ";
            }
            if (pais != "")
            {
                query = query + "AND HOT_PAIS = '" + pais + "' ";
            }

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.HOTEL");

            var hoteles = dataRow.ToList <Hotel>(this.DataRowToHotel);

            return(hoteles);
        }
        public Decimal BuscarMonto(Decimal cod_consu)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.CONSUMBILES WHERE CONS_CODIGO = '{0}'", cod_consu);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.CONSUMBILES");

            return(Decimal.Parse(dataRow[0]["CONS_PRECIO"].ToString()));
        }
        public Decimal BuscarMontoEstadia(Decimal cod_res)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.ESTADIA WHERE EST_COD_RESERVA = '{0}'", cod_res);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.ESTADIA");

            return(Decimal.Parse(dataRow[0]["EST_PRECIO"].ToString()));
        }
        public Decimal CantidadPersonasParaHabitacion(Habitacion habitacion)
        {
            var query = String.Format(@"SELECT TIPHAB_CANT_PERSONAS FROM GD2C2014.LA_REVANCHA.TIPO_HABITACION " +
                                      "WHERE TIPHAB_CODIGO = '{0}'", habitacion.codigo_tipo);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "GD2C2014.LA_REVANCHA.TIPO_HABITACION");

            return((dataRow.ToList <Decimal>(row => Decimal.Parse(row["TIPHAB_CANT_PERSONAS"].ToString()))).First());
        }
        public List <Hotel> BuscarHoteles()
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.HOTEL WHERE HOT_HABILITADO = '{0}'", 1);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.HOTEL");

            var hoteles = dataRow.ToList <Hotel>(this.DataRowToHotel);

            return(hoteles);
        }
        public List <Consumibles> BuscarConsu()
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.CONSUMBILES");

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.CONSUMBILES");

            var consu = dataRow.ToList <Consumibles>(this.DataRowToConsu);

            return(consu);
        }
        public List <Item> BuscarItemsXFac(Decimal factura)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.FACTURA_ITEM WHERE FACITEM_COD_FACTURA = '{0}'", factura);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.FACTURA_ITEM");

            var items = dataRow.ToList <Item>(this.DataRowToItem);

            return(items);
        }
        public List <Hotemp> BuscarHotelesEmp(Decimal cod_usu)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.HOTEL_USUARIO WHERE HOTCERR_HABILITADO = '{0}' AND HOTUSU_COD_USUARIO = '{1}'", 1, cod_usu);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.HOTEL_USUARIO");

            var hoteles = dataRow.ToList <Hotemp>(this.DataRowToHotemp);

            return(hoteles);
        }
Exemple #9
0
        public Regimen BuscarRegimen(Decimal cod)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.REGIMEN WHERE REG_CODIGO = '{0}'", cod);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.REGIMEN");

            var regimen = dataRow.ToList <Regimen>(this.DataRowToRegimen);

            return(regimen.First());
        }
        public Decimal BuscarPago(String nombre, String apellido, Decimal nro_tarjeta, String forma)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.FORMA_PAGO " +
                                      "WHERE PAGO_DESCRIPCION = '{0}' AND PAGO_NOMBRE = '{1}' AND PAGO_APELLIDO = '{2}' AND PAGO_NRO_TARJETA = '{3}'",
                                      forma, nombre, apellido, nro_tarjeta);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.FORMA_PAGO");

            return(Decimal.Parse(dataRow[0]["PAGO_CODIGO"].ToString()));
        }
        public Decimal BuscarUsuario(Decimal reserva)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.RESERVA_USUARIO WHERE RESUSU_COD_RESERVA = '{0}'", reserva);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.RESERVA_USUARIO");

            var reservas = dataRow.ToList <Resusu>(this.DataRowToResu);

            return(reservas.First().identificador_usuario);
        }
        public List <Resusu> BuscarReservasDeUsu(Decimal cod_usu)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.RESERVA_USUARIO WHERE RESUSU_CODUSU_HUESPED = '{0}'", cod_usu);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.RESERVA_USUARIO");

            var reservas = dataRow.ToList <Resusu>(this.DataRowToResu);

            return(reservas);
        }
        public Hotel BuscarHotel(String nombre)
        {
            var query = String.Format(@"Select * FROM LA_REVANCHA.HOTEL WHERE HOT_NOMBRE = '{0}'", nombre);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.HOTEL");

            var hoteles = dataRow.ToList <Hotel>(this.DataRowToHotel);

            return(hoteles.First());
        }
Exemple #14
0
        public Rol BuscarRol(String nombre)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.ROL WHERE ROL_DESCRIPCION = '{0}'", nombre);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.ROL");

            var roles = dataRow.ToList <Rol>(this.DataRowToRol);

            return(roles.First());
        }
        public Decimal BuscarHabitacion(Decimal cod_reserva)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.HABITACION_RESERVA WHERE HABRES_COD_RESERVA ='{0}'", cod_reserva);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.RESERVA");

            var reservas = dataRow.ToList <HabRes>(this.DataRowToHabRes);

            return(reservas.First().identificador_habitacion);
        }
        public List <Reserva> BuscarReservas()
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.RESERVA");

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.RESERVA");

            var reservas = dataRow.ToList <Reserva>(this.DataRowToRese);

            return(reservas);
        }
        public List <Decimal> BuscarHabitaciones(Decimal reserva)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.HABITACION_RESERVA WHERE HABRES_COD_RESERVA = '{0}'", reserva);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.HABITACION_RESERVA");

            var codigos = dataRow.ToList <Decimal>(this.dataRowToCod);

            return(codigos);
        }
        public Consumibles BuscarConsuUnico(Decimal codigo)
        {
            var query = String.Format(@"SELECT * FROM LA_REVANCHA.CONSUMBILES WHERE CONS_CODIGO = '{0}'", codigo);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "LA_REVANCHA.CONSUMBILES");

            var consu = dataRow.ToList <Consumibles>(this.DataRowToConsu);

            return(consu.First());
        }
        public List <Escoit> BuscarEscoits(Decimal estadia)
        {
            var query = String.Format(@"SELECT * FROM GD2C2014.LA_REVANCHA.ESTADIA_CONSUMIBLE_ITEM WHERE ESCOIT_COD_ESTADIA = '{0}' AND ESCOIT_COD_CONSUMIBLE != 0 ", estadia);

            DataRowCollection dataRow = SQLUtils.EjecutarConsultaSimple(query, "GD2C2014.LA_REVANCHA.ESTADIA");

            var items = dataRow.ToList <Escoit>(this.DataRowToEscoit);

            return(items);
        }