예제 #1
0
        private void CargarDetalle(Venta venta)
        {
            FrmDetalleVenta fDetVenta = FrmDetalleVenta.GetInstance();

            fDetVenta.SetVenta(venta);
            fDetVenta.ShowDialog();
        }
예제 #2
0
        public static FrmDetalleVenta GetInstance()
        {
            if (_instancia == null)
            {
                _instancia = new FrmDetalleVenta();
            }

            return(_instancia);
        }
예제 #3
0
        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();
                }
            }
        }