private void CargarDetalle(Venta venta) { FrmDetalleVenta fDetVenta = FrmDetalleVenta.GetInstance(); fDetVenta.SetVenta(venta); fDetVenta.ShowDialog(); }
public static FrmDetalleVenta GetInstance() { if (_instancia == null) { _instancia = new FrmDetalleVenta(); } return(_instancia); }
private void dgvProductos_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (txtFlag.Text == "1") { FrmDetalleVenta frmDetVenta = FrmDetalleVenta.GetInstance(); if (dgvProductos.CurrentRow != null) { Producto producto = new Producto(); producto.Id = Convert.ToInt32(dgvProductos.CurrentRow.Cells["Id"].Value.ToString()); producto.Nombre = dgvProductos.CurrentRow.Cells["Nombre"].Value.ToString(); producto.Stock = Convert.ToDouble(dgvProductos.CurrentRow.Cells["Stock"].Value.ToString()); producto.PrecioVenta = Convert.ToDouble(dgvProductos.CurrentRow.Cells["PrecioVenta"].Value.ToString()); frmDetVenta.SetProducto(producto); frmDetVenta.Show(); Close(); } } }