//Cargar cliente inicialmente
        private void Proveedor_Load(object sender, EventArgs e)
        {
            conexion = new Conexion();
            conexion.conectar();

            conexion.cargarDataGrid(dataGridViewProveedores, "SELECT idProveedor AS id,nombre AS Nombre,celular AS Celular FROM Proveedor");
            conexion.desconectar();

            Configuracion.configurarDataGrid(dataGridViewProveedores);
        }
示例#2
0
        private void Form_Clientes_Load(object sender, EventArgs e)
        {
            conexion = new Conexion();
            conexion.conectar();

            conexion.cargarDataGrid(dataGridViewClientes, "SELECT idCliente AS id,nombres AS Nombres,apellidos AS Apellidos,celular AS Celular,correo AS Correo,direccion AS Dirección FROM CLIENTE");
            conexion.desconectar();

            Configuracion.configurarDataGrid(dataGridViewClientes);
        }
        private void Form_Producto_Load(object sender, EventArgs e)
        {
            conexion = new Conexion();
            conexion.conectar();

            conexion.cargarDataGrid(dataGridViewProductos, "SELECT Producto.idProducto AS Id,Producto.nombre AS Nombre" +
                                    ",Producto.costo AS Costo, Proveedor.nombre AS Proveedor FROM Producto INNER JOIN Proveedor ON Producto.idProveedorProducto = Proveedor.idProveedor");
            conexion.desconectar();

            Configuracion.configurarDataGrid(dataGridViewProductos);
        }