Exemplo n.º 1
0
        private void btn_limpiar_filtros_Click(object sender, EventArgs e)
        {
            Gestion_de_Producto gestProd = new Gestion_de_Producto();

            gestProd._estado = estados.nuevo;
            gestProd.ShowDialog();
            cargarGrilla();
        }
Exemplo n.º 2
0
        private void btn_nuevo_producto_Click(object sender, EventArgs e)
        {
            Gestion_de_Producto gestProd = new Gestion_de_Producto();

            gestProd.ShowDialog();
            cargarGrillaProductos();
            limpiar();
        }
Exemplo n.º 3
0
        private void dgv_productos_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Gestion_de_Producto gestProd = new Gestion_de_Producto();

            gestProd._estado = estados.modificar;

            Categoria cat = new Categoria()
            {
                IDCategoria = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["codCategoria"].Value,
                Nombre      = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["cat"].Value,
            };
            UnidadMedida uni = new UnidadMedida()
            {
                IDUnidad = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idUnidad"].Value,
                Nombre   = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Unidad"].Value,
            };
            TipoMaquinaria tm = new TipoMaquinaria()
            {
                idTipoMaquinaria = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idTipoMaquinaria"].Value,
            };
            UnidadMedida ut = new UnidadMedida()
            {
                IDUnidad = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idUnidadTiempo"].Value,
            };
            Producto prodModificar = new Producto()
            {
                CODProducto       = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["codigo"].Value,
                Nombre            = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Nombre"].Value,
                Descripcion       = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Desc"].Value,
                precio            = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["precio"].Value,
                StockRiesgo       = (double )dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["stock_riesg"].Value,
                Categoria         = cat,
                Unidad            = uni,
                UnidadTiempo      = ut,
                foto              = (Byte[])dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["foto"].Value,
                precioMayorista   = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["precioMayorista"].Value,
                tiempoProduccion  = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["tiempo"].Value,
                tipoMaquina       = tm,
                cantidadProductos = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["cantidadProductos"].Value,
            };

            gestProd._prodModificar = prodModificar;
            gestProd.ShowDialog();
            cargarGrilla();
        }
 private void btn_nuevo_producto_Click(object sender, EventArgs e)
 {
     Gestion_de_Producto gestProd = new Gestion_de_Producto();
     gestProd.ShowDialog();
     cargarGrillaProductos();
     limpiar();
 }
Exemplo n.º 5
0
        private void dgv_productos_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Gestion_de_Producto gestProd = new Gestion_de_Producto();
            gestProd._estado = estados.modificar;

            Categoria cat = new Categoria()
            {
                IDCategoria = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["codCategoria"].Value,
                Nombre = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["cat"].Value,
            };
            UnidadMedida uni = new UnidadMedida()
            {
                IDUnidad = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idUnidad"].Value,
                Nombre = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Unidad"].Value,
            };
            TipoMaquinaria tm = new TipoMaquinaria ()
            {
                idTipoMaquinaria = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idTipoMaquinaria"].Value,
            };
            UnidadMedida  ut = new UnidadMedida ()
            {
                IDUnidad  = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["idUnidadTiempo"].Value,
            };
            Producto prodModificar = new Producto()
            {
                CODProducto = (int)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["codigo"].Value,
                Nombre = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Nombre"].Value,
                Descripcion = (string)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["Desc"].Value,
                precio=(double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["precio"].Value,
                StockRiesgo = (double )dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["stock_riesg"].Value,
                Categoria =cat,
                Unidad=uni,
                UnidadTiempo = ut,
                foto  = (Byte[])dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["foto"].Value,
                precioMayorista = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["precioMayorista"].Value,
                tiempoProduccion = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["tiempo"].Value,
                tipoMaquina = tm,
                cantidadProductos = (double)dgv_productos.Rows[dgv_productos.CurrentRow.Index].Cells["cantidadProductos"].Value,
            };

            gestProd._prodModificar=prodModificar;
            gestProd.ShowDialog();
            cargarGrilla();
        }
Exemplo n.º 6
0
 private void btn_limpiar_filtros_Click(object sender, EventArgs e)
 {
     Gestion_de_Producto gestProd = new Gestion_de_Producto();
     gestProd._estado = estados.nuevo;
     gestProd.ShowDialog();
     cargarGrilla();
 }