Esempio n. 1
0
        private void dataListado_DoubleClick(object sender, EventArgs e)
        {
            frmVenta form = frmVenta.GetInstancia();
            string   par1, par2;
            decimal  par3, par4;
            int      par5;
            DateTime par6;

            par1 = Convert.ToString(this.dataListado.CurrentRow.Cells["iddetalle_ingreso"].Value);
            par2 = Convert.ToString(this.dataListado.CurrentRow.Cells["nombre"].Value);
            par3 = Convert.ToDecimal(this.dataListado.CurrentRow.Cells["precio_compra"].Value);
            par4 = Convert.ToDecimal(this.dataListado.CurrentRow.Cells["precio_venta"].Value);
            par5 = Convert.ToInt32(this.dataListado.CurrentRow.Cells["stock_actual"].Value);
            par6 = Convert.ToDateTime(this.dataListado.CurrentRow.Cells["fecha_vencimiento"].Value);
            form.setArticulo(par1, par2, par3, par4, par5, par6);
            this.Hide();
        }
        private void DataListado_DoubleClick(object sender, EventArgs e)
        {
            frmVenta frm = frmVenta.getInstancia();
            string   p1, p2;
            decimal  pcompra, pventa;
            int      pstock;
            DateTime fvencimiento;

            p1           = Convert.ToString(dataListado.CurrentRow.Cells["iddetalle_ingreso"].Value);
            p2           = Convert.ToString(dataListado.CurrentRow.Cells["nombre"].Value);
            pcompra      = Convert.ToDecimal(dataListado.CurrentRow.Cells["precio_compra"].Value);
            pventa       = Convert.ToDecimal(dataListado.CurrentRow.Cells["precio_venta"].Value);
            pstock       = Convert.ToInt32(dataListado.CurrentRow.Cells["stock_actual"].Value);
            fvencimiento = Convert.ToDateTime(dataListado.CurrentRow.Cells["fecha_vencimiento"].Value);
            frm.setArticulo(p1, p2, pcompra, pventa, pstock, fvencimiento);
            this.Hide();
        }