You are on page 1of 6

VIRIDIANA HUERTA

GARCIA
5101-I
PROGRAMACION BASICA
RUBRICA# 3
PSP: SERGIO GONZALEZ
PEREZ
cajero
cantidadoriginal billete500 billete200 billete100 billete50 billete20 mensaje
2000 4 0 0 0 0 dos mil
3000 6 0 0 0 0 tres mil
2500 5 0 0 0 0 dos mil quinientos
5000 10 0 0 0 0 cinco mil

Imports System.Data.OleDb

Public Class Form1


Dim v As Integer = 0
Dim dt As New
DataTable
Dim cn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\HuertaG\cajero.mdb")
Dim mensa As String

Private Sub cmdagregar_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles cmdagregar.Click
cn.Open()
Dim GuardarDatos As String = "Insert into cajero
(cantidadoriginal,billete500,billete200,billete100,billete50,billete20,me
nsaje)" & "values ('" & txtcant.Text & "','" & txtqui.Text & "','" &
txtdoc.Text & "','" & txtcien.Text & "','" & txtcin.Text & "','" &
txtvei.Text & "','" & txtmensa.Text & "')"
Dim dataAdapter As New OleDb.OleDbDataAdapter(GuardarDatos, cn)
dataAdapter.Fill(dt)
MsgBox("se agrego correctamente grasias por confiar en nosotros",
MsgBoxStyle.Information, "Mensaje")
cn.Close()
End Sub
Private Sub cmdcalcular_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdcalcular.Click
v = txtcant.Text
If ((txtcant.Text) = 20) Then
txtmensa.Text = "veinte"
MsgBox(mensa)

End If
If ((txtcant.Text) = 40) Then
txtmensa.Text = "cuarenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 60) Then
txtmensa.Text = "secenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 80) Then
txtmensa.Text = "ochenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 100) Then
txtmensa.Text = "cien"
MsgBox(mensa)

End If
If ((txtcant.Text) = 200) Then
txtmensa.Text = "dosientos"
MsgBox(mensa)

End If
If ((txtcant.Text) = 400) Then
txtmensa.Text = "cuatrocientos"
MsgBox(mensa)

End If
If ((txtcant.Text) = 600) Then
txtmensa.Text = "seicientos"
MsgBox(mensa)

End If
If ((txtcant.Text) = 800) Then
txtmensa.Text = "ochocientos"
MsgBox(mensa)

End If
If ((txtcant.Text) = 1000) Then
txtmensa.Text = "mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 2000) Then
txtmensa.Text = "dos mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 4000) Then
txtmensa.Text = "cuatro mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 5000) Then
txtmensa.Text = "cinco mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 6000) Then
txtmensa.Text = "seis mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 8000) Then
txtmensa.Text = "ocho mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 9000) Then
txtmensa.Text = "nueve mil"
MsgBox(mensa)

End If
If ((txtcant.Text) = 20) Then
txtmensa.Text = " veinte"
MsgBox(mensa)

End If
If ((txtcant.Text) = 30) Then
txtmensa.Text = "treinta"
MsgBox(mensa)
End If
If ((txtcant.Text) = 10) Then
txtmensa.Text = " diez"
MsgBox(mensa)

End If
If ((txtcant.Text) = 40) Then
txtmensa.Text = " cuarenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 50) Then
txtmensa.Text = " cincuenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 60) Then
txtmensa.Text = " secenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 70) Then
txtmensa.Text = " setenta"
MsgBox(mensa)

End If
If ((txtcant.Text) = 80) Then
txtmensa.Text = " ochenta"
MsgBox(mensa)

End If
If((txtcant.Text) = 90) Then
txtmensa.Text = " noventa"
MsgBox(mensa)

End If

txtqui.Text = v \ 500
v = v Mod 500
txtdoc.Text = v \ 200
v = v Mod 200
txtcien.Text = v \ 100
v = v Mod 100
txtcin.Text = v \ 50
v = v Mod 50
txtvei.Text = v \ 20
v = v Mod 20

End Sub

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


System.EventArgs) Handles MyBase.Load

End Sub
Private Sub cmdlimpiar_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdlimpiar.Click
txtcant.Text = ""
txtqui.Text = ""
txtdoc.Text = ""
txtcien.Text = ""
txtcin.Text = ""
txtvei.Text = ""
txtmensa.Text = ""
End Sub

Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Label8.Click

End Sub
End Class

You might also like