Diberdayakan oleh Blogger.
RSS

E-LEARNING SOFTWARE

Membuat Aplikasi Restoran Sederhana Dengan Microsoft Visual Basic 6.0

Terdiri dari 3Form, Database, MDI Form, Dan Modul.


Membuat Form Penjualan/Form1



Private Sub Command1_Click()
MsgBox "Data Tersimpan", vbInformation, "INFORMATION"
simpan
End Sub

Sub simpan()
rsJual.AddNew
rsJual(0) = Text1.Text
rsJual(1) = Text2.Text
rsJual(2) = Text3.Text
rsJual(3) = Text4.Text
rsJual(4) = Text5.Text
rsJual(5) = Text6.Text
rsJual.Save
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
rsJual.Update
rsJual(0) = Text1.Text
rsJual(1) = Text2.Text
rsJual(2) = Text3.Text
rsJual(3) = Text4.Text
rsJual(4) = Text5.Text
rsJual(5) = Text6.Text
rsJual.Update
MsgBox "TerUpdate", vbInformation, "INFORMATION"
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
koneksi (1)
Butab (1)
isi_tabel
End Sub

Sub isi_tabel()
Text1.Text = rsJual(0)
Text2.Text = rsJual(1)
Text3.Text = rsJual(2)
Text4.Text = rsJual(3)
Text5.Text = rsJual(4)
Text6.Text = rsJual(5)
End Sub

Private Sub text1_keypress(keyascii As Integer)
If keyascii = 13 Then
    If Text1.Text = "" Then
    MsgBox "ISI DULU..!!", vbInformation, "INFORMATION"
    Text1.SetFocus
Else
    Text2.SetFocus
    End If
End If
End Sub

 
Membuat Form Pembelian/Form2



Private Sub Command1_Click()
MsgBox "Data Tersimpan", vbInformation, "INFORMATION"
simpan
End Sub

Sub simpan()
rsBeli.AddNew
rsBeli(0) = Text1.Text
rsBeli(1) = Text2.Text
rsBeli(2) = Text3.Text
rsBeli(3) = Text4.Text
rsBeli(4) = Text5.Text
rsBeli(5) = Text6.Text
rsBeli.Save
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text1.SetFocus
End Sub


Private Sub Command3_Click()
rsBeli.Update
rsBeli(0) = Text1.Text
rsBeli(1) = Text2.Text
rsBeli(2) = Text3.Text
rsBeli(3) = Text4.Text
rsBeli(4) = Text5.Text
rsBeli(5) = Text6.Text
rsBeli.Update
MsgBox "TerUpdate", vbInformation, "INFORMATION"
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
koneksi (1)
Butab (2)
isi_tabel
End Sub

Sub isi_tabel()
Text1.Text = rsBeli(0)
Text2.Text = rsBeli(1)
Text3.Text = rsBeli(2)
Text4.Text = rsBeli(3)
Text5.Text = rsBeli(4)
Text6.Text = rsBeli(5)
End Sub

Private Sub text1_keypress(keyascii As Integer)
If keyascii = 13 Then
    If Text1.Text = "" Then
    MsgBox "ISI DULU..!!"
    Text1.SetFocus
Else
    Text2.SetFocus
    End If
End If
End Sub

Membuat Form Menu/Form3, Berisi untuk mengetahui Stock makanan di Restoran. 




 Private Sub Command1_Click()
simpan
End Sub

Sub simpan()
rsMenu.AddNew
rsMenu(0) = Text1.Text
rsMenu(1) = Text2.Text
rsMenu(2) = Text3.Text
rsMenu(3) = Text4.Text
rsMenu.Save
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
MsgBox "Tambah Data", vbInformation, "INFORMATION"
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()
rsMenu.Update
rsMenu(0) = Text1.Text
rsMenu(1) = Text2.Text
rsMenu(2) = Text3.Text
rsMenu(3) = Text4.Text
rsMenu.Update
MsgBox "TerUpdate", vbInformation, "INFORMATION"
End Sub

Private Sub Form_Load()
koneksi (1)
'Butab (1)
'Butab (2)
Butab (3)
isi_tabel
End Sub

Sub isi_tabel()
Text1.Text = rsMenu(0)
Text2.Text = rsMenu(1)
Text3.Text = rsMenu(2)
Text4.Text = rsMenu(3)
End Sub

Private Sub Image1_Click()

End Sub

Private Sub text1_keypress(keyascii As Integer)
If keyascii = 13 Then
    If Text1.Text = "" Then
    MsgBox "ISI DULU..!!"
    Text1.SetFocus
Else
    Text2.SetFocus
    End If
End If
End Sub

Selanjutnya Untuk membuat modul Klik Saja Di Sini.
Dan untuk membuat MDI Formnya Tutorialnya Lihat Di Sini.
Okay Terima Kasih ^_^

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar