Exemplo n.º 1
0
        public void eliminar_habitacion(int idHabitacion)
        {
            string sql;

            sql = "DELETE FROM habitacion WHERE ID_HABITACION ='" + idHabitacion + "'";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void elminar_persona(int cedula)
        {
            String sql;

            sql = "DELETE FROM persona WHERE ID_PERSONA = '" + cedula + "'";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void eliminar_motel(int nit)
        {
            String sql;

            sql = "DELETE FROM motel WHERE ID_MOTEL = '" + nit + "' ";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
Exemplo n.º 4
0
        public void actualiza_habitacion(int idHabitacion, int idTipoHabitacion, int idMotel, char cantidadHabitacion)
        {
            string sql;

            sql = "UPDATE habitacion SET ID_HABITACION ='" + idTipoHabitacion + "', ID_MOTEL ='" + idMotel + "', CANTIDAD_HABITACION ='" + cantidadHabitacion + "'";
            sql = sql + "WHERE ID_HABITACION='" + idHabitacion + "'";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
Exemplo n.º 5
0
        public void agregar_habitacion(int idHabitacion, int idTipoHabitacion, int idMotel, char cantidadHabitacion)
        {
            string sql;

            sql = "INSERT habitacion (ID_HABITACION, ID_TIPO_HABITACION, ID_MOTEL, CANTIDAD_HABITACION) ";
            sql = sql + "VALUES ('" + idHabitacion + "','" + idTipoHabitacion + "','" + idMotel + "','" + cantidadHabitacion + "')";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void actualizar_motel(string nombre, int nit, string direccion)
        {
            String sql;

            sql = "UPDATE motel SET NOMBRE_MOTEL = '" + nombre + "',DIRECCION_MOTEL='" + direccion + "',IDMOTEL='" + nit;
            sql = sql + "WHERE ID_MOTEL= '" + nit + "'";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void agregarmotel(string nombre, int nit, string direccion)
        {
            string sql;

            sql = "INSERT INTO motel (ID_MOTEL, NOMBRE_MOTEL, DIRECCION_MOTEL) ";
            sql = sql + " VALUES ('" + nit + "','" + nombre + "','" + direccion + "')";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void actualizar_persona(int cedula, string nombre, string apellido, char genero, string fecha_nacimiento)
        {
            String sql;

            sql = "UPDATE persona SET NOMBRE_PERSONA  = '" + nombre + "',APELLIDO_PERSONA = '" + apellido + "',GENERO'" + genero + "',FECHA_NACIMIENTO'" + fecha_nacimiento + "'";
            sql = sql + "WHERE ID_PERSONA = '" + cedula + "'";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
        public void agregar_persona(int cedula, string nombre, string apellido, char genero, string fecha_nacimiento)
        {
            string sql;

            sql = "INSERT INTO persona (ID_PERSONA, TIPO_ID, NOMBRE_PERSONA, APELLIDO_PERSONA, GENERO, FECHA_NACIMIENTO) ";
            sql = sql + " VALUES ('" + cedula + "','1','" + nombre + "','" + apellido + "','" + genero + "','" + fecha_nacimiento + "')";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }
Exemplo n.º 10
0
        public void insertar(int id, string user, string password)
        {
            string sql;

            sql = "INSERT INTO loggin ";
            sql = sql + " (ID,USR, PASS) ";
            sql = sql + " VALUES ";
            sql = sql + " (" + id + ",'" + user + "','" + password + "')";
            conexionbd.datos consulta = new conexionbd.datos();
            consulta.Ejecutar(sql);
        }