Exemplo n.º 1
0
        public DataTable consultar_Huesped()
        {
            DataTable tabla = new DataTable();
            string    sql   = "select h.id_tipoDoc as 'Tipo Doc',h.num_doc as 'Numero DNI',(h.nombre_huesped + h.apellido_huesped) as Nombre  from Huesped h";

            tabla = DB.consultaDB(sql);
            return(tabla);
        }
Exemplo n.º 2
0
        public DataTable buscar_x_patrones(string patron)
        {
            string sqlpatron = "";

            sqlpatron = @"SELECT * FROM Instalacion ";
            return(_DB.consultaDB(sqlpatron));
        }
Exemplo n.º 3
0
        public DataTable buscar_x_patron_habitacion(string patron)
        {
            string sqlpatron = "";

            sqlpatron = @"SELECT * FROM Habitacion ";
            return(_DB.consultaDB(sqlpatron));
        }
Exemplo n.º 4
0
        public DataTable buscar_x_patron_huesped(string patron)
        {
            string sqlpatron = "";

            sqlpatron = @"SELECT * FROM Huespedes ";
            return(DB.consultaDB(sqlpatron));
        }
Exemplo n.º 5
0
        public DataTable buscar_registro()
        {
            string sqlpatron = "";

            sqlpatron = @"SELECT * FROM Huespedes ";
            return(_DB.consultaDB(sqlpatron));
        }
Exemplo n.º 6
0
        public DataTable buscar_factura()
        {
            string sqlpatron = "";

            sqlpatron = @"SELECT * FROM factura ";
            return(_DB.consultaDB(sqlpatron));
        }
Exemplo n.º 7
0
        private void cargar_ID_Empleado()
        {
            DataTable tabla = new DataTable();

            tabla             = DB.consultaDB("select * from Usuario where id_user="******"nombre_user"].ToString().Trim();
        }
Exemplo n.º 8
0
        public DataTable Ejecutar(String acu, String pas)
        {
            string sqlText = string.Format("Select * from Usuario where cuenta_user='******' and pass_user='******'", acu.Trim(), pas.Trim());

            //@"SELECT * FROM Usuario WHERE cuenta_user = '******'"
            //                         + " AND pass_user = '******'";


            return(DB.consultaDB(sqlText));
        }
Exemplo n.º 9
0
        private void button1_Click(object sender, EventArgs e)
        {
            acceso_DB _BD   = new acceso_DB();
            DataTable tabla = new DataTable();
            string    sql   = "";

            sql = @"SELECT * FROM registro WHERE 1=1";

            //            sql = @"SELECT alumnos.legajo, alumnos.apellido,
            //                   alumnos.nombres as nombre,
            //                   tipos_sexos.descripcion as sexo
            //                   FROM alumnos join tipos_sexos ON
            //                                alumnos.sexo = tipos_sexos.id_sexo
            //                   WHERE 1 = 1 ";

            if (!string.IsNullOrEmpty(txt_patron.Text))
            {
                int i;
                if (int.TryParse(txt_patron.Text, out i))
                {
                    sql += " AND id_huesped = " + txt_patron.Text;
                }
                else
                {
                    if (txt_patron.Text.IndexOf("-") != -1)
                    {
                        string[] datos;
                        datos = txt_patron.Text.Split('-');
                        sql  += @" AND id_huesped BETWEEN " + datos[0]
                                + " AND " + datos[1];
                    }
                    else
                    {
                        sql += @" AND id_hotel like '%"
                               + txt_patron.Text.Trim() + "%'";
                    }
                }
            }

            tabla = _BD.consultaDB(sql);
            if (tabla.Rows.Count == 0)
            {
                MessageBox.Show("No hay datos para mostrar");
                return;
            }
            registroBindingSource.DataSource = tabla;
            //registroBindinsourse .DataSource = tabla;
            this.reportViewer1.RefreshReport();
            //datoslistestadBindingSource.DataSource = tabla;
            //reportViewer1.RefreshReport();
        }
Exemplo n.º 10
0
        private void estadistica_huesped_Load(object sender, EventArgs e)
        {
            acceso_DB _BD = new acceso_DB();
            string    sql = "";

            sql = @"SELECT Hotel.nombre as Descriptor
                 , count(*) as Datos
                 FROM huespedes join Hotel ON 
                        huespedes.hotel = Hotel.id_hotel
                 GROUP BY hotel.nombre";

//            EstadisticaBindingSource.DataSource = _BD.consulta(sql);
//            reportViewer2.RefreshReport();
            estadisticaBindingSource.DataSource = _BD.consultaDB(sql);
            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 11
0
        private void estadistica_instalacion_Load(object sender, EventArgs e)
        {
            acceso_DB _BD = new acceso_DB();
            string    sql = "";

            sql = @"SELECT Instalacion.descripcion_instalacion as Descriptor
                 , count(*) as Datos
                 FROM registro join Instalacion ON 
                        registro.id_instalacion = Instalacion.id_instalacion
                 GROUP BY Instalacion.descripcion_instalacion";

            //            EstadisticaBindingSource.DataSource = _BD.consulta(sql);
            //            reportViewer2.RefreshReport();
            estadisticaBindingSource.DataSource = _BD.consultaDB(sql);

            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 12
0
        private void estadistica_montos_Load(object sender, EventArgs e)
        {
            acceso_DB _BD = new acceso_DB();
            string    sql = "";

            sql = @"SELECT factura.total as Descriptor
                 , count(*) as Datos
                 FROM huespedes join factura ON 
                        huespedes.id_huesped = factura.id_huesped
                 GROUP BY factura.total";

            //            EstadisticaBindingSource.DataSource = _BD.consulta(sql);
            //            reportViewer2.RefreshReport();
            estadisticaBindingSource.DataSource = _BD.consultaDB(sql);

            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 13
0
        private void estadistica_detalle_Load(object sender, EventArgs e)
        {
            acceso_DB _BD = new acceso_DB();
            string    sql = "";

            sql = @"SELECT detalle_factura.descipcion as Descriptor
                 , count(*) as Datos
                 FROM factura join detalle_factura ON 
                        factura.n_factura = detalle_factura.n_factura
                 GROUP BY detalle_factura.descipcion";

            //            EstadisticaBindingSource.DataSource = _BD.consulta(sql);
            //            reportViewer2.RefreshReport();
            estadisticaBindingSource.DataSource = _BD.consultaDB(sql);

            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 14
0
        private void estadistica_hues_serv_Load(object sender, EventArgs e)
        {
            acceso_DB _BD = new acceso_DB();
            string    sql = "";

            sql = @"SELECT huespedes.nombre as Descriptor
                 , count(*) as Datos
                 FROM registro join huespedes ON 
                        registro.id_huesped = huespedes.id_huesped
                 GROUP BY huespedes.nombre";

            //            EstadisticaBindingSource.DataSource = _BD.consulta(sql);
            //            reportViewer2.RefreshReport();
            estadisticaBindingSource.DataSource = _BD.consultaDB(sql);
            //this.reportViewer1.RefreshReport();

            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 15
0
        private void button1_Click(object sender, EventArgs e)
        {
            acceso_DB _BD   = new acceso_DB();
            DataTable tabla = new DataTable();
            string    sql   = "";

            sql = @"SELECT * FROM detalle_factura WHERE 1=1";


            if (!string.IsNullOrEmpty(txt_patron.Text))
            {
                int i;
                if (int.TryParse(txt_patron.Text, out i))
                {
                    sql += " AND codigo = " + txt_patron.Text;
                }
                else
                {
                    if (txt_patron.Text.IndexOf("-") != -1)
                    {
                        string[] datos;
                        datos = txt_patron.Text.Split('-');
                        sql  += @" AND codigo BETWEEN " + datos[0]
                                + " AND " + datos[1];
                    }
                    else
                    {
                        sql += @" AND descipcion like '%"
                               + txt_patron.Text.Trim() + "%'";
                    }
                }
            }

            tabla = _BD.consultaDB(sql);
            if (tabla.Rows.Count == 0)
            {
                MessageBox.Show("No hay datos para mostrar");
                return;
            }
            detalleBindingSource.DataSource = tabla;

            //huespedesinformeBindingSource.DataSource = tabla;
            this.reportViewer1.RefreshReport();
        }
Exemplo n.º 16
0
 public DataTable ConsultarPuesto()
 {
     return(DB.consultaDB("SELECT * FROM Puesto"));
 }
Exemplo n.º 17
0
 public DataTable Consultar_TipoDocumento()
 {
     return(DB.consultaDB("select * from TipoDocumento"));
 }
Exemplo n.º 18
0
 //algpo improvisado
 public DataTable BuscarId_X_Servicio(string descripcion)
 {
     return(DB.consultaDB("select * from TipoServicio where desc_tipo_servicio=" + descripcion));
 }
Exemplo n.º 19
0
 public DataTable consultarEmpleados()
 {
     return(DB.consultaDB("SELECT * FROM EMPLEADO"));
 }