1. Profil Team Sistem Refill E-Voucher

image_wedhus1

Nama : Yudha Ari S

NRP    :  5107100606

Kelas  :  X

image_koko1

Nama  : Moh Kohari

Nrp      : 5107100619

Kelas   :  X

2. Tabel Fisik dari sistem Refill E-Voucher

Tabel Data_Order

table_data_order1

Tabel Data_Voucher

table_data_voucher1

Table Data_Supplier

table_data_supplier

Table Data_Deposit_Supplier

table_data_deposit_supplier

Table Sintak_Order

table_sintak_order

Table Relations

table-relations

3. Kode program dengan menggunakan bahasa pemrograman

Visual Basic

‘ ————————————–
‘ Modul input_data_order_evoucher (1.1)
‘ ————————————–

Private mCommPort As Integer
Private mPortOpen As Boolean
Private mNameModem As String
Private mIMEI As String
Private mBuffer As String

Private Declare Sub Sleep Lib “kernel32” (ByVal dwMilliseconds As Long)

Dim nomer_hp As String
Dim kode_voucher As String
Dim nominal As Integer
Dim kode_supplier As String
Dim harga_beli As Integer, harga_jual As Integer

Public Sub initial_data_order()
nomer_hp = “”
kode_voucher = “”
nominal = 0
kode_supplier = “”

nomer_hp = frmIDOeVoucher.txtNomorHP.Text
kode_voucher = frmIDOeVoucher.cbKodeVoucher.Text
nominal = CInt(frmIDOeVoucher.cbNominasi.Text)
kode_supplier = frmIDOeVoucher.cbNamaSupplier.Text
End Sub

Public Sub load_buy_sell()
Dim dbRS As New ADODB.Recordset

Call dbRS.Open(“SELECT harga_beli, harga_jual ” & _
“FROM Data_Voucher ” & _
“WHERE kode_voucher = ” & “‘” & kode_voucher & “‘” & _
“AND nominasi = ” & nominal & _
“AND kode_supplier = ” & “‘” & kode_supplier & “‘”, _
MainFrm.dbConn, 1, 4)

harga_beli = dbRS!harga_beli
harga_jual = dbRS!harga_jual
End Sub

Public Sub insert_data_order()
Dim dbRS As New ADODB.Recordset

Call dbRS.Open(“INSERT INTO Data_Order ” & _
“(kode_voucher, nominasi, kode_supplier, tanggal_order, tanggal_update_status, nomor_hp, harga_beli, harga_jual, status_order) ” & _
“VALUES ” & _
“(” & “‘” & kode_voucher & “‘” & “, ” & _
nominal & “, ” & _
“‘” & kode_supplier & “‘” & “, ” & _
“NOW(), ” & _
“NOW(), ” & _
“‘” & nomer_hp & “‘” & “, ” & _
harga_beli & “, ” & _
harga_jual & “, ” & _
0 & “)”, _
MainFrm.dbConn, 1, 4)
End Sub

Public Sub input_data_order_evoucher()
Call initial_data_order

If nomer_hp <> “” And kode_voucher <> “” And nominal <> 0 And kode_supplier <> “” Then
Call load_buy_sell
Call insert_data_order

MsgBox “Data order evoucher berhasil ditambahkan”, vbInformation, “Information”
Else
MsgBox “Data order evoucher tidak lengkap”, vbExclamation, “Warning”
End If
End Sub

‘ ———————————
‘ Modul kirim_order_evoucher (1.2)
‘ ———————————
Dim order_id As Integer
Dim kode_voucher As String
Dim nominasi As Integer
Dim kode_supplier As String
Dim nomer_hp As String
Dim sintak As String
Dim sms_centre As String

Public Sub search__send_data_order()
Dim dbRS As New ADODB.Recordset

Call dbRS.Open(“SELECT * FROM Data_Order WHERE status_order = 0”, MainFrm.dbConn, 1, 4)

If dbRS.RecordCount > 0 Then
order_id = dbRS!nomor_order
kode_voucher = dbRS!kode_voucher
nominasi = dbRS!nominasi
kode_supplier = dbRS!kode_supplier
nomer_hp = dbRS!nomor_hp

dbRS.Close

Call dbRS.Open(“SELECT * FROM Sintak_Order WHERE kode_supplier = ” & “‘” & kode_supplier & “‘” & ” AND keterangan = ‘Trx Order Voucher'”, MainFrm.dbConn, 1, 4)

sintak = dbRS!sintak & “.” & kode_voucher & nominasi & “.” & nomer_hp & “.”

dbRS.Close

Call dbRS.Open(“SELECT * FROM Data_Supplier WHERE kode_supplier = ” & “‘” & kode_supplier & “‘”, MainFrm.dbConn, 1, 4)

sms_centre = dbRS!sms_center
sintak = sintak & dbRS!pin

SendSMS sms_centre, sintak

dbRS.Close

Call dbRS.Open(“UPDATE Data_Order SET status_order = 1 WHERE nomor_order = ” & order_id, MainFrm.dbConn, 1, 4)
End If
End Sub

‘ —————————————————————-
‘ Modul cek_nomerhp_kodevoucher_vsn_statusorder_sisasaldo (1.3.1)
‘ —————————————————————-
‘ Modul update_vsn_dan_status_data_order (1.3.2)
‘ —————————————————————-
‘ Modul update_saldo (1.3.3)
‘ —————————————————————-
Dim nomer_hp As String
Dim kode_voucher As String
Dim supplier As String
Dim vsn As String
Dim status_order As Integer
Dim saldo As Integer

Private Function cek_sb_evoucher(ByVal sms As String) As Boolean
If UCase(Split(sms, ” “)(4)) = “BERHASIL!” And UCase(Left(Split(sms, ” “)(5), 4)) = “VSN:” Then
nomer_hp = Split(Split(sms, ” “)(3), “.”)(1)
kode_voucher = Split(Split(sms, ” “)(3), “.”)(0)

vsn = Replace(Split(sms, ” “)(5), “VSN:”, “”)
status_order = 4
saldo = CInt(Replace(Split(sms, ” “)(7), “saldo:”, “”))

cek_sb_evoucher = True
Else
cek_sb_evoucher = False
End If
End Function

Public Function update_data_order(ByVal sms As String) As Boolean
Dim dbRS As New ADODB.Recordset
Dim order_id As Integer

If cek_sb_evoucher(sms) = True Then
Call dbRS.Open(“SELECT * FROM Data_Order ” & _
“WHERE (kode_voucher & nominasi) = ” & “‘” & kode_voucher & “‘” & _
” AND nomor_hp = ” & “‘” & nomer_hp & “‘” & _
” AND status_order = 1″, _
MainFrm.dbConn, 1, 4)

If dbRS.RecordCount > 0 Then
order_id = dbRS!nomor_order
supplier = dbRS!kode_supplier

dbRS.Close

Call dbRS.Open(“UPDATE Data_Order ” & _
“SET status_order = 4, ” & _
“vsn = ” & “‘” & vsn & “‘ ” & _
“WHERE nomor_order = ” & order_id, _
MainFrm.dbConn, 1, 4)

dbRS.Close

Call dbRS.Open(“UPDATE Data_Supplier ” & _
“SET saldo = ” & saldo & _
“WHERE kode_supplier = ” & “‘” & supplier & “‘”, _
MainFrm.dbConn, 1, 4)
End If

update_data_order = True
Else
update_data_order = False
End If
End Function

4. Integrasikan tabel dan modul program dengan interface input/output yang dibuat.

Link draft aplikasi beserta Database:

passwd-1: ekodaADT

passwd-2: ekodaADTFull

dbRefill.zip
appRefill.zip
app_db__Refill.zip

5. Kesimpulan

Implementasi untuk analisis dan rancangan yang telah dibuat tidak dapat dilakukan dengan sempurna tanpa adanya penyesuaian pada desain.
Penyesuaian tersebut yaitu berupa:
1. Desain untuk modul konfigurasi pada database, dan
2. Desain untuk modul konfigurasi pada hardware yang digunakan
karena pada desain belum disertakan.

One Response to “Jawaban UAS ADT”


  1. thanks for article.. i really like it your articles

Leave a comment