Ejemplo n.º 1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            ProductoEdicion f = new ProductoEdicion();

            f.ShowDialog();
            Cargar();
        }
Ejemplo n.º 2
0
        private void btnEditar_Click(object sender, EventArgs e)

        {
            try
            {
                if (MessageBox.Show("Realmente Desea editar este producto", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    ProductoEdicion f = new ProductoEdicion();
                    CLS.Producto    p = new CLS.Producto();
                    p.IDProducto             = dtgProductos.CurrentRow.Cells["idproducto"].Value.ToString();
                    f.lblIDProducto.Text     = dtgProductos.CurrentRow.Cells["idproducto"].Value.ToString();
                    f.lblIDInventario.Text   = dtgProductos.CurrentRow.Cells["idinventario"].Value.ToString();
                    f.txbCodigo.Text         = dtgProductos.CurrentRow.Cells["Codigo"].Value.ToString();
                    f.txbNombre.Text         = dtgProductos.CurrentRow.Cells["Nombre"].Value.ToString();
                    f.txbMarca.Text          = dtgProductos.CurrentRow.Cells["idmarca"].Value.ToString();
                    f.txbPrecio.Text         = dtgProductos.CurrentRow.Cells["PrecioUnitario"].Value.ToString();
                    f.cbbUnidad.Text         = dtgProductos.CurrentRow.Cells["Unidad"].Value.ToString();
                    f.txbExistencias.Text    = dtgProductos.CurrentRow.Cells["Existencias"].Value.ToString();
                    f.txbDescripcion.Text    = dtgProductos.CurrentRow.Cells["Descripcion"].Value.ToString();
                    f.txbExistencias.Enabled = false;
                    f.txbPrecio.Enabled      = false;
                    //f.pbProducto.Image = CacheManager.CLS.Comandos.retornarImagen(p.obtenerImagen(p.IDProducto));
                    f.ShowDialog();
                    Cargar();
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 3
0
        private void btnSeleccionar_Click(object sender, EventArgs e)
        {
            ProductoEdicion f = new ProductoEdicion();

            f.txbMarca.Text = dtgMarcas.CurrentRow.Cells["IDMarca"].Value.ToString();
            Close();
        }
Ejemplo n.º 4
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            ProductoEdicion f = new ProductoEdicion();

            f.txbExistencias.Enabled = false;
            f.ShowDialog();
            Cargar();
        }