Examen de Taller de Programación Concurrente

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Examen de Taller de Programación Concurrente

1. Ventana Factura

Código:
Imports System.Data.SqlClient
Public Class Facturacion
Dim fila As Integer = -1
Dim TIPO As String = ""
Dim D As Integer = 0
Dim pre As Double

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
Me.txtFecha.Text = Now
End Sub

Private Sub btnAgregar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnAgregar.Click
Me.DatosGrid.Rows.Add("")
End Sub

Private Sub btnQuitar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnQuitar.Click
If fila <> -1 Then

Me.DatosGrid.Rows.
RemoveAt(fila)
fila = -1
Else
MsgBox("Debe eliminar una fila")
End If
End Sub

Private Sub btnGrabar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnGrabar.Click
Try
'CONDICIONES EN BOLETA
If radBoleta.Checked = True Then
TIPO = "BOLETA"
End If

If radFactura.Checked = True Then


TIPO = "FACTURA"
End If

'CABECERA cn.Open()
Dim cmd As New SqlCommand("SP_MANTEDOCUMENTO", cn)
Dim prm As New SqlParameter

With cmd
.CommandType = CommandType.StoredProcedure

prm = .Parameters.Add("@NDO",
SqlDbType.VarChar, 5) prm.Value =
Me.txtNum.Text

2. Matricula:

You might also like