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

Public Class Form1

Dim puntaje, diurno, nocturno, ordinario, exonerado, radiobut, contadorIn,


numerador, index, conn1, conn2, conn3, conn4 As Integer

'AGREGAR DATOS A LISTBOX


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click

If Val(TextBox3.Text) < 12 Then

MsgBox("nota minima de ingreso es 12")

End If

If (Val(TextBox3.Text) >= 12 And Val(TextBox3.Text) <= 20) And (nocturno <


3) And (radiobut = 3) Then
numerador = numerador + 1
TextBox4.Text = "aprobo"
nocturno = nocturno + 1
ListBox1.Items.Add(Str(numerador) + " "
+ TextBox2.Text + " " + ComboBox1.SelectedItem)

ElseIf nocturno = 3 And conn3 = 0 Then


conn3 = conn3 + 1
MsgBox("HA INGRESADO 3 PERSONAS DEL MISMO TURNO/ESPECIALIDAD")

End If

If (Val(TextBox3.Text) >= 12 And Val(TextBox3.Text) <= 20) And (diurno < 3)


And (radiobut = 1) Then
numerador = numerador + 1
TextBox4.Text = "aprobo"
diurno = diurno + 1
ListBox1.Items.Add(Str(numerador) + " "
+ TextBox2.Text + " " + ComboBox1.SelectedItem)
ElseIf diurno = 3 And conn1 = 0 Then
conn1 = conn1 + 1
MsgBox("HA INGRESADO 3 PERSONAS DEL MISMO TURNO/ESPECIALIDAD")

End If

If (Val(TextBox3.Text) >= 12 And Val(TextBox3.Text) <= 20) And (ordinario <


3) And (radiobut = 2) Then
numerador = numerador + 1
TextBox4.Text = "aprobo"
ordinario = ordinario + 1
ListBox1.Items.Add(Str(numerador) + " "
+ TextBox2.Text + " " + ComboBox1.SelectedItem)
ElseIf ordinario = 3 And (conn2 = 0) Then
conn2 = conn2 + 1
MsgBox("HA INGRESADO 3 PERSONAS DEL MISMO TURNO/ESPECIALIDAD")

End If

If (Val(TextBox3.Text) >= 12 And Val(TextBox3.Text) <= 20) And (exonerado <


3) And (radiobut = 4) Then
numerador = numerador + 1
TextBox4.Text = "aprobo"
exonerado = exonerado + 1
ListBox1.Items.Add(Str(numerador) + " "
+ TextBox2.Text + " " + ComboBox1.SelectedItem)
ElseIf exonerado = 3 And conn4 = 0 Then
conn4 = conn4 + 1
MsgBox("HA INGRESADO 3 PERSONAS DEL MISMO TURNO/ESPECIALIDAD")

End If

End Sub

'SALIR DEL PROGRAMA


Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
End
End Sub

Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs)


Handles RadioButton1.CheckedChanged
radiobut = 1
End Sub

Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs)


Handles RadioButton3.CheckedChanged
radiobut = 2
End Sub

Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs)


Handles RadioButton2.CheckedChanged
radiobut = 3
End Sub

Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs)


Handles RadioButton4.CheckedChanged
radiobut = 4
End Sub

'LIMPIAMOS TODO
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles
Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
ComboBox1.SelectedIndex = -1
ListBox1.Items.Clear()
RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False
RadioButton4.Checked = False
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles


Button4.Click
index = ListBox1.SelectedIndex
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
End Sub
End Class

QUISPE FRANK CHRISTOPHER QUISPE PACHECO

You might also like