Tips Dan Trick
this site the web

Source Code Menu Transaksi Check In

Source Code Menu Transaksi Check In
Private Sub Form_Load()
xtgl = Format(Date, "DD/MM/YYYY")
xtandpeng.AddItem "KTP"
xtandpeng.AddItem "SIM"
xtandpeng.AddItem "KARTU PELAJAR"
    Adodc1.RecordSource = "Select count(*) as JmlRec from Transaksi"
    Adodc1.Refresh
        pj = Len(Trim(Str(Adodc1.Recordset!JmlRec)))
        xno = "TR" + Left("000", 5 - pj) + Trim(Str(Adodc1.Recordset!JmlRec + 1))

Adodc2.RecordSource = "Select * From Type_Kamar "
Adodc2.Refresh
        Do While Not Adodc2.Recordset.EOF
            xTypeKmr.AddItem Adodc2.Recordset!Type_Kamar
            Adodc2.Recordset.MoveNext
        Loop
Adodc4.RecordSource = "select * from tmptrans"
Adodc4.Refresh
    Do While Not Adodc4.Recordset.EOF
        Adodc4.Recordset.Delete
        Adodc4.Recordset.MoveNext
    Loop
End Sub

Private Sub Keluar_Click()
Unload Me
frmMenu.Show
End Sub

Private Sub optLak_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then xalamat.SetFocus
End Sub

Private Sub simpan_Click()
Adodc1.RecordSource = "select * from Transaksi"
Adodc1.Refresh
Adodc5.RecordSource = "Select * from Detail_Transaksi"
Adodc5.Refresh
Adodc6.RecordSource = "select * from Tamu where No_Png = '" & xnoiden & "'"
Adodc6.Refresh
    If Adodc6.Recordset.RecordCount = 0 Then
        Adodc6.Recordset.AddNew
        Adodc6.Recordset!No_Png = xnoiden
        Adodc6.Recordset!Jenis_png = xtandpeng
        Adodc6.Recordset!Nama = xnama
        If optLak.Value = True Then
            Adodc6.Recordset!Jenis_Kelamin = "LAKI-LAKI"
        Else
            Adodc6.Recordset!Jenis_Kelamin = "WANITA"
        End If
        Adodc6.Recordset!Alamat = xalamat
        Adodc6.Recordset!Telepon = xtelp
        Adodc6.Recordset!Umur = xumur
        Adodc6.Recordset.Update
    Else
        Adodc6.Recordset.Clone
        Adodc6.Recordset!No_Png = xnoiden
        Adodc6.Recordset!Jenis_png = xtandpeng
        Adodc6.Recordset!Nama = xnama
        If optLak.Value = True Then
            Adodc6.Recordset!Jenis_Kelamin = "LAKI-LAKI"
        Else
            Adodc6.Recordset!Jenis_Kelamin = "PEREMPUAN"
        End If
        Adodc6.Recordset!Alamat = xalamat
        Adodc6.Recordset!Umur = xumur
        Adodc6.Recordset!Telepon = xtelp
        Adodc6.Recordset.Update
    End If
Adodc4.RecordSource = "select * from tmptrans"
Adodc4.Refresh
Adodc2.RecordSource = "select * from Petugas"
Adodc2.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset!No_Transaksi = xno
Adodc1.Recordset!No_Peng = xnoiden
Adodc1.Recordset!kode_petugas = Adodc2.Recordset!kode_petugas
Adodc1.Recordset!Tgl_ChekIn = xtgl
Adodc1.Recordset!Jml_Kamar = txtJmlKmr
Adodc1.Recordset!Dp = xdp
Adodc1.Recordset!biaya = xbiaya
Adodc1.Recordset!Status = 1
Adodc1.Recordset.Update
    Do While Not Adodc4.Recordset.EOF
        Adodc5.Recordset.AddNew
        Adodc5.Recordset!No_Trans = Adodc1.Recordset!No_Transaksi
        Adodc5.Recordset!No_Kamar = Adodc4.Recordset!No_Kamar
        Adodc5.Recordset.Update
        Adodc4.Recordset.MoveNext
    Loop
    MsgBox "data tersimpan"

Unload Me
Load Me
Show
End Sub

Ikuti Artikel selengkapnya anda bisa menghubungi Admin Untuk Listing Program Lengkap, Trims....
 

W3C Validations

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi dapibus dolor sit amet metus suscipit iaculis. Quisque at nulla eu elit adipiscing tempor.

Usage Policies