public static frmInventario_Ingreso GetInstancia() { if (_Instancia == null) { _Instancia = new frmInventario_Ingreso(); } return(_Instancia); }
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); } }
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 ingresosToolStripMenuItem_Click(object sender, EventArgs e) { frmInventario_Ingreso frmInventario_Ingreso = frmInventario_Ingreso.GetInstancia(); frmInventario_Ingreso.MdiParent = this; frmInventario_Ingreso.Show(); frmInventario_Ingreso.Guardar = Convert.ToString(this.SQL_Guardar); frmInventario_Ingreso.Editar = Convert.ToString(this.SQL_Editar); frmInventario_Ingreso.Eliminar = Convert.ToString(this.SQL_Eliminar); frmInventario_Ingreso.Consultar = Convert.ToString(this.SQL_Consultar); frmInventario_Ingreso.Imprimir = Convert.ToString(this.SQL_Imprimir); }
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 frmInventario_Ingreso_FormClosing(object sender, FormClosingEventArgs e) { _Instancia = null; }