Documente Academic
Documente Profesional
Documente Cultură
Inherits Form
Return _instancia
End Function
If Convert.ToBoolean(row.Cells(0).Value) Then
Codigo = Convert.ToString(row.Cells(1).Value)
Rpta = NIngreso.Anular(Convert.ToInt32(Codigo))
If Rpta.Equals("OK") Then
Me.MensajeOk("Se Anuló Correctamente el Ingreso")
Else
Me.MensajeError(Rpta)
End If
End If
Next
Me.Mostrar()
End If
Catch ex As Exception
MessageBox.Show(ex.Message + ex.StackTrace)
End Try
End Sub
If Me.IsNuevo Then
rpta = NIngreso.Insertar(Idtrabajador,
Convert.ToInt32(Me.txtIdproveedor.Text), dtFecha.Value, cbTipo_Comprobante.Text,
txtSerie.Text, txtCorrelativo.Text, Convert.ToDecimal(txtIgv.Text), "EMITIDO",
dtDetalle)
End If
If rpta.Equals("OK") Then
If Me.IsNuevo Then
Me.MensajeOk("Se Insertó de forma correcta el registro")
End If
Else
Me.MensajeError(rpta)
End If
Me.IsNuevo = False
Me.Botones()
Me.Limpiar()
Me.limpiarDetalle()
Me.Mostrar()
End If
Catch ex As Exception
MessageBox.Show(ex.Message + ex.StackTrace)
End Try
End Sub
If Convert.ToInt32(row("idarticulo")) =
Convert.ToInt32(Me.txtIdarticulo.Text) Then
registrar = False
Me.MensajeError("YA se encuentra el artículo en el
detalle")
End If
Next
If registrar Then
Dim subTotal As Decimal = Convert.ToDecimal(Me.txtStock.Text) *
Convert.ToDecimal(Me.txtPrecio_Compra.Text)
totalPagado = totalPagado + subTotal
Me.lblTotal_Pagado.Text = totalPagado.ToString("#0.00#")
Dim row As DataRow = Me.dtDetalle.NewRow()
row("idarticulo") = Convert.ToInt32(Me.txtIdarticulo.Text)
row("articulo") = Me.txtArticulo.Text
row("precio_compra") =
Convert.ToDecimal(Me.txtPrecio_Compra.Text)
row("precio_venta") =
Convert.ToDecimal(Me.txtPrecio_Venta.Text)
row("stock_inicial") = Convert.ToInt32(Me.txtStock.Text)
row("fecha_produccion") = dtFecha_Produccion.Value
row("fecha_vencimiento") = dtFecha_Vencimiento.Value
row("subtotal") = subTotal
Me.dtDetalle.Rows.Add(row)
Me.limpiarDetalle()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message + ex.StackTrace)
End Try
End Sub