示例#1
0
        private void lblProducto_Click(object sender, EventArgs e)
        {
            frmProducto producto = new frmProducto();

            producto.Show();
            this.Hide();
        }
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            frmProducto formularioProducto = new frmProducto();

            formularioProducto.ShowDialog();
            cargarGrilla();
        }
        private void toolStripButtonModificarProducto_Click(object sender, EventArgs e)
        {
            frmProducto frm = new frmProducto(Convert.ToInt32(this.dataGridViewProductos.SelectedRows[0].Cells["Id"].Value));

            if (frm.ShowDialog() == DialogResult.OK)
            {
                this.ListarProductos();
            }
        }
        private void toolStripButtonAgregarProducto_Click(object sender, EventArgs e)
        {
            frmProducto frm = new frmProducto();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                this.ListarProductos();
            }
        }
        private void DGFiltro_Resultados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                frmOrdenDeCompra      frmOComp     = frmOrdenDeCompra.GetInstancia();
                frmProducto           frmProd      = frmProducto.GetInstancia();
                frmProducto           frmProdStock = frmProducto.GetInstancia();
                frmInventario_Ingreso frmInv       = frmInventario_Ingreso.GetInstancia();
                frmCotizacionDeCompra frmCComp     = frmCotizacionDeCompra.GetInstancia();

                //Variables Para Los Filtros
                string idbodega, bodega, documento;

                if (frmInv.Filtro)
                {
                    idbodega  = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    bodega    = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento = this.DGFiltro_Resultados.CurrentRow.Cells[2].Value.ToString();
                    frmInv.setBodega(idbodega, bodega, documento);
                    this.Hide();
                }

                if (frmCComp.Filtro)
                {
                    idbodega  = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    bodega    = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento = this.DGFiltro_Resultados.CurrentRow.Cells[2].Value.ToString();
                    frmCComp.setBodega(idbodega, bodega, documento);
                    this.Hide();
                }

                if (frmOComp.Filtro)
                {
                    idbodega  = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    bodega    = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento = this.DGFiltro_Resultados.CurrentRow.Cells[2].Value.ToString();
                    frmOComp.setBodega(idbodega, bodega, documento);
                    this.Hide();
                }

                if (frmProd.Filtro)
                {
                    idbodega = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    bodega   = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    frmProd.setUbicacion(idbodega, bodega);
                    this.Hide();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
示例#6
0
        private void DGFiltro_Resultados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                frmProducto           frmPro  = frmProducto.GetInstancia();
                frmOrdenDeCompra      frmOCom = frmOrdenDeCompra.GetInstancia();
                frmInventario_Ingreso frmInv  = frmInventario_Ingreso.GetInstancia();
                frmCotizacionDeCompra frmCot  = frmCotizacionDeCompra.GetInstancia();

                //Variables para realizar los Filtro
                string idproveedor, proveedor, documento;

                if (frmPro.Examinar_Proveedor)
                {
                    idproveedor = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    proveedor   = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento   = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmPro.setProveedor(idproveedor, proveedor, documento);
                    this.Hide();
                }

                if (frmInv.Examinar)
                {
                    idproveedor = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    proveedor   = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento   = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmInv.setProveedor(idproveedor, proveedor, documento);
                    this.Hide();
                }

                if (frmCot.Examinar)
                {
                    idproveedor = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    proveedor   = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento   = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmCot.setProveedor(idproveedor, proveedor, documento);
                    this.Hide();
                }

                if (frmOCom.Examinar)
                {
                    idproveedor = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    proveedor   = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    documento   = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmOCom.setProveedor(idproveedor, proveedor, documento);
                    this.Hide();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void productosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmProducto frmProducto = frmProducto.GetInstancia();

            frmProducto.MdiParent = this;
            frmProducto.Show();

            frmProducto.Guardar   = Convert.ToString(this.SQL_Guardar);
            frmProducto.Editar    = Convert.ToString(this.SQL_Editar);
            frmProducto.Eliminar  = Convert.ToString(this.SQL_Eliminar);
            frmProducto.Consultar = Convert.ToString(this.SQL_Consultar);
            frmProducto.Imprimir  = Convert.ToString(this.SQL_Imprimir);
        }
示例#8
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            try
            {
                frmOrdenDeCompra      frmOC  = frmOrdenDeCompra.GetInstancia();
                frmInventario_Ingreso frmBI  = frmInventario_Ingreso.GetInstancia();
                frmCotizacionDeCompra frmCot = frmCotizacionDeCompra.GetInstancia();
                frmProducto           frmPD  = frmProducto.GetInstancia();

                //Variables Para Los Filtros
                string idproducto, producto;

                if (frmBI.Examinar)
                {
                    idproducto = this.DGFiltro_General.CurrentRow.Cells[0].Value.ToString();
                    producto   = Convert.ToString(this.DGFiltro_General.CurrentRow.Cells[2].Value);
                    frmBI.setProducto(idproducto, producto);
                    this.Hide();
                }

                if (frmOC.Examinar)
                {
                    idproducto = this.DGFiltro_General.CurrentRow.Cells[0].Value.ToString();
                    producto   = Convert.ToString(this.DGFiltro_General.CurrentRow.Cells[2].Value);
                    frmOC.setProducto(idproducto, producto);
                    this.Hide();
                }

                if (frmCot.Examinar)
                {
                    idproducto = this.DGFiltro_General.CurrentRow.Cells[0].Value.ToString();
                    producto   = Convert.ToString(this.DGFiltro_General.CurrentRow.Cells[2].Value);
                    frmCot.setProducto(idproducto, producto);
                    this.Hide();
                }

                //if (frmOCom.Examinar)
                //{
                //    idproducto = this.DGFiltro_General.CurrentRow.Cells[0].Value.ToString();
                //    producto = Convert.ToString(this.DGFiltro_General.CurrentRow.Cells[2].Value);
                //    frmOCom.setProducto(idproducto, producto);
                //    this.Hide();
                //}
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void btnEditar_Click(object sender, EventArgs e)
        {
            Producto producto = new Producto();

            try
            {
                producto = (Producto)dgvProductos.CurrentRow.DataBoundItem;
                string p = producto.Imagen;

                frmProducto productoModificar = new frmProducto((Producto)dgvProductos.CurrentRow.DataBoundItem);
                productoModificar.ShowDialog();
                cargarGrilla();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#10
0
        private void frmFiltro_Producto_Load(object sender, EventArgs e)
        {
            //Inicio de Clase y Botones
            this.Habilitar();

            //Focus a Texboxt y Combobox
            this.TBBuscar_General.Select();

            //Ocultacion de Texboxt
            this.TBIdproducto.Visible = false;

            //SE EVALUA EL TIPO DE FILTRO A REALIZAR YA SEA DE IGUALDAD O GENERAL
            frmProducto frmPro = new frmProducto();

            if (frmPro.Filtro_Igualdad)
            {
                tabControl1.SelectedIndex = 1;
                this.TBBuscar_Igualdad.Focus();
            }
        }
        private void DGFiltro_Resultados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                string idimpuesto, impuesto, valor, descripcion;

                frmProducto frmPro = frmProducto.GetInstancia();

                if (frmPro.Examinar)
                {
                    idimpuesto  = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    impuesto    = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    valor       = this.DGFiltro_Resultados.CurrentRow.Cells[2].Value.ToString();
                    descripcion = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmPro.setImpuesto(idimpuesto, impuesto, valor, descripcion);
                    this.Hide();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        private void DGFiltro_Resultados_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    string idimpuesto, impuesto, valor, descripcion;

                    frmProducto frmPro = frmProducto.GetInstancia();

                    idimpuesto  = this.DGFiltro_Resultados.CurrentRow.Cells[0].Value.ToString();
                    impuesto    = this.DGFiltro_Resultados.CurrentRow.Cells[1].Value.ToString();
                    valor       = this.DGFiltro_Resultados.CurrentRow.Cells[2].Value.ToString();
                    descripcion = this.DGFiltro_Resultados.CurrentRow.Cells[3].Value.ToString();
                    frmPro.setImpuesto(idimpuesto, impuesto, valor, descripcion);
                    this.Hide();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
示例#13
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            frmProducto formularioProducto = new frmProducto();

            formularioProducto.ShowDialog();
        }