Beispiel #1
0
        private void añadedetalle(DataGridViewRow fila)
        {
            clsDetalleFacturaVenta deta = new clsDetalleFacturaVenta();

            deta.CodProducto     = Convert.ToInt32(fila.Cells[codproducto.Name].Value);
            deta.CodVenta        = Convert.ToInt32(venta.CodFacturaVenta);
            deta.CodAlmacen      = frmLogin.iCodAlmacen;
            deta.UnidadIngresada = Convert.ToInt32(fila.Cells[codunidad.Name].Value);
            deta.SerieLote       = fila.Cells[serielote.Name].Value.ToString();
            deta.Cantidad        = Convert.ToDouble(fila.Cells[cantidad.Name].Value);
            deta.PrecioUnitario  = Convert.ToDouble(fila.Cells[preciounit.Name].Value);
            //deta.Subtotal = Convert.ToDouble(fila.Cells[importe.Name].Value);
            deta.Subtotal             = Convert.ToDouble(fila.Cells[valorventa.Name].Value);
            deta.Descuento1           = Convert.ToDouble(fila.Cells[dscto1.Name].Value);
            deta.MontoDescuento       = Convert.ToDouble(fila.Cells[montodscto.Name].Value);
            deta.Igv                  = Convert.ToDouble(fila.Cells[igv.Name].Value);
            deta.Importe              = Convert.ToDouble(fila.Cells[precioventa.Name].Value);
            deta.PrecioReal           = Convert.ToDouble(fila.Cells[precioreal.Name].Value);
            deta.ValoReal             = Convert.ToDouble(fila.Cells[valoreal.Name].Value);
            deta.CodUser              = frmLogin.iCodUser;
            deta.CantidadPendiente    = Convert.ToDouble(fila.Cells[cantidad.Name].Value);
            deta.Moneda               = Convert.ToInt32(cmbMoneda.SelectedValue);
            deta.CodDetalleCotizacion = 0;
            detalle1.Add(deta);
        }
Beispiel #2
0
 public Boolean updatedetalle(clsDetalleFacturaVenta detalle)
 {
     try
     {
         return(Mventa.updatedetalle(detalle));
     }
     catch (Exception ex)
     {
         DevComponents.DotNetBar.MessageBoxEx.Show("Se encontró el siguiente problema: " + ex.Message,
                                                   "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return(false);
     }
 }