Exemplo n.º 1
0
 public static FormVenta GetInstancia()
 {
     if (_Instancia == null)
     {
         _Instancia = new FormVenta();
     }
     return(_Instancia);
 }
Exemplo n.º 2
0
        private void VentasTSMI_Click(object sender, EventArgs e)
        {
            FormVenta Form = FormVenta.GetInstancia();

            Form.MdiParent = this;
            Form.Show();
            Form.IdTrabajador = IdTrabajador;
        }
Exemplo n.º 3
0
        private void DGVListado_DoubleClick(object sender, EventArgs e)
        {
            FormVenta form = FormVenta.GetInstancia();

            var Parm1 = Convert.ToInt32(DGVListado.CurrentRow.Cells["idCliente"].Value);
            var Parm2 = Convert.ToString(DGVListado.CurrentRow.Cells["apellidos"].Value) + " " + Convert.ToString(DGVListado.CurrentRow.Cells["nombre"].Value);

            form.SetCliente(Parm1, Parm2);
            this.Hide();
        }
        private void DGVListado_DoubleClick(object sender, EventArgs e)
        {
            FormVenta form = FormVenta.GetInstancia();

            var Parm1 = Convert.ToInt32(DGVListado.CurrentRow.Cells["idDetalle_ingreso"].Value);
            var Parm2 = Convert.ToString(DGVListado.CurrentRow.Cells["nombre"].Value);
            var Parm3 = Convert.ToDecimal(DGVListado.CurrentRow.Cells["precio_compra"].Value);
            var Parm4 = Convert.ToDecimal(DGVListado.CurrentRow.Cells["precio_venta"].Value);
            var Parm5 = Convert.ToInt32(DGVListado.CurrentRow.Cells["stock_actual"].Value);
            var Parm6 = Convert.ToDateTime(DGVListado.CurrentRow.Cells["fecha_vencimiento"].Value);

            form.SetArticulo(idArtuculo: Parm1, nombre: Parm2, precio_compra: Parm3,
                             precio_venta: Parm4, stock: Parm5, fecha_vencimiento: Parm6);
            this.Hide();
        }
Exemplo n.º 5
0
 private void FormVentas_FormClosing(object sender, FormClosingEventArgs e) => _Instancia = null;