Anda di halaman 1dari 342

RANCANGAN SISTEM INFORMASI

PENJUALAN SPAREPART DAN SERVICE


PADA AHASS 8171 TUGU PERMAI
DENGAN METODOLOGI BERORIENTASI OBYEK

Oleh :

BEGAWAN MARIANDI ABDULLAH


NIM : 0422500278

UNIVERSITAS BUDI LUHUR


FAKULTAS TEKNOLOGI INFORMASI
JAKARTA

SEMESTER GENAP
2007/2008
RANCANGAN SISTEM INFORMASI
PENJUALAN SPAREPART DAN SERVICE
PADA AHASS 8171 TUGU PERMAI
DENGAN METODOLOGI BERORIENTASI OBYEK

TUGAS AKHIR
Diajukan untuk memenuhi persyaratan
guna memperoleh gelar Sarjana Komputer

Oleh :

BEGAWAN MARIANDI ABDULLAH


NIM : 0422500278

UNIVERSITAS BUDI LUHUR


FAKULTAS TEKNOLOGI INFORMASI
JAKARTA

SEMESTER GENAP
2007/2008
ABSTRAKSI

PT Astra Honda Motor merupakan sinergi keunggulan teknologi dan jaringan


pemasaran di Indonesia, sebuah pengembangan kerja sama antara Honda Motor Company
Limited, Jepang, dan PT Astra International Tbk, Indonesia.
Jaringan Pemeliharaan adalah bagian dari PT Astra Honda Motor yang salah satu
tugasnya adalah sebagai layanan purna jual. Beberapa hal yang dilakukan antara lain,
menjadi yang terbaik dalam memberikan pelayanan kepada pelanggan (Customer
Satisfaction Index No. 1) yaitu dengan memberikan perbaikan dan pelayanan terbaik di
bengkel resmi Honda/AHASS (Astra Honda Authorized Service Station) dan selalu
memberikan kepuasan bagi konsumen sepeda motor Honda.
Pihak Astra Honda Motor merupakan pihak yang bertugas dalam mendukung
terhadap kebutuhan AHASS, mulai dari menata ruang bengkel, menyediakan perlengkapan
bengkel, serta mebuat system administrasi bengkel. Pihak Astra Honda Motor juga akan
melatih manajemen, mendidik montir serta menunjuk kepela bengkel.
Dalam usaha membantu pihak AHASS 8171 Tugu Permai, penulis mencoba untuk
mengoptimalkan system pengolahan data yang baru yaitu system yang terkomputerisasi. Ini
dimaksudkan untuk mengoptimalkan kinerja AHASS 8171 Tugu Permai sehingga menjadi
lebih efektif dan efisien dalam pengolahan data maupun dalam pembuatan dokumen
laporan, serta di gunakan untuk mempercepat dalam pengambilan keputusan.
KATA PENGANTAR

Segala puji syukur yang tidak terhingga penulis haturkan atas kehadirat Allah SWT,
yang telah memberikan perpanjangan tanganNya untuk seorang hambaNya yang lemah ini
hingga dapat menyelesaikan skripsi yang berjudul “Sistem Informasi Penjualan Sparepart dan
Service pada AHASS 8171 Tugu Permai“. Pada kesempatan ini, penulis ingin menyampaikan
terima kasih kepada semua pihak yang telah membantu, terutama kepada:
1. Allah SWT yang telah memberikan petunjuk dan karunia-Nya sehingga saya dapat
menyelesaikan skripsi ini dengan baik, dari awal hingga skripsi ini selesai disusun.
2. Kepada Mami, Papi, Abhank, semua pengorbanan, penantian, kesabaran dan dukungan
serta doa yang tak henti-hentinya. Juga buat Maz Han, Tante, Om, Iis, Emak, Mba Bis
serta semua saudaraku terima kasih atas segala doa, pengorbanan, dan perhatiannya.
3. Dekan Fakultas Teknologi Informasi, Bapak Hari Soetanto, S.Kom, M.Sc.
4. Ketua Program Studi Sistem Informasi, Bapak Deni Mahdiana, M.Kom, MM.
5. Bapak Bruri Trya Sartana, M.M., M.Kom selaku dosen pembimbing yang telah
memberikan bimbingan dengan penuh kesabaran dalam membimbing, terima kasih atas
saran–sarannya serta telah meluangkan waktunya sehingga penulis dapat menyelesaikan
skripsi ini dengan baik.
6. Seluruh Dosen yang selama ini sudah memberikan ilmu dan bimbingan semasa kuliah
semoga ilmu tersebut bermanfaat untuk penulis.
7. Bpk. Mukhrijul Adli. S.H beserta Keluarga selaku pemilik AHASS 8171 Tugu Permai yang
telah memberikan kesempatan kepada penulis untuk mengadakan riset di perusahaan
yang dipimpinnya.
8. Kepada Atha serta keluarga yang telah banyak membantu. Mengajari penulis dengan
penuh kesabaran dan telah mengorbankan waktu, tenaga, serta pikirannya, terima kasih
atas bantuannya.
9. Kepada Mr. Yakub, Budi dan Bang Jaloe yang telah membantu dalam logika program.
10. Kepada teman-teman Anhar, Sigit, Yanda, Rendra, Yuda, Herlita, Ilham, Irza, Mursid,
Aceh, Gembul, Moel, Gethy, ulil dan semua Teman-teman yang tidak dapat penulis
sebutkan satu persatu terima kasih atas doa, komentar, dukungan, saran dan semangat
yang kalian berikan kepada penulis.
11. Kepada sahabat-sahabat ku Ira, Ifkar, Kalam, Galang, Cule, Pipit, Irma, Mega,
Quepancong, Mbuy, Kelvin, Adhee, Astrie, Arab, Daenk dan yang tidak dapat penulis
sebutkan satu persatu termikasih telah memberikan perhatian dan suport yang luar
biasa.
12. Buat teman-teman seperjuangan yang tidak bisa disebutkan satu persatu baik dari
jurusan TI, SI, ataupun KA angkatan 2004. ”Selamat Berjuang....dan tetap semangat!!! ”
Akhir kata dengan segala kerendahan hati Penulis memohon maaf yang sebesar-
besarnya atas kekurangan yang terdapat dalam skripsi ini.

Demikianlah yang dapat Penulis sampaikan, semoga skripsi ini dapat bermanfaat bagi
pembaca sekalian.

Jakarta, Juli 2008

Penulis
DAFTAR TABEL

Halaman

Tabel IV – 1 : Tabel Spesifikasi Basis Data Motor ............................................... 44


Tabel IV – 2 : Tabel Spesifikasi Basis Data Sparepart.......................................... 44
Tabel IV – 3 : Tabel Spesifikasi Basis Data Service ............................................. 45
Tabel IV – 4 : Tabel Spesifikasi Basis Data Paket Service .................................... 45
Tabel IV – 5 : Tabel Spesifikasi Basis Data Advisor ............................................. 45
Tabel IV – 6 : Tabel Spesifikasi Basis Data Mekanik............................................ 46
Tabel IV – 7 : Tabel Spesifikasi Basis Data wo............................................... .... 46
Tabel IV – 8 : Tabel Spesifikasi Basis Data saf............................................... .... 47
Tabel IV – 9 : Tabel Spesifikasi Basis Data dapat............................................... 47
Tabel IV – 10 : Tabel Spesifikasi Basis Data kwitansi............................................... 48
Tabel IV – 11 : Tabel Spesifikasi Basis Data punya................................................. 48
Tabel IV – 12 : Tabel Spesifikasi Basis Data isi........................................................ 48
DAFTAR GAMBAR

Halaman

Gambar II - 1 : Simbol Entity dari Entity Relationship Diagram .............................. 8


Gambar II - 2 : Simbol Relationship dari Entity Relationship Diagram..................... 9
Gambar II - 3 : Simbol Atribut dari Entity Relationship Diagram............................. 12
Gambar II - 4 : Simbol Use Case Diagram......................................... .................. 12
Gambar II - 5 : Simbol Actor dari Use Case Diagram............................................. 12
Gambar II - 6 : Simbol Asosiasi dari Use Case Diagram......................................... 12
Gambar II - 7 : Simbol Include dari Use Case Diagram ......................................... 13
Gambar II - 8 : Simbol Extend dari Use Case Diagram .......................................... 13
Gambar II - 9 : Simbol Start Point dari Activity Diagram........................................ 13
Gambar II - 10 : Simbol End point dari Activity Diagram ......................................... 14
Gambar II - 11 : Simbol Activity dari Activity Diagram............................................. 14
Gambar II - 12 : Simbol Fork dari Activity Diagram................................................. 14
Gambar II - 13 : Simbol Join dari Activity Diagram ................................................. 14
Gambar II - 14 : Simbol Decesion dari Activity Diagram .......................................... 14
Gambar II - 15 : Simbol Swimlane Points dari Activity Diagram ............................... 15
Gambar II - 16 : Simbol Entity Object dari Sequence Diagram................................. 16
Gambar II - 17 : Simbol Boundary Object dari Sequence Diagram........................... 16
Gambar II - 18 : Simbol Control Object dari Sequence Diagram .............................. 17
Gambar II - 19 : Simbol Message dari Sequence Diagram....................................... 17
Gambar II - 20 : Simbol Recursive dari Sequence Diagram ..................................... 17
Gambar II - 21 : Simbol Activation dari Sequence Diagram ..................................... 17
Gambar II - 22 : Simbol Lifeline dari Sequence Diagram ......................................... 17

Gambar III - 1 : Struktur Organisasi AHASS 8171 Tugu Permai............................... 20


Gambar III - 2 : Activity Diagram Registrasi .......................................................... 22
Gambar III - 3 : Activity Diagram Service .............................................................. 23
Gambar III - 4 : Activity Diagram Pembayaran...................................................... 24
Gambar III - 5 : Package Diagram Sistem Usulan .................................................. 28
Gambar III - 6 : Use Case Diagram Master ............................................................ 29
Gambar III - 7 : Use Case Diagram Transaksi ........................................................ 29
Gambar III - 8 : Use Case Diagram Laporan .......................................................... 30

Gambar IV – 1 : Entity Relationship Diagram (ERD) ............................................... 34


Gambar IV – 2 : Transformasi ER Diagram ke LRS ................................................. 35
Gambar IV – 3 : Logical Record Structure (LRS)..................................................... 36
Gambar IV – 4 : Diagram Ketergantungan Fungsi Tabel Motor ............................... 37
Gambar IV – 5 : Diagram Ketergantungan Fungsi Tabel Sparepart ......................... 38
Gambar IV – 6 : Diagram Ketergantungan Fungsi Tabel Paket_Service.................... 38
Gambar IV – 7 : Diagram Ketergantungan Fungsi Tabel Service.............................. 39
Gambar IV – 8 : Diagram Ketergantungan Fungsi Tabel Advisor ............................. 39
Gambar IV – 9 : Diagram Ketergantungan Fungsi Tabel Mekanik ............................ 39
Gambar IV – 10 : Diagram Ketergantungan Fungsi Tabel Saf ................................... 40
Gambar IV – 11 : Diagram Ketergantungan Fungsi Tabel Wo ................................... 41
Gambar IV – 12 : Diagram Ketergantungan Fungsi Tabel Kwitansi ............................ 41
Gambar IV – 13 : Diagram Ketergantungan Fungsi Tabel dapat................................ 42
Gambar IV – 14 : Diagram Ketergantungan Fungsi Tabel punya ............................... 42
Gambar IV – 15 : Diagram Ketergantungan Fungsi Tabel isi ..................................... 43
Gambar IV – 16 : Struktur Tampilan ....................................................................... 53
Gambar IV – 17 : Rancangan Layar Menu file utama................................................ 54
Gambar IV – 18 : Rancangan Layar Menu file master............................................... 54
Gambar IV – 19 : Rancangan Layar Menu Transaksi ................................................ 55
Gambar IV – 20 : Rancangan Layarm Menu laporan ................................................ 55
Gambar IV – 21 : Rancangan Layar Entry Data Motor......................... ..................... 56
Gambar IV – 22 : Rancangan Layar Entry Data Sparepart ........................................ 56
Gambar IV – 23 : Rancangan Layar Entry Data Service ............................................ 57
Gambar IV – 24 : Rancangan Layar Entry Data Paket Service ................................... 57
Gambar IV – 25 : Rancangan Layar Entry Advisor.................................................... 58
Gambar IV – 26 : Rancangan Layar Entry Mekanik................................................... 58
Gambar IV – 27 : Rancangan Layar Entry Wo ........................................................ 59
Gambar IV – 28 : Rancangan Layar Cetak SAF ........................................................ 59
Gambar IV – 29 : Rancangan Layar Cetak Kwitansi ................................................. 60
Gambar IV – 30 : Rancangan Layar Cetak Laporan Paket Service ............................. 60
Gambar IV – 31 : Rancangan Layar Cetak Laporan Service Lain ............................... 61
Gambar IV – 32 : Rancangan Layar Cetak Laporan Penjualan Sparepart ................... 61
Gambar IV – 33 : Sequence Diagram Entry Motor ................................................... 62
Gambar IV – 34 : Sequence Diagram Entry Sparepart .............................................. 63
Gambar IV – 35 : Sequence Diagram Entry Service.................................................. 64
Gambar IV – 36 : Sequence Diagram Entry Paket Service......................................... 65
Gambar IV – 37 : Sequence Diagram Entry Advisor.................................................. 66
Gambar IV – 38 : Sequence Diagram Entry Mekanik ................................................ 67
Gambar IV – 39 : Sequence Diagram Entry Saf........................................................ 68
Gambar IV – 40 : Sequence Diagram Entry Wo ....................................................... 69
Gambar IV – 41 : Sequence Diagram Cetak Kwitansi................................................ 70
Gambar IV – 42 : Sequence Diagram Cetak Laporan Paket Service ........................... 71
Gambar IV – 43 : Sequence Diagram Cetak Laporan Service Lain ............................. 71
Gambar IV – 44 : Sequence Diagram Cetak Laporan Penjualan Sparepart ................. 72
Gambar IV – 45 : Rancangan Entity Class Diagram .................................................. 73
Gambar IV – 46 : Rancangan Boundary Class Diagram............................................. 74
Gambar IV – 47 : Rancangan Control Class Diagram ................................................ 75
DAFTAR SIMBOL

1. Use Case Diagram

Actor
Menggambarkan pengguna software aplikasi (user).

Use Case
Menggambarkan fungsionalitas dari suatu sistem,
sehingga customer atau pengguna sistem paham
dan mengerti mengenai kegunaan sistem yang akan
dibangun.

Association
Menggambarkan hubungan antara actor dengan use
case.
include
Pemanggilan use case oleh use case lain atau untuk
menggambarkan suatu use case termasuk didalam
use case lain (diharuskan) relasi ini dapat digunakan
untuk menghindari penulisan deskripsi yang
berulang-ulang.
Note
Menggambarkan dokumentasi dari use case

2. Diagram Hubungan Entitas

Entitas
Menggambarkan atau menyatakan suatu
himpunan entitas.

Relasi
Menggambarkan himpunan hubungan yang ada
diantara himpunan entitas.

Garis Penghubung
Menggambarkan penghubung antara himpunan
entitas dengan himpunan hubungan.

Cardinality
Menggambarkan tingkat hubungan yang terjadi,
dilihat dari suatu kejadian atau banyak tidaknya
hubungan antar entitas tersebut.
3. Activity Diagram

Start State
Menggambarkan awal dari suatu aktivitas yang berjalan pada
sistem.

End State
Menggambarkan akhir dari suatu aktivitas yang berjalan pada
sistem.

Activity
Menggambarkan aktivitas yang dilakukan pada sistem.

Swimlane
Menggambarkan pembagian/pengelompokan berdasarkan tugas
dan fungsi tersendiri.

Transition to self
Menggambarkan hubungan antara state atau activity yang
kembali kepada state atau activity itu sendiri.

Transition State
Menggambarkan hubungan antara dua state, dua activity
ataupun antara state dan activity.

Decision
Menggambarkan kondisi dari sebuah aktivitas yang bernilai
benar/salah.

State
Menggambarkan kondisi, situasi ataupun tempat untuk
beberapa aktivitas.

Fork
Menggambarkan aktivitas yang dimulai dengan sebuah aktivitas
dan diikuti oleh dua atau lebih aktivitas yang harus dikerjakan.

Join
Menggambarkan aktivitas yang dimulai dengan dua atau lebih
aktivitas yang sudah dilakukan dan menghasilkan sebuah
aktivitas.
4. Class Diagram

Class
Menggambarkan keadaan (atribut/properti) dari suatu
NewClass objek.
name Class memiliki tiga area pokok, yaitu: nama, atribut,
name2 method.
name3 Nama menggambarkan nama dari class/objek.
Atribut menggambarkan batasan dari nilai yang dapat
opname() dimiliki oleh property tersebut.
opname2() Method menggambarkan implementasi dari layanan yang
opname3() dapat diminta dari beberapa object dari class , yang
mempengaruhi behaviour.

Association
Menggambarkan mekanisme komunikasi suatu objek
dengan objek lainnya. Atau dapat juga menggambarkan
ketergantungan antarkelas.

Aggregate
Menggambarkan bahwa suatu objek secara fisik dibentuk
dari objek-objek lain, atau secara logis mengandung objek
lain.

Multiplicity
Menggambarkan banyaknya object yang terhubung satu
dengan yang lainnya. Contoh :

1 Tepat satu
0..* Nol atau lebih
1..* Satu atau lebih
0..1 Nol atau satu
5..8 range 5 s.d. 8
4..6,9 range 4 s.d. 6 dan 9
5. Sequence Diagram

Actor
Menggambarkan seseorang atau sesuatu (seperti perangkat,
sistem lain) yang berinteraksi dengan sistem.

Boundary
Menggambarkan interaksi antara satu atau lebih actor dengan
sistem, memodelkan bagian dari sistem yang bergantung pada
pihak lain disekitarnya dan merupakan pembatas sistem dengan
dunia luar.

Control
Menggambarkan “perilaku mengatur”, mengkoordinasikan
perilaku sistem dan dinamika dari suatu sistem, menangani
tugas utama dan mengontrol alur kerja suatu sistem.

Entity
Menggambarkan informasi yang harus disimpan oleh sistem
(struktur data dari sebuah sistem).

Object Message
Menggambarkan pesan/hubungan antar objek, yang
menunjukan urutan kejadian yang terjadi.

Message to Self
Menggambarkan pesan/hubungan objek itu sendiri, yang
menunjukan urutan kejadian yang terjadi.

Object
Menggambarkan abstraksi dari sebuah entitas nyata/tidak nyata
yang informasinya harus disimpan.
DAFTAR ISI

Halaman
Abstraksi.. ........................................................................................... i
Kata Pengantar ................................................................................... ii
Daftar Gambar .................................................................................... iii
Daftar Lampiran .................................................................................. v
Daftar Tabel ........................................................................................ vi
Daftar Simbol ...................................................................................... vii
Daftar Isi ………. .................................................................................. xi

BAB I PENDAHULUAN .................................................................................... 1


1. Latar Belakang .................................................................................... 1
2. Masalah ............................................................................................... 1
3. Tujuan Penulisan.................................................................................. 1
4. Ruang Lingkup / Batasan Masalah......................................................... 2
5. Metoda Penelitian ................................................................................ 2
6. Sistematika Penulisan .......................................................................... 4

BAB II LANDASAN TEORI ............................................................................... 5


1. Konsep Dasar Sistem ........................................................................... 5
2. Konsep Dasar Informasi ...................................................................... 6
3. Konsep Dasar Sistem Informasi............................................................. 6
4. Konser Dasar Analisa Sistem ................................................................. 7
5. Konsep Dasar Perancangan Sistem........................................................ 8
6. Analisa dan Perancangan Berorientasi Obyek ......................................... 10
7. Teori – teori Pendukung ....................................................................... 18

BAB III ANALISA SISTEM ................................................................................ 19


1. Tinjauan Organisasi ............................................................................. 19
a. Sejarah Organisasi ......................................................................... 19
b. Struktur Organisasi ........................................................................ 19
2. Uraian Prosedur ................................................................................... 22
3. Analisa Proses ..................................................................................... 22
a. Activity Diagram Proses Registrasi................................................... 22
b. Activity Diagram Proses Service....................................................... 23
c. Activitiy Diagram Proses Pembayaran……..…………………………………… 24
4. Analisa Keluaran ................................................................................. 24
5. Analisa Masukan ................................................................................. 25
6. Identifikasi Kebutuhan.......................................................................... 26
7. Package Diagram ................................................................................. 28
8. Use Case Diagram ............................................................................... 29
a. Use Case Diagram File Master ........................................................ 29
b. Use Case Diagram File Transaksi .................................................... 29
c. Use Case Diagram File Laporan ....................................................... 30
9. Deskripsi Use Case .............................................................................. 30
BAB IV RANCANGAN SISTEM .......................................................................... 34
1. Rancangan Basis Data ......................................................................... 34
a. Entity Relationship Diagram ........................................................... 34
b. Transformasi ERD ke LRS .............................................................. 35
c. Logical Record Structure (LRS) ....................................................... 36
d. Normalisasi ................................................................................... 36
e. Spesifikasi Basis Data .................................................................... 43
f. Rancangan Kode ............................................................................ 49
2. Rancangan Antar Muka ........................................................................ 49
a. Rancangan Keluaran ..................................................................... 49
b. Rancangan Masukan ..................................................................... 50
c. Rancangan Dialog Layar ................................................................ 53
a) Struktur Tampilan ................................................................... 53
b) Rancangan Layar .................................................................... 54
3. Sequence Diagram .............................................................................. 62
4. Rancangan Class Diagram..................................................................... 73
a. Entity Class ................................................................................... 73
b. Boundary....................................................................................... 74
c. Control Class ................................................................................. 75

BAB V PENUTUP…. ......................................................................................... 76


1. Kesimpulan ......................................................................................... 76
2. Saran.......... ........................................................................................ 76

Daftar Pustaka .................................................................................... 77

Lampiran – A, Keluaran Sistem Berjalan............................................. 78


Lampiran – B, Masukan Sistem Berjalan ............................................. 81
Lampiran – C, Rancangan Keluaran ................................................... 82
Lampiran – D, Rancangan Masukan ................................................... 87
Lampiran – E, Surat Keterangan Riset ................................................. 91
BAB I
PENDAHULUAN

1. Latar Belakang

Informasi adalah hal yang sangat penting untuk kemajuan usaha suatu sistem yang
cepat, tepat dan akurat sangat dibutuhkan bagi usaha Bengkel AHASS 8171 Tugu
Permai. Sistem yang terkomputerisasi dikatakan terbaik untuk saat ini, karena dapat
meningkatkan kecepatan pekerjaan sehingga tercapai efisiensi tenaga, waktu dan biaya
dalam pengolahannya, tanpa harus mengurangi kualitasnya. Sistem yang baik adalah
sistem yang dapat mempermudah semua proses komputer sehingga alat pengolah data
membuat sistem menjadi lebih baik.
Hal ini pula yang sangat dirasakan oleh Bengkel AHASS 8171 Tugu Permai,
perusahaan yang bergerak dibidang service dan penjualan sparepart khusus motor
Honda yang ingin meningkatkan kualitas perusahaannya demi mencapai kepuasan bagi
pelanggannya. Saat ini pencatatan penjualan masih dilakukan secara manual sehingga
dalam pengerjaannya timbul masalah yang harus segera diatasi.
Dalam hal ini yang harus diperbaiki adalah sistem informasi penjualan dan service.
Sistem informasi ini sangat dibutuhkan oleh pihak intern perusahaan di dalam
perencanaan, pengawasan dan pelaporan di dalam kegiatan usaha, yang sangat penting
bagi pengambilan keputusan manajemen perusahaan berikutnya. Mengingat pencatatan
transaksi dalam jumlah sangat banyak sulit dilakukan secara manual, dikarenakan
keterbatasan waktu dan tenaga kerja.
Bedasarkan hal diatas, penulis mencoba merancang sistem penjualan sparepart dan
service pada Bengkel AHASS 8171 Tugu Permai.

2. Masalah

Karena sistem penjualan saat ini dilakukan secara manual, maka ditemukan masalah
yang dihadapi antara lain :
a. Dalam sistem penjualan dan service Bengkel AHASS 8171 Tugu Permai masih
menggunakan sistem secara manual sehingga memerlukan waktu yang cukup lama
dalam pencatatan data serta masalah informasi atau laporan yang kurang memadai.
b. Penyimpanan data yang kurang baik, sehingga terjadi pemborosan waktu apabila
menginginkan pencarian data kembali.
c. Sering terjadi kesalahan atau tidak akuratnya data dalam pembuatan laporan.
d. Pengecekkan data yang berulang-ulang membutuhkan waktu yang lama.

3. Tujuan Penulisan

Tujuan dari penulisan tugas akhir ini adalah memberikan kesempatan kepada
mahasiswa untuk mendapatkan perbandingan antara ilmu yang diperoleh dalam
perkuliahan dengan dunia kerja dan dapat dijadikan gambaran untuk memasuki
lapangan kerja yang sesungguhnya serta dapat mengimplementasikannya dengan
mengubah sistem penjualan dan service Bengkel AHASS 8171 Tugu Permai terdahulu
yang masih bersifat manual menjadi sistem yang terkomputerisasi pada sistem penjualan
yang sedang berjalan, sehingga diharapkan dapat :
a. Mengembangkan suatu sistem yang dapat dipergunakan dalam kegiatan
penjualan dan service yang sedang berjalan.
b. Meminimalkan kelemahan dari sistem yang sedang berjalan saat ini dan
membantu pengambilan keputusan serta pembuatan laporan.
c. Meningkatkan mutu pelayanan penjualan dan service.
d. Memperbaiki penyimpanan data.
e. Memudahkan dalam mengontrol data masukan dan keluaran dalam penyajian
informasi tentang penjualan dan service sehingga dapat dilakukan secara cepat
dan akurat.
f. Meningkatkan efektifitas dan efisiensi dalam hal tenaga dan waktu.
g. Meningkatkan efektifitas dalam pengolahan data agar dapat menghasilkan
informasi yang dibutuhkan dengan lengkap serta dapat dihasilkan setiap saat jika
diperlukan.

4. Ruang Lingkup / Batasan Masalah


Agar batasan masalah tidak menyimpang dari judul skripsi maka penulis membatasi
ruang lingkup permasalahan dengan menitik beratkan pada sistem penjualan sparepart
dengan service yang meliputi proses registrasi, service, pembayaran serta pembuatan
laporan.

5. Metode Penelitian

Dalam rangka menyelesaikan laporan tugas akhir ini, penulis memerlukan data-data
yang berhubungan dengan topik yang dibahas. Adapun metode penelitian yang
digunakan penulis dalam mengumpulkan data diperoleh dengan cara :
a. Studi Pendahuluan (Awal)
Pada tahap awal ini dilakukan pengumpulan data atau materi penulisan dengan
cara :
1) Tinjauan Lapangan
Penulis mengumpulkan data yang diperoleh dari hasil penelitian langsung
pada Bengkel AHASS 8171 Tugu Permai.
Tinjauan lapangan dilakukan dengan dua cara, yaitu :
a) Pengamatan (observasi)
Pengamatan ini diperlukan untuk melihat secara langsung dalam
suatu peninjauan ke lokasi penelitian.
b) Wawancara (interview)
Wawancara ini dilakukan dalam rangka mendapatkan data dan
informasi dalam bentuk tanya jawab pada pemilik yang mengetahui
tentang objek penelitian.
2) Penelitian Kepustakaan
Penulis menggunakan berbagai sumber bacaan, baik buku-buku ilmiah, hasil
pencarian di internet maupun catatan semasa kuliah terutama yang erat
hubungannya dengan topik penulisan ini.
b. Analisa Sistem
Kegiatan yang dilakukan pada tahap ini adalah :
• Menganalisa sistem yang ada, yaitu mempelajari dan mengetahui apa yang
dikerjakan oleh sistem yang ada.
• Menspesifikasi sistem, yaitu menspesifikasi masukan yang digunakan, database
yang ada, proses yang dilakukan, dan keluaran yang dihasilkan.
Pada tahap ini akan dihasilkan model dari sistem yang ada, dengan menggunakan
alat-alat antara lain :
1) Diagram Hubungan Entitas ( Diagram E-R )
Diagram E-R digunakan untuk menggambarkan hubungan antara simpanan data
yang ada di dalam sequence diagram.
2) Activity Diagram
Diagram yang menggambarkan aktivitas/kegiatan-kegiatan sistem yang ada.
3) Use Case Diagram
Diagram yang menggambarkan kebutuhan sistem dari sudut pandang user.

c. Rancangan Sistem
Tahap Perancangan Sistem adalah merancang sistem secara rinci berdasarkan
hasil analisa sistem yang ada, sehingga menghasilkan model sistem baru yang
diusulkan, dengan disertai rancangan database dan spesifikasi program.

Alat-alat yang digunakan pada tahap perancangan sistem ini antara lain sama
dengan tahap analisa sistem dan ditambahkan sebagai berikut :
1) LRS (Logical Record Structure)
LRS terdiri dari link-link diantara tipe record. Link ini menunjukkan arah dari satu
tipe record lainnya.
2) Conceptual Data Model
Conceptual Data Model menunjukkan konsep-konsep, penggabungan antara
konsep-konsep, atribut-atribut dari konsep-konsep.
3) Relasi
Relasi digunakan untuk mendefinisikan dan mengilustrasikan model konseptual
secara terperinci dengan adanya primary key dan foreign key.
4) Spesifikasi Basis Data
Spesifikasi Basis Data digunakan untuk menjelaskan tipe data yang ada pada
model konseptual secara detail.
5) Normalisasi
Untuk mengorganisasikan file dengan menghilangkan grup elemen yang
berulang atau sebuah langkah atau proses untuk menyederhanakan hubungan
elemen data di dalam tuple (record) dapat dilakukan dengan cara normalisasi.
6. Sistematika Penulisan
Keseluruhan tugas akhir ini di bagi dalam lima bab dengan pokok-pokok pemikiran
dari tiap-tiap bab sebagai berikut:

BAB I PENDAHULUAN
Dalam bab ini dijelaskan tentang latar belakang, masalah, tujuan penulisan,
ruang lingkup/batasan masalah, metode penelitian, dan sistematika
penulisan.

BAB II LANDASAN TEORI


Bab ini berisi teori-teori yang digunakan pada analisa dan perancangan serta
teori-teori pendukung lainnya yang sesuai dengan masalah yang dibahas.

BAB III ANALISA SISTEM


Membahas tentang tinjauan organisasi, uraian prosedur, analisa proses
terhadap sistem yang berjalan dengan menggunakan Activity Diagram.
Analisa keluaran, analisa masukan. Mengidentifikasikan kebutuhan sistem
yang akan datang. Package Diagram dan Use Case Diagram beserta dengan
deskripsinya.

BAB IV RANCANGAN SISTEM


Membahas tentang merancang dan menguraikan rancangan basis data
dengan menggunakan ER- Diagram, Transformasi ER-Diagram ke LRS dan
LRS serta normalisasi, merancang antar muka sistem yang berupa
rancangan layar, rancangan masukan dan keluaran sistem. Rancangan
diagram interaksi dengan menggunakan Sequence Diagram, rancangan Class
Diagram (Class Diagram Boundary, Control dan Entity beserta Method),
diagram aktifitas (Activity Diagram) per method.

BAB V PENUTUP
Bab penutup berisi kesimpulan dari tulisan dan saran-saran yang
berhubungan dengan sistem yang akan dipakai.
BAB II
LANDASAN TEORI

1. Konsep Dasar Sistem


Dalam menyusun dan merancang sistem informasi terdapat beberapa konsep yang
dapat dijadikan sebagai acuan dan landasan, dimana konsep-konsep tersebut merupakan
teori yang berhubungan dengan perancangan sistem informasi serta pemecahan masalah
yang ada. Lebih lanjut mengenai sistem adalah sebagai berikut :
a. Pengertian Sistem
Menurut Jogiyanto (2003 : 34), menyatakan bahwa sistem dapat didefinisikan
dengan pendekatan prosedur dan dengan pendekatan komponen.
Pendekatan sistem yang menekankan pada prosedurnya mendefinisikan sistem
sebagai berikut :
“Sistem adalah kumpulan dari prosedur – prosedur yang mempunyai tujuan
tertentu”.
Contoh sistem yang didefinisikan dengan pendekataan prosedur ini adalah
sistem akuntansi, yang didefinisikan sebagai kumpulan dari prosedur – prosedur
penerimaan kas, pengeluaran kas, penjualan, pembelian dan buku besar.
Pendekatan sistem yang menekankan pada komponen mendefinisikan sistem
sebagai berikut :
“Sistem adalah kumpulan dari komponen–komponen yang saling berhubungan
satu dengan yang lainnya membentuk satu kesatuan untuk mencapai tujuan
tertentu”.
Contoh sistem yang didefinisikan dengan pendekatan komponen adalah sistem
komputer yang didefinisikan sebagai kumpulan dari perangkat keras dan perangkat
lunak.

b. Karakteristik Sistem
Suatu sistem mempunyai karakteristik. Karakteristik sistem adalah sebagai berikut :
1) Komponen – komponen (components)
Suatu sistem terdiri dari sejumlah komponen yang saling berinteraksi artinya
saling bekerja sama membentuk satu kesatuan. Komponen – komponen sistem
atau elemen – elemen dapat berupa satu subsistem atau bagian – bagian dari
sistem.
2) Batas sistem (boundary)
Batas sistem merupakan daerah yang membatasi antara suatu sistem
dengan sistem yang lainnya atau dengan lingkungan luar. Batas suatu sistem
menunjukkan ruang lingkup (scope) dari sistem tersebut.
3) Lingkungan luar (environment)
Lingkungan luar dari suatu sistem adalah apapun diluar batas dari sistem
yang mempengaruhi operasi sistem.
4) Penghubung (interface)
Penghubung sistem merupakan media penghubung antara satu subsistem
dengan subsistem yang lain untuk dapat berinteraksi membentuk satu kesatuan.
5) Masukan (input)
Masukan sistem adalah energi yang dimasukkan ke dalam sistem yang
berupa masukan perawatan (maintenance input) dan sinyal masukan (signal
input). Maintenance input adalah energi yang dimasukkan supaya sistem tersebut
dapat beroperasi. Signal input adalah energi yang diproses untuk didapatkan
keluaran.
6) Keluaran (output)
Keluaran sistem adalah hasil dari energi yang diolah dan diklasifikasikan
menjadi keluaran yang berguna dan sisa pembuangan.
7) Pengolah (process)
Suatu sistem dapat mempunyai bagian pengolah atau sistem itu sendiri
sebagai pengolahnya. Pengolah yang akan merubah masukan menjadi keluaran.
8) Sasaran (objectives) atau tujuan (goal)
Suatu sistem harus mempunyai sasaran, karena sasaran sangat menentukan
sekali masukan yang dibutuhkan sistem dan keluaran yang akan dihasilkan
sistem. Suatu sistem dikatakan berhasil bila mengenai sasaran atau tujuannya.
(Jogiyanto, 2003 : 54 )

2. Konsep Dasar Informasi


Informasi sangat penting dalam suatu organisasi. Suatu sistem yang kurang
mendapatkan informasi akan menjadi luruh, kerdil dan akhirnya berakhir. Untuk itu kita
harus mengetahui apa itu informasi dan bagaimana karakteristik informasi yang baik.
Jeffery L. Whitten et al. (2004 : 27) mendefinisikan informasi sebagai berikut:

“Informasi adalah data yang telah diproses atau disusun ke dalam suatu format
lebih berarti untuk seseorang. informasi dibentuk dari kombinasi dari data yang
dengan penuh harapan dapat mempunyai arti bagi penerimanya”.

Kualitas dari informasi tergantung pada tiga hal antara lain :


a. Akurat (Accuracy)
Informasi harus bebas dari kesalahan-kesalahan dan tidak bias atau
menyesatkan, dan harus jelas mencerminkan maksudnya. Ketidakakuratan dapat
terjadi karena sumber informasi (data) mengalami gangguan atau kesengajaan
sehingga merusak atau merubah data-data asli tersebut.
b. Tepat Waktu (Timeliness)
Informasi yang dihasilkan atau dibutuhkan tidak boleh terlambat (usang).
Informasi yang usang tidak mempunyai nilai yang baik, sehingga kalau digunakan
sebagai dasar dalam pengambilan keputusan akan berakibat fatal atau kesalahan
dalam keputusan dan tindakan. Kondisi demikian menyebabkan mahalnya nilai suatu
informasi, sehingga kecepatan untuk mendapatkan, mengolah dan mengirimkannya
memerlukan teknologi-teknologi terbaru.
c. Relevan (Relevancy)
Berarti informasi harus memberikan manfaat bagi pemakainya. Relevansi
informasi untuk tiap-tiap orang satu dengan yang lainnya berbeda. Misalnya
informasi mengenai sebab – musabab kerusakan mesin produksi kepada akuntan
perusahaan adalah kurang relevan dan akan lebih relevan bila ditujukan kepada ahli
teknik perusahaan.

3. Konsep Dasar Sistem Informasi


Jeffery L. Whitten et al.(2004 : 12) mendefinisikan sistem informasi sebagai berikut:

“Sistem Informasi dapat didefinisikan sebagai suatu susunan dari orang,


data, proses, dan teknologi informasi yang saling berhubungan untuk
mengumpulkan, memproses, menyimpan, dan menyediakan keluaran informasi yang
diperlukan untuk mendukung suatu organisasi”.

Sistem informasi mempunyai enam buah komponen. Komponen – komponen


tersebut yaitu :
a. Komponen Input
Input merupakan data yang masuk kedalam sistem informasi. Komponen ini
perlu ada karena merupakan bahan dasar dalam pengolahan informasi. Sistem
informasi tidak akan dapat menghasilkan informasi jika tidak mempunyai komponen
input. (Jogiyanto, 2003 : 42)
b. Komponen Model
Informasi yang dihasilkan oleh sistem informasi berasal dari data yang diambil
dari basis data yang diolah lewat suatu model – model tertentu.
(Jogiyanto, 2003 : 49)
c. Komponen Output
Produk dari sistem informasi adalah output. Berupa informasi yang berguna bagi
para pemakainya. Output merupakan komponen yang harus ada di sistem informasi.
Output dari sistem informasi dibuat dengan menggunakan data yang ada di basis
data dan diproses menggunakan model yang tertentu. (Jogiyanto, 2003 : 45)
d. Komponen Teknologi
Teknologi merupakan komponen yang penting di sistem informasi. Tanpa
adanya teknologi yang mendukung, maka sistem informasi tidak akan dapat
menghasilkan informasi yang tepat waktu. (Jogiyanto, 2003 : 51)
e. Komponen Basis Data
Basis data (database) adalah kumpulan dari data yang saling berhubungan satu
dengan yang lainnya, tersimpan diperangkat keras komputer dan digunakan
perangkat lunak untuk memanipulasinya. (Jogiyanto, 2003 : 46)
f. Komponen Kontrol atau Pengendalian
Komponen kontrol juga merupakan komponen yang penting dan harus ada di
sistem informasi. Komponen kontrol ini digunakan untuk menjamin bahwa informasi
yang dihasilkan oleh sistem informasi merupakan informasi yang akurat.
(Jogiyanto, 2003 : 52)

4. Konsep Dasar Analisa Sistem


Pengertian Analisa Sistem menurut Ariesto Hadi Sutopo (2002 : 242) yakni :
“Analisis sistem adalah proses menentukan kebutuhan sistem – apa yang harus dilakukan
sistem untuk memenuhi kebutuhan klien, bukanlah bagaimana sistem tersebut
diimplementasikan”.
Jadi dapat disimpulkan analisa sistem adalah penguraian dari suatu sistem informasi
yang utuh ke dalam bagian komponennya dengan maksud untuk mengidentifikasikan
dan mengevaluasi permasalahan, kesempatan, hambatan yang terjadi dan kebutuhan
yang diharapkan sehingga dapat diusulkan perbaikannya.
Didalam tahap analisa sistem terdapat langkah – langkah dasar yang harus dilakukan
oleh sistem, yaitu:
a. Identify (mengidentifikasi)
Yaitu mengidentifikasi atau mendefinisikan masalah, langkah ini merupakan langkah
pertama didalam tahap analisa sistem, yang dimulai dengan mengetahui terlebih
dahulu masalah – masalah yang terjadi.
Tugasnya adalah :
1) Mengidentifikasikan penyebab terjadinya masalah.
2) Mengidentifikasikan titik keputusan.
3) Mengidentifikasikan sumber dayanya sebagai personil kunci.
b. Understand (memahami)
Yaitu memahami kerja dari sistem yang ada dengan mempelajari secara terinci,
bagaimana sistem yang ada beroperasi dengan cara melakukan penelitian.
c. Menganalisa hasil penelitian
Langkah ini dilakukan berdasarkan data yang telah diperoleh dari hasil penelitian
yang dilakukan.
d. Membuat laporan hasil analisa
Setelah proses analisa selesai dilakukan, maka dibuat laporan hasil analisa yang
nantinya akan diserahkan ke ketua untuk diminta pendapat dan saran – saran yang
berguna didalamnya.

5. Konsep Dasar Perancangan Sistem


Jeffery L. Whitten et al. (2004 : 39) mengungkapkan:

”Perancangan sistem (system design) merupakan sebuah spesifikasi atau


konstruksi yang bersifat teknis, pengidentifikasi kebutuhan pemecah masalah bisnis
yang berbasis komputer dalam suatu analisa sistem”.

Perancangan sistem adalah tahap setelah analisis dari siklus pengembangan sistem,
pendefinisian dari kebutuhan-kebutuhan fungsional, persiapan untuk rancang bangun
implementasi, menggambarkan bagaimana suatu sistem dibentuk yang dapat berupa
penggambaran, perencanaan dan pembuatan sketsa atau pengaturan dari beberapa
elemen yang terpisah serta mengkonfigurasikan dari komponen-komponen perangkat
lunak dan perangkat keras dari suatu sistem. Perancangan sistem mempunyai 2 (dua)
tujuan utama, yaitu:
a. Untuk memenuhi kebutuhan kepada pemakai sistem.
b. Untuk memberikan gambaran yang jelas dan rancang bangun yang lengkap kepada
programmer dan ahli-ahli teknik lainnya yang terlibat.

Alat-alat yang digunakan dalam tahap perancangan sistem adalah sebagai berikut:

a. Entity Relationship Diagram (ERD)

ERD adalah sebuah model data yang menggunakan beberapa notasi untuk
menggambarkan data dalam hal entitas dan relasi yang digambarkan oleh data
tersebut.(Jeffery L. Whitten et al, 2004 : 295)
1) Entity (entitas), sebuah kelas dari orang, tempat, objek, kejadian, dan
sebagainya atau sebuah konsep yang mana kita perlukan untuk menangkap dan
menyimpan data.(Jeffery L. Whitten et al, 2004 : 295)

Gambar 2.1
Simbol Entity
2) Relationship (hubungan/relasi), sebuah asosiasi bisnis alami antara satu atau
lebih entitas. Sebuah relasi bisa menunjukkan sebuah peristiwa yang
menghubungkan sebuah entitas ke entitas yang lain.
(Jeffery L. Whitten et al, 2004 : 298)

Gambar 2.2
Simbol Relationship

3) Atribute, suatu deskripsi karakteristik dari entitas.


(Jeffery L. Whitten et al,2004 : 296)

Gambar 2.3
Attribute Pada ERD

Setiap entitas harus memiliki atribut yang unik untuk pengidentifikasian,


atribut yang dimaksud disebut dengan key, Jenis-jenis key adalah:
a) Primary Key, yaitu key yang paling umum digunakan untuk mengidentifikasi
secara unik setiap instansi dari entitas. (Jeffery L. Whitten et al, 2004 : 298)
b) Secondary Key, yaitu suatu key yang tidak terpilih untuk dijadikan primary
key. Juga disebut sebagai alternate key. (Jeffery L. Whitten et al,2004 : 298)
c) Composite key, suatu kelompok atribut yang dapat dengan unik
mengidentifikasi suatu instansi dari suatu entitas.
(Jeffery L. Whitten et al, 2004 : 297).
d) Foreign key, suatu primary key dari suatu entitas yang digunakan di entitas
yang lain untuk mengidentifikasi instansi dari suatu hubungan (relationship).
(Jeffery L. Whitten et al, 2004 : 301)

4) Cardinality, jumlah kejadian minimum dan maksimum dari satu entitas yang
dihubungkan dengan kejadian yang tunggal dari entitas lain.
(Jeffery L. Whitten et al,2004 : 299)
Ada 3 (tiga) kemungkinan hubungan yang ada yaitu:
a) One to one (1:1), Jumlah kejadian adalah satu ke satu antara entitas yang
saling berhubungan. (Jeffery L. Whitten et al, 2004 : 299)
b) One to many (1:M), Jumlah kejadian adalah satu ke banyak dari satu entitas
ke entitas lain yang berhubungan. (Jeffery L. Whitten et al, 2004 : 299)
c) Many to many (M:M), Jumlah kejadian adalah banyak ke banyak dari satu
entitas ke entitas lain yang berhubungan.
(Jeffery L. Whitten et al,2004 : 299)

b. Transformasi ERD ke LRS (Logical Record Structure)

Sebuah model sistem yang digambarkan dengan sebuah Diagram-ER akan


mengikuti pola/aturan pemodelan tertentu. Dalam kaitannya dengan konversi ke
LRS, maka perubahan yang terjadi adalah mengikuti aturan-aturan berikut ini.
1) Setiap entitas akan diubah ke bentuk kotak.
2) Sebuah atribut relasi disatukan dalam sebuah kotak bersama entitas jika
hubungan yang terjadi pada diagram-ER 1:M (relasi bersatu dengan cardinality
M) atau tingkat hubungan 1:1 (relasi bersatu dengan cardinality yang paling
membutuhkan referensi), sebuah relasi dipisah dalam sebuah kotak tersendiri
(menjadi entitas baru) jika tingkat hubungannya M:M (many to many) dan
memiliki foreign key sebagai primary key yang diambil dari kedua entitas yang
sebelumnya saling berhubungan.

c. Normalisasi

Teknik yang digunakan untuk meningkatkan suatu model data dalam persiapan
untuk disain database disebut dengan analisa data. Analisa data adalah suatu proses
yang menyiapkan suatu model data untuk penerapan database yang sederhana,
nonredundant (tidak ada kerangkapan data), fleksibel, dan yang dapat
menyesuaikan diri (adaptable). Teknik yang digunakan disebut dengan normalisasi.
Normalisasi adalah suatu teknik analisa data yang mengorganisir data ke dalam
suatu kelompok untuk membentuk kesatuan data yang nonredundant, stabil,
fleksibel, dan adaptif. (Jeffery L. Whitten et al,2004:322)
Adapun beberapa jenis/tipe normalisasi yaitu:
1) Normalisasi bentuk pertama (1NF/First Normal Form), suatu tabel adalah 1NF
jika tidak ada atribut yang dapat mempunyai nilai lebih dari satu(repeating
group) untuk kejadian yang tunggal dari entitas itu.
(Jeffery L. Whitten et al, 2004:323)
2) Normalisasi bentuk kedua (2NF/Second Normal Form), suatu tabel adalah 2NF
apabila tabel tersebut sudah berada pada 1NF dan setiap atribut yang bukan key
bergantung penuh pada primary key (tidak terjadi partial dependencies).
(Jeffery L. Whitten et al, 2004:323)
3) Normalisasi bentuk ketiga (3NF/Third Normal Form), suatu tabel adalah 3NF
apabila sudah berada dalam 2NF dan setiap atribut yang bukan key tidak
bergantung terhadap atribut lain kecuali terhadap primary key (non transitive
dependencies). (Jeffery L. Whitten et al, 2004:323)

6. Analisa dan Perancangan Berorientasi Obyek


Analisis dan desain berorientasi objek adalah cara baru dalam memikirkan suatu
masalah dengan menggunakan model yang dibuat menurut konsep sekitar dunia nyata.
Dasar pembuatannya adalah objek, yang merupakan kombinasi antara struktur data dan
perilaku dalam satu entitas. Secara spesifik, pengertian “berorientasi objek” berarti
bahwa kita mengorganisasi perangkat lunak sebagai kumpulan dari objek tertentu yang
memiliki struktur data dan perilakunya. (Ariesto, 2002:3)
Analisa dan Perancangan Berorientasi Objek ialah suatu koleksi/kumpulan dari
peralatan dan teknik untuk pengembangan sebuah sistem yang menggunakan teknologi
objek untuk membangun suatu sistem serta perangkat lunaknya.
Tetapi di saat yang bersamaan, alat dan teknik terstruktur tetaplah penting. Dalam
mendisain database, sebagai contoh, masih sering dirancang oleh para analis sistem
dengan menggunakan alat bantu terstruktur. (Jeffery L. Whitten et al,2004:31)
Unified Modeling Language adalah satu set peragaan konvensi yang digunakan untuk
menetapkan atau menguraikan suatu sistem perangkat lunak dalam bentuk objek.
(Jeffery L. Whitten et al, 2004:430)
UML merupakan salah satu alat bantu yang sangat handal di dunia analisa dan
perancangan sistem informasi yang berorientasi objek (Object Oriented). Hal ini
disebabkan karena UML menyediakan bahasa pemodelan visual yang memungkinkan
bagi pengembang sistem untuk membuat cetak biru (Blue Print) atas visi mereka dalam
bentuk yang baku, mudah dimengerti serta dilengkapi dengan mekanisme yang efektif
untuk berbagi (sharing) dan mengkomunikasikan rancangan mereka dengan yang lain.
(Munawar, 2004:17).

Konsep dasar analisa dan perancangan berorientasi objek adalah sebagai berikut:

• Object, sesuatu yang dapat dilihat, disentuh, atau dirasakan.


( Jeffery L. Whitten, 2004:431)
• Class, sekumpulan objek yang sejenis, yang memiliki perilaku dan attribute yang
sejenis. (Jeffery L. Whitten et al, 2004:433)
• Attribute, sebuah data yang mewakili karakteristik yang dimiliki objek.
(Jeffery L. Whitten et al, 2004:431)
• Behavior(Perilaku), kumpulan sesuatu yang dapat dilakukan oleh objek. Disebut
juga sebagai method, operation atau service. ( Jeffery L. Whitten, 2004:432)
• Inheritance(Turunan), sebuah konsep dimana method dan/atau attribute yang
dimiliki oleh sebuah objek dapat diturunkan atau digunakan(reused) oleh objek lain.
(Jeffery L. Whitten et al, 2004:434)
• Polymorphisme, sebuah konsep dimana objek lain dapat merespon operasi yang
sama, tetapi dengan implementasi yang berbeda. (Jeffery L. Whitten et al,
2004:438)
• Message Sending, suatu objek mengirim sebuah pesan (message) kepada objek
lain untuk menjalankan sebuah operation dan objek yang menerima akan
memberikan respon untuk menjalankan operasi tersebut. (Munawar:31)
• Encapsulation, penggabungan dari beberapa atribut dan perilaku (items) menjadi
satu unit. (Jeffery L. Whitten et al, 2004:432)
• Aggregation, suatu hubungan dimana satu kelas yang lebih besar berisi satu atau
lebih bagian kelas yang lebih kecil. (Jeffery L. Whitten et al, 2004:436)
• Association, hubungan antar objek yang saling membutuhkan. Hubungan ini bisa
satu arah ataupun lebih dari satu arah. (Munawar, 2004:31)
• Generalization, suatu konsep dimana perilaku dan atribut yang umum dibagi ke
dalam beberapa jenis kelas objek yang dikelompokkan(diringkas) ke dalam kelas
mereka sendiri. (Jeffery L. Whitten et al,2004:435)

a. Analisa Berorientasi Obyek


Analisa berorientasi obyek (Object-Oriented Analysis) adalah sebuah pendekatan
yang digunakan untuk: (Jeffery L. Whitten et al,2004:430).
1) Mempelajari obyek-obyek yang ada untuk mengetahui apakah obyek tersebut
dapat digunakan berulang kali atau dapat disesuaikan untuk keperluan yang
baru.
2) Menggambarkan obyek yang baru atau memodifikasi obyek, yang akan
dikombinasi dengan obyek – obyek yang sudah ada ke dalam sebuah aplikasi
bisnis komputer yang bermanfaat.
Alat bantu yang digunakan dalam analisa berorientasi objek dengan UML antara
lain adalah:

a) Use Case Diagram, terdiri dari:


1. Use Case, Use case adalah deskripsi fungsi dari sebuah sistem dari
perspektif pengguna. use case bekerja dengan cara mendeskripsikan
tipikal interaksi antara user (pengguna) sebuah sistem dengan
sistemnya sendiri melalui sebuah cerita bagaimana sebuah sistem
dipakai. Penamaan use case sesuai dengan tujuan yang dicapai dari hasil
interaksinya dengan actor. use case biasanya menggunakan kata kerja.
(Munawar, 2004:62)

Gambar 2.4
Simbol use case

2. Actor, Actor adalah abstraction dari orang atau sistem yang lain yang
mengaktifkan fungsi dari target sistem. Untuk mengidentifikasikan actor,
harus ditentukan pembagian tenaga kerja dan tugas – tugas yang
berkaitan dengan peran pada konteks target sistem. Orang atau sistem
bisa muncul dalam beberapa peran. Perlu dicatat bahwa actor
berinteraksi dengan use case, tetapi tidak memiliki kontrol terhadap use
case.(Munawar, 2004:64-65)

Gambar 2.5
Simbol Actor

3. Relasi (relationship) antara actor dengan use case pada use case
diagram digambarkan dalam bentuk garis. Relasi antara actor dengan
use case disebut dengan asosiasi, asosiasi adalah sebuah relasi antara
actor dengan use case dimana sebuah interaksi terjadi diantara mereka.
(Jeffery L. Whitten, 2004:274)
Gambar 2.6
Simbol Asosiasi
4. Relasi Use Case
Selain terdapat relasi-relasi antara actor dan use case, juga terdapat
relasi-relasi antara use case - use case. Ada beberapa jenis relasi antara
use case – use case, yaitu: (Munawar, 2004:66)
a. Include, digunakan untuk menggambarkan bahwa suatu use case
seluruhnya merupakan fungsionalitas dari use case lainnya.

<<include>>

Register for courses

<<include>>
Logon validation

Maintain curriculum

Gambar 2.7
Simbol Include

Extend, digunakan untuk menunjukkan bahwa satu use case


merupakan tambahan fungsional dari use case yang lain jika kondisi
atau syarat tertentu yang dipenuhi.

B u k a
R e k e n in g

< < e x te n d > >

N a s a b a h
B u k a
D e p o s ito

Gambar 2.8
Simbol Extend

b) Diagram Aktivitas (Activity Diagram)


Activity Diagram adalah teknik untuk mendeskripsikan logika prosedural,
proses bisnis dan aliran kerja. (Munawar, 2004:109)
Simbol – simbol yang sering digunakan pada saat pembuatan activity
diagram adalah sebagai berikut:
1. Start Point, diletakkan pada pojok kiri atas dan merupakan awal aktifitas.
(Munawar, 2004:109)

Gambar 2.9
Simbol Start Point
2. End Point, akhir aktifitas. (Munawar, 2004:109)

Gambar 2.10
Simbol End Point

3. Activity, menggambarkan suatu proses/kegiatan bisnis. (Munawar,


2004:109)

Gambar 2.11
Simbol Activities

4. Fork (percabangan), digunakan untuk menunjukkan kegiatan yang


dilakukan secara peralel atau untuk menggabungkan dua kegiatan
pararel menjadi satu. (Munawar, 2004:110)

Gambar 2.12
Simbol Fork

5. Join (penggabungan) atau Rake, menunjukkan adanya dekomposisi.


(Munawar, 2004:110)

Gambar 2.13
Simbol Join

6. Decision Points, menggambarkan pilihan untuk pengambilan keputusan,


true atau false. (Munawar, 2004:110)
Gambar 2.14
Simbol Decision Points

7. Swimlane, pembagian activity diagram untuk menunjukkan siapa


melakukan apa. (Munawar, 2004:113)

NewSwiml an e2

Gambar 2.15
Simbol Swimlane

b. Perancangan Berorientasi Obyek

Perancangan berorientasi objek merupakan tahap lanjutan setelah analisa


berorientasi objek, perancangan berorientasi obyek adalah suatu pendekatan yang
digunakan untuk menspesifikasi kebutuhan – kebutuhan sistem dengan
mengkolaborasikan obyek - obyek, atribut-atribut, dan method-method yang ada.
(Jeffery L. Whitten et al, 2004:686).
Alat-alat yang digunakan dalam tahap perancangan sistem adalah sebagai
berikut:

1. Conseptual Data Model (Model Konseptual)

Konseptual Data Model merupakan model yang paling penting yang harus
dibuat sepanjang proses analisis yang berorientasi obyek. Use case merupakan
suatu model analisis kebutuhan yang penting, tetapi tidak berorientasi obyek.
Pengidentifikasian konsep – konsep adalah bagian dari pemeriksaan atau
penyelidikan domain masalah. UML terdiri dari penulisan diagram – diagram
struktur statis untuk menggambarkan model – model konseptual. Model
konseptual merupakan sebuah gambaran mengenai konsep-konsep di dalam
domain masalah. Dalam UML, suatu model konseptual digambarkan dengan
diagram struktur statis yang mana di dalamnya tidak terdapat penjelasan
mengenai operasi – operasi. Model konseptual menitik beratkan fokus pada
domain konsep-konsep bukan pada entitas – entitas software.
Model konseptual menunjukkan konsep-konsep, penggabungan antara
konsep-konsep, atribut-atribut dari konsep-konsep.

2. Diagram Kelas (Class Diagram)

Diagram Kelas (class diagram) adalah suatu diagram yang melukiskan


kelas yang sesuai dengan komponen-komponen perangkat lunak yang
digunakan untuk membangun aplikasi perangkat lunak. Class diagram secara
khas meliputi di bawah ini: (Jeffery L. Whitten et al,2004:702)
a. Kelas (Class)
b. Relasi Associations, Generalization dan Aggregation
c. Atribut (Attributes)
d. Operasi (Operations/Method)
e. Visibility, tingkat akses objek eksternal kepada suatu operasi atau atribut

3. Sequence Diagram (Diagram Urutan)

Setelah kita menentukan tanggung jawab dan perilaku dari obyek, kita
dapat menciptakan suatu model yang terperinci dari bagaimana obyek tersebut
akan saling berhubungan satu sama lain untuk menyediakan kemampuan atau
fungsi yang ditetapkan pada setiap use case yang telah didesain sebelumnya.
UML menyediakan dua jenis diagram untuk melukiskan interaksi tersebut
dengan nyata yaitu Sequence Diagram dan collaboration diagram.
Sequence Diagram menunjukkan secara detil bagaimana obyek saling
berhubungan satu sama lain dari waktu ke waktu, dan collaboration diagram
menunjukkan bagaimana obyek bekerja sama dalam bentuk urutan pesan untuk
memenuhi fungsionalitas dari suatu use case.
Definisi dari sequence diagram adalah suatu diagram UML yang
memodelkan logika dari suatu use case dengan menggambarkan interaksi
berupa pengiriman pesan(message) antar obyek dalam urutan waktu.
(Jeffery L. Whitten et al,2004:702)

Beberapa simbol yang umum digunakan pada sequence diagram, yaitu:

a) Entity Object, suatu obyek yang berisi informasi kegiatan yang terkait yang
tetap dan disimpan ke dalam suatu database.
(Jeffery L. Whitten et al, 2004:686)

Gambar 2.16
Simbol Entity Object

b) Interface/Boundary Object, sebuah obyek yang menjadi penghubung antara


user dengan sistem. Contohnya window, dialogue box atau screen (tampilan
layar). (Jeffery L. Whitten et al, 2004:686)

Gambar 2.17
Simbol Boundary Object

c) Control Object, suatu obyek yang berisi logika aplikasi yang tidak memiliki
tanggung jawab kepada entitas. contohnya adalah kalkulasi dan aturan
bisnis yang melibatkan berbagai objek. Control object mengkoordinir
pesan(message) antara boundary dengan entitas.
(Jeffery L. Whitten et al, 2004:686)

Gambar 2.18
Simbol Control Object

d) Simple Message, simbol pengiriman pesan dari sebuah obyek ke obyek lain.
(Jeffery L. Whitten et al, 2004:704)

Gambar 2.19
Simbol Message

e) Recursive, sebuah obyek yang mempunyai sebuah operation kepada dirinya


sendiri. (Munawar, 2004:89)

Gambar 2.20
Simbol Recursive

f) Activation, Activation mewakili sebuah eksekusi operasi dari obyek, panjang


kotak ini berbanding lurus dengan durasi aktivasi sebuah operasi.
(Munawar, 2004:87-89)

Gambar 2.21
Simbol Activation

g) Lifeline, garis titik-titik yang terhubung dengan obyek, sepanjang lifeline


terdapat activation. (Munawar, 2004:87-89)
Gambar 2.22
Simbol Lifeline
7. Teori – Teori Pendukung

a. Pengertian penjualan dan Pelayanan Jasa (Service)


Kegiatan penjualan merupakan suatu usaha yang dilakukan untuk
mendisribusikan barang kebutuhan yang telah dihasilkan oleh produsen kepada
konsumen dengan memperolah jasa berupa uang menuntut harga.
Menurut Basu Swastha (2001 : 8) “ Menjual adalah ilmu dan seni mempengaruhi
pribadi yang dilakukan oleh penjualan untuk mengajak orang lain agar bersedia
membeli barang atau jasa yang ditawarkan”. Sehingga penjualandapat diartikan
sebagai prosedur pengeluaran barang dan peneriamaa uang oleh perusahaan.
Penjualan terjadi ketika hak berpindah dan tuntutan pembayaran timbul, tetapi
penjualan juga dianggap terjadi pada waktu barang dagangan secara fisik
dipindahkan atau ditandai untuk pelanggan, sesudah pelanggan tersebut
menyatakan keinginan membeli. Penjulan merupakan aktivitas utama perusahaan
yang sangat penting untuk menyalurkan barang-barang hasil produksi kepada
konsumen, sebab penjualan adalah sasaran terakhir dari seluruh aktivitas
perusahaan, yaitu mendapatkan keuntungan.
Service merupakan pelayanan kepada konsumen yang dimana service
merupakan usaha dalam bidang jasa.

b. Pentingnya Penjualan dan Pelayanan Jasa


Untuk meningkatkan mutu produktivitas penjulan dan pelayanan jasa service,
pemilik bengkel perlu membuat kebijaksanaan yang menyangkut perencanaan,
pemasaran, dan penigkatan kepuasan pelanggan dalam bidang penjualan dan
pengadaan sparepart maupun dalam pelayanan jasa service.
Hal ini penting sekali mengingat setiap proses penjualan dan jasa service yang
dilakukan nantinya harus dilaporkan pada setiap akhir periode tertentu kepada
owner. Disamping itu peningkatan mutu penjualan dan pelayanan jasa service
kepada pelanggan juga merupakan alternatif yang harus ditempuh.

c. Tujutan Pelaksanaan Sistem Penjualan


Untuk mendukung kelancaran sistem penjualan, perlu dibuat suatu sistem yang
dapat memberikan layanan dan kemudahan bagi proses kegiatan transaksi. Adapun
tujuan pelaksanaan sistem penjualan tersebut adalah sebagai berikut:
1) Memberikan kemudahan dan memperlancar arus kegiatan sistem penjualan
barang.
2) Memberikan kemudahan dalam hal pelayanan serta mampu memberikan
informasi yang cepat, tepat dan akurat kepada pelanggan.
3) Membantu kelancaran prosedur kerja antar bagian.
4) Sebagai alat bantu bagi pihak pimpinan dalam mengawasi pelaksanaan sistem
penjualan.
BAB III
ANALISA SISTEM

1. Tinjauan Organisasi
Untuk merancang sistem yang baik dan sesuai dengan hasil yang diharapkan, maka
terlebih dahulu diperoleh data atau informasi tentang sistem berjalan. Data atau
informasi tersebut didapat dengan menganalisa sistem yang ada pada saat ini. Dan dari
hasil analisa sistem tersebut kita dapat mengetahui kekurangan-kekurangan sistem yang
sedang berjalan untuk dapat diperbaiki dan dikembangkan dengan melakukan
perancangan sistem usulan yang lebih sesuai dengan kebutuhan informasi dan lebih
handal dalam mengatasi kompleksitas bisnis usaha.

a. Sejarah Organisasi
AHASS 8171 Tugu Permai berdiri sekitar tahun 2005 di Jl. H. Murtado B4 No7
Semper - Jakarta Utara, yang didirikan oleh Bpk. Mukhrijul Adli. S.H. AHASS 8171
Tugu Permai adalah bagian dari PT Astra Honda Motor yang salah satu tugasnya
adalah sebagai layanan purna jual dan memberikan pelayanan service bagi
konsumen sepeda motor Honda. Awal terselenggaranya usaha pada bidang service
ini dikarenakan tingginya minat konsumen untuk memkai speda motor Honda. Dalam
hal ini untuk dapat memenuhi kebutuhan dan kepuasan para pengguna sepeda
motor Honda dalam hal mutu, keaslian produk dan pelayanan service yang
memuaskan.
Pada awal berdirinya AHASS 8171 Tugu Permai hanya memiliki tiga orang
mekanik. Satu orang sebagai senior mekanik dan dua lagi sebagai junior mekanik
dan hingga kini telah memiliki 7 orang mekanik. Satu sebagai kepala melanik, tiga
sebagai senior mekanik dan tiga orang lagi sebagai junior mekanik.
Pada tahun 2006 AHASS 8171 Tugu Permai mendapatkan ACS (Astra Claim
Service). Dengan adanya ACS, AHASS 8171 Tugu Permai berhak mengclaim ke pada
PT Astra Honda Motor apabila ada motor baru yang memiliki kerusakan yang cukup
fatal dikarenakan kesalahan pabrik.

b. Struktur Organisasi
Organisasi adalah suatu tempat berkumpulnya sejumlah manusia yang saling
terkait dalam mencapai suatu tujuan tertentu yang telah disepakati bersama. Dan
untuk mewujudkannya diperlukan adanya pengorganisasian. Misalnya dalam suatu
perusahaan apakah perusahaan itu besar ataupun kecil, maka sangatlah diperlukan
struktur organisasi. Karena dengan memiliki struktur organisasi maka kegiatan
operasi dapat berjalan dengan lancar dan bisa mencapai tujuannya. Yang dimaksud
struktur organisasi adalah pembagian kerja dan hubungan kerja dalam organisasi,
sehingga terwujud suatu kerja sama yang sangat harmonis dari bagian-bagian dalam
organisasi tersebut. Dengan organisasi yang baik, maka setiap bagan organisasi
mengetahui wewenang dan tugas yang menjadi tanggung jawabnya masing-masing.
Adapun struktur organisasi pada AHASS 8171 Tugu Permai adalah
sebagai berikut :

Pimpinan

Bagian Manager Kepala


Keuangan Operasional Mekanik

Bagian Senior Junior


Advisor
Gudang Mekanik Mekanik

Gambar 3.1
Struktur Organisasi AHASS 8171 TUGU PERMAI

c. Deskripsi Tugas
Untuk lebih jelasnya tugas, wewenang, serta tanggung jawab maupun fungsinya
diuraikan sebagai berikut:

1) Pimpinan
Pemimpin adalah seseorang yang memimpin suatu usaha atau perusahaan, dia
berhak mengatur dan menjalankan lancarnya perusahaan tersebut.
Tugasnya adalah:
a) Mengatur dan mengawasi jalannya suatu usaha.
b) Membuat kebijakan di dalam menjalankan usaha.
c) Bertanggung jawab sepenuhnya pada usaha yang dijalankan.
d) Memimpin dan mengawasi perkembangan perusahaan melalui laporan–
laporan yang di terima dan mengambil keputusan yang diperlukan dan
bertanggung jawab atas keputusan yang telah dipilih.
Wewenangnya adalah:
a) Mengambil keputusan dalam menjalankan usaha.
b) Mengangkat dan memberhentikan karyawan.

2) Bagian Keuangan
Tugasnya adalah :
a) Mencatat transaksi keluar masuknya data keuangan.
b) Mencatat laporan keuangan.
c) Mencatat transaksi penjualan ke dalam laporan.
d) Bertanggung jawab atas piutang dan utang usaha.
Wewenangnya adalah :
a) Bertanggung jawab atas keluar masuknya keuangan di dalam perusahaan.
3) Manajer Operasional
Tugasnya adalah :
a) Mengawasi dan bertanggung jawab atas pekerjaan advisor dan bagian
gudang.
b) Membuat laporan keluhan dan kepuasan pelanggan untuk evaluasi.
c) Bertanggung jawab atas daily operation.
Wewenangnya adalah :
a) Mengambil Keputusan dalam kegiatan sehari-hari

4) Kepala Mekanik
Tugasnya adalah :
a) Melakukan final cheking.
b) Mengaudit tata cara kerja mekanik.
Wewenangnya adalah :
a) Bertanggung jawab atas senior dan junior mekanik.

5) Advisor
Tugasnya adalah :
a) Membantu dan melayani kebutuhan pelanggan.
b) Membuat kwitansi transaksi penjualan
c) Melaksanakan transaksi penjualan.
d) Bertanggung jawab atas transaksi penjualan terhadap keakurasian data
barang yang dijual ke pelanggan.
Wewenangnya adalah :
a) Melayani kebutuhan pelanggan dengan ramah.
b) Memberikan pelayanan terbaik kepada pelanggan.

6) Bagian Gudang
Tugasnya adalah :
a) Melakukan pengecekan stock barang.
b) Membuat surat permintaan pembelian barang.
Wewenangnya adalah :
a) Bertanggung jawab atas keluar masuknya barang.

7) Senior Mekanik
Tugasnya adalah :
a) Melakukan service standard dan service besar.
Wewenangnya adalah :
a) Bertanggung jawab atas service kendaraan yang dikerjakannya.

8) Junior Mekanik
Tugasnya adalah :
a) Melakukan service standard
2. Uraian Prosedur
Prosedur kegiatan yang dilakukan pada AHASS 8171 Tugu Permai dalam sistem
penjualan dan service adalah:
b. Proses Registrasi
Pelanggan menginformasikan data diri dan data kendaraan pada advisor. Setelah itu
pelanggan akan memilih service atau paket service yang telah tersedia di setiap
AHASS. Advisor akan mencatat service dan sparepart yang dibutuhkan serta keluhan
pelanggan pada Service Advisor Form (SAF).
b. Proses Service
Advisor menyerahkan SAF pada mekanik, lalu mekanik memeriksa apa saja sparepart
yang di butuhkan dan mekanik mengkonfirmasikan ke bagian gudang. Jika sparepart
yang di butuhkan teleh tersedia barulah mekanik melakukan pengerjaan, dan apabila
sparepart yang dibutuhkan tidak tersedia, bagian gudang mengkonfirmasikan pada
advisor dan advisor menginformasikan ke pelanggan. Apabila pada proses
pengerjaan mekanik menemukan berbagai kerusakan pada motor pelanggan yang
tidak tercantum dalam SAF, mekanik menginformasikan berbagai kerusakan pada
advisor dan advisor menginformasikan pada pelanggan. Apabila pelanggan
menyetujui penggantian sparepart, advisor menambahkan daftar sparepart yang
dibutuhkan pada SAF lalu SAF di serahkan kembali ke mekanik.
c. Proses Pembayaran
Setelah mekanik selesai melakukan pengerjaan, mekanik menyerahkan SAF yang
telah selesai dikerjakan pada advisor dan advisor mencatat transkrip SAF pada Work
Order (WO) yang akan disimpan oleh perusahaan. Lalu advisor membuatkan kwitansi
sebagai tanda bukti service dan penjualan sparepart.

3. Analisa Proses
Berdasarkan uraian prosedur diatas, berikut ini adalah kegiatan-kegiatan yang
dilakukan oleh AHASS 8171 Tugu Permai, yang digambarkan pada activity diagram
sebagai berik

a. Activity Diagram Proses Registrasi

Gambar 3.2
Activity Diagram Proses Registrasi
b. Activity Diagram Service

Gambar 3.3
Activity Diagram Service
c. Activity Diagram Pembayaran

Gambar 3.4
Activity Diagram Pembayaran

4. Analisa Keluaran
Analisa keluaran merupakan analisa mengenai keluaran yang dihasilkan melalui
proses-proses yang ada dalam sistem berjalan. Adapun keluaran yang dihasilkan dari
sistem penjualan pada AHASS 8171 Tugu Permai adalah Service Advisor Form dan
Kwitansi. Untuk lebih jelasnya analisa keluaran sistem penjualan dapat diuraikan sebagai
berikut :

a. Service Advisor Form


Nama Keluaran : Service Advisor Form
Fungsi : Bukti Service
Media : Kertas
Distribusi : Mekanik, Advisor, Pelanggan
Rangkap : Satu
Frekuensi : Setiap terjadinya service
Volume : Lima puluh per minggu
Format : Lampiran A-1
Keterangan : Berisi rincian service
Hasil Analisa : Berjalan cukup efektif
b. Kwitansi
Nama Keluaran : Kwitansi
Fungsi : Sebagai bukti pembayaran lunas
Media : Kertas
Distribusi : Pelanggan, Advisor
Rangkap : Dua
Frekuensi : Setiap terjadinya pembayaran
Volume : Lima Puluh per minggu
Format : Lampiran A-2
Keterangan : Berisi tentang jumlah tagihan service dan sparepart yang
digunakan
Hasil Analisa : Berjalan cukup efektif

c. Laporan Sparepart
Nama Keluaran : Laporan Sparepart
Fungsi : Sebagai laporan kepada pimpinan atas penjualan sparepart yang
dilakukan selama satu periode
Media : Kertas
Distribusi : Pimpinan
Rangkap : 1 (satu) lembar
Frekuensi : Bulanan
Volume : 1 (satu) perbulan
Format : Lihat lampiran A – 3
Keterangan : Dibuat untuk diberikan kepada pimpinan setiap akhir bulan, berisi
tentang transaksi penjualan sparepart.
Hasil Analisa : Sudah cukup baik untuk keperluan analisa

d. Laporan Harian Service dan Sparepart


Nama Keluaran : Laporan Harian Service dan Sparepart
Fungsi : Sebagai laporan kepada pimpinan atas penjualan sparepart dan
service yang dilakukan selama satu hari
Media : Kertas
Distribusi : Pimpinan
Rangkap : 1 (satu) lembar
Frekuensi : Harian
Volume : 1 (satu) perhari
Format : Lihat lampiran A – 4
Keterangan : Dibuat untuk diberikan kepada pimpinan setiap hari, berisi
tentang transaksi penjualan sparepart dan data service.
Hasil Analisa : Sudah cukup baik untuk keperluan analisa

5. Analisa Masukan
Maksud dari analisa masukan adalah untuk mengetahui dokumen-dokumen apa saja
yang digunakan sebagai masukan dalam pengolahan data pada sistem service dan
penjualan yang sedang berjalan. Masukan yang digunakan pada sistem ini adalah
sebagai berikut :

a. Work Order
Nama Masukan : Work Order
Sumber : Data yang berada di service advisor form
Fungsi : Bukti kegiatan transaksi selama 1 hari
Media : Kertas
Rangkap : satu
Frekuensi : Setiap terjadi transaksi
Volume : lima puluh per minggu
Format : Lampiran B-1
Keterangan : Merupakan transkrip data yang ada pada service advisor form
sebagai tanda bukti transaksi.
Hasil Analisa : Bentuk yang kurang terstruktur.

6) Identifikasi Kebutuhan
Merupakan hasil dari analisa yang berbentuk uraian tentang kebutuhan sistem
dimasa mendatang dan dikaitkan dengan pengelolaan sumber daya, kebutuhan
sistem untuk perbaikan yang diinginkan.

a. Kebutuhan : Data Motor


Masalah : Tidak adanya pencatatan data motor pelanggan yang
melakukan service untuk memudahkan dalam pencarian
informasi tentang data motor pelanggan.
Usulan : Penyediaan informasi tentang pendataan motor pelanggan
yang ada di perusahaan, maka dirasakan perlu adanya data
motor pelanggan tersebut.

b. Kebutuhan : Data Sparepart


Masalah : Masih manualnya pencatatan data sparepart.
Usulan : Penyediaan informasi tentang pendataan sparepart yang ada
di perusahaan, maka dirasakan perlu adanya data sparepart
tersebut.

c. Kebutuhan : Data Mekanik


Masalah : Tidak adanya pencatatan data mekanik untuk memudahkan
dalam pengidentifikasian dan melakukan evaluasi kerja.
Usulan : Penyediaan informasi tentang pendataan mekanik yang ada di
perusahaan, maka dirasakan perlu adanya data mekanik
tersebut.

d. Kebutuhan : Data Advisor


Masalah : Tidak adanya pencatatan data advisor untuk memudahkan
dalam pengidentifikasian dan melakukan evaluasi kerja.
Usulan : Penyediaan informasi tentang pendataan advisor yang ada di
perusahaan, maka dirasakan perlu adanya data advisor
tersebut.

e. Kebutuhan : Data Paket Service


Masalah : Tidak adanya pencatatan data Paket Service untuk
memudahkan dalam pengidentifikasian data dan perubahan
data.
Usulan : Penyediaan informasi tentang pendataan Paket Service yang
ada di perusahaan, maka dirasakan perlu adanya data Paket
Service tersebut.

f. Kebutuhan : Data Service


Masalah : Tidak adanya pencatatan data service untuk memudahkan
dalam pengidentifikasian data dan perubahan data
Usulan : Penyediaan informasi tentang pendataan service yang ada di
perusahaan, maka dirasakan perlu adanya data service
tersebut.

g. Kebutuhan : Service Advisor Form (SAF)


Masalah : Kurang informatif dalam pencatatannya, karena bentuk yang
tidak terstruktur.
Usulan : Disediakannya data informasi mengenai data service,
sparepart yang digunakan dalam bentuk berkas komputer,
agar dapat meminimalisasikan kesalahan pencatatan yang
terjadi dan mempermudah dalam penghistoryan data.

h. Kebutuhan : Work Order (WO)


Masalah : Kurang informatif dalam pencatatannya, karena bentuk yang
tidak terstruktur.
Usulan : Disediakannya data informasi mengenai data service,
sparepart yang digunakan dalam bentuk berkas komputer,
agar dapat meminimalisasikan kesalahan pencatatan yang
terjadi dan mempermudah dalam penghistoryan data.

i. Kebutuhan : Kwitansi
Masalah : Kurang lengkapnya data yang berhubungan dengan transaksi
pembayaran.
Usulan : Perlu adanya bentuk keluaran kwitansi yang berisi data
lengkap mengenai pembayaran yang tersimpan dalam
komputer.

j. Kebutuhan : Laporan Paket service


Masalah : Masih manualnya pencatatan pada laporan service dan,
sehigga membutuhkan waktu yang cukup lama dan kurang
telitinya dalam pencatatan laporan.
Usulan : Disediakannya informasi dalam bentuk laporan service dalam
bentuk berkas komputer yang menginformasikan transaksi
dalam setiap periode pada perusahaan.
.
k. Kebutuhan : Laporan Service Lain
Masalah : Tidak adany pencatatan pada laporan service lain, sehigga
data yang didapat tidak akurat.
Usulan : Disediakannya informasi dalam bentuk laporan service lain
dalam bentuk berkas komputer yang menginformasikan
laporan service lain dalam satu periode tertentu dalam
perusahaan.
l. Kebutuhan : Laporan penjualan sparepart
Masalah : Masih manualnya pencatatan pada laporan penjualan
sparepart, sehigga membutuhkan waktu yang cukup lama dan
kurang telitinya dalam pencatatan laporan.
Usulan : Disediakannya informasi dalam bentuk laporan penjualan
sparepart dalam bentuk berkas komputer yang
menginformasikan transaksi penjualan dalam satu periode
tertentu dalam perusahaan.

7. Package Diagram
Sebuah Use Case merepresentasikan sebuah interaksi antara aktor dengan sistem.
Use Case Diagram juga menjelaskan manfaat sistem jika dilihat menurut pandangan
orang yang berada diluar sistem (actor). Rancangan Use Case tersebut dikelompokkan
menggunakan package. Rancangan hasil analisa tersebut adalah sebagai berikut :

Gambar 3.5
Package Diagram
8. Use Case Diagram

a. Use Case Diagram Master

Gambar 3.6
Use Case Diagram Master

b. Use Case Diagram Transaksi

Gambar 3.7
Use Case Diagram Transaksi
c. Use Case Diagram Laporan

Gambar 3.8
Use Case Diagram Laporan

9. Deskripsi Use Case

a. Package Master

Use Case : Entry motor


Aktor : Service Advisor
Deskripsi :
 Data motor merupakan dasar masukan untuk melakukan kegiatan rekam
dan update pada file motor dimana berisi No_pol, No_rangka, No_mesin,
warna, Type_mtr, Tahun, Pemilik, alamat, telp, Jns_mtr.
 No_pol didapat dari nomor polisi yang kita entry (pada file motor)
 No_rangka didapat dari nomor rangka motor yang kita entry (pada file
motor).
 No_mesin didapat dari nomor mesin motor yang kita entry (pada file
motor).
 warna didapat dari warna motor yang kita entry (pada file motor).
 Type_mtr didapat dari type motor yang kita entry (pada file motor).
 Tahun didapat dari tahun motor yang kita entry (pada file motor).
 Pemilik didapat dari pemilik motor yang kita entry (pada file motor).
 alamat didapat dari alamat pelanggan yang kita entry (pada file motor).
 telp didapat dari telepon pelanggan yang kita entry (pada file motor).
 Jns_mtr didapat dari jenis motor yang kita entry (pada file motor).
Use Case : Entry sparepart
Aktor : Service Advisor
Deskripsi :
 Data sparepart merupakan dasar masukan untuk melakukan kegiatan
rekam dan update pada file sparepart dimana berisi Kd_sprt, Nm_sprt,
Hrg_sprt, Stock.
 Kd_sprt didapat dari kode sparepart yang kita entry (pada file
sparepart).
 Nm_sprt didapat dari nama sparepart yang kita entry (pada file
sparepart).
 Hrg_sprt didapat dari harga sparepart yang kita entry (pada file
sparepart).
 Stock didapat dari stock sparepart yang kita entry (pada file sparepart).

Use Case : Entry paket_service


Aktor : Service Advisor
Deskripsi :
 Data paket_service merupakan dasar masukan untuk melakukan
kegiatan rekam dan update pada file service dimana berisi Kd_paket,
Nm_paket, Hrg_paket.
 Kd_paket didapat dari kode paket yang kita entry (pada file
paket_service).
 Nm_paket didapat dari nama paket yang kita entry (pada file service).
 Hrg_paket didapat dari harga paket yang kita entry (pada file service).

Use Case : Entry service


Aktor : Service Advisor
Deskripsi :
 Data service merupakan dasar masukan untuk melakukan kegiatan
rekam dan update pada file service dimana berisi Kd_service,
Nm_service, Hrg_service.
 Kd_service didapat dari kode service yang kita entry (pada file service).
 Nm_service didapat dari nama service yang kita entry (pada file service).
 Hrg_service didapat dari harga service yang kita entry (pada file
service).
 Detail service didapat berdasarkan kd_service yang berada pada file
service

Use Case : Entry advisor


Aktor : Service Advisor
Deskripsi :
 Data advisor merupakan dasar masukan untuk melakukan kegiatan
rekam dan update pada file advisor dimana berisi id_advisor,
nm_advisor, Alamat, Tlp
 id_advisor didapat dari id advisor yang terakhir di tambah satu (pada file
advisor).
 nm_advisor didapat dari nama advisor yang kita entry (pada file
advisor).
 Alamat didapat dari alamat advisor yang kita entry (pada file advisor).
 tlp didapat dari telepon advisor yang kita entry (pada file advisor).

Use Case : Entry mekanik


Aktor : Service Advisor
Deskripsi :
 Data mekanik merupakan dasar masukan untuk melakukan kegiatan
rekam dan update pada file mekanik dimana berisi Id_Mekanik,
Nm_Mekanik, Alamat, Tlp
 id_mekanik didapat dari id mekanik yang terakhir di tambah satu (pada
file mekanik).
 nm_mekanik didapat dari nama mekanik yang kita entry (pada file
mekanik).
 Alamat didapat dari alamat mekanik yang kita entry (pada file mekanik).
 tlp didapat dari telepon mekanik yang kita entry (pada file mekanik).

b. Package Transaksi

Use Case : Entry SAF


Aktor : Service Advisor
Deskripsi :
 SAF berisikan paket service sesuai data yang terdapat pada form service.
 No_Saf didapat dari nomor Service Advisor Form terakhir (pada file saf)
ditambah satu.
 No_pol didapat dari nomor polisi yang kita entry berdasarkan nomor
polisi yang berada pada file motor.
 Kd_paket dipilih berdasarkan kode paket yang terdapat pada file
paket_service.
 Kd_service dipilih berdasarkan kode service yang terdapat pada file
service.
 Kd_sparepart dipilih berdasarkan kode sparepart yang terdapat pada file
sparepart.
 Keluhan, service_lain, HrgService_lain, Analisa, saran didapat dari file saf
yang kita entry (pada file saf).
 Id_mekanik dipilih berdasarkan id mekanik yang terdapar pada file
mekanik.
 Id_Advisor dipilih berdasarkan id Advisor yang terdapar pada file
Advisor.
 Pada akhir pengisian pada form saf dilakukan penghitungan dengan cara
mentotal harga paket service ditambah harga service lain ditambah Total
Biaya Sparepart.

Use Case : Entry WO


Aktor : Service Advisor
Deskripsi :
 WO berisikan data yang terdapat pada SAF.
 No_Wo didapat dari nomor Work Order terakhir (pada file wo) ditambah
satu.
 No_Saf didapat dari nomor Saf yang kita entry berdasarkan nomor Saf
yang berada pada file Saf.
 Tgl/jam didapat dari sistem.

Use Case : Cetak Kwitansi


Aktor : Service Advisor
Deskripsi :
 Pada saat mencetak kwitansi, Service Advisor harus melakukan peng-
entry-an kwitansi.
 Kwitansi merupakan bukti pembayaran barang yang berisikan
No_kwitansi, tgl_kwitansi, No_Saf.
 No_kwitansi didapat dari nomor kwitansi terakhir (pada file kwitansi)
ditambah satu.
 tgl_kwitansi didapat dari tanggal dari sistem saat peng-entry-an
kwitansi.
 Service Advisor mencetak kwitansi yang kemudian diberikan ke
pelanggan.

c. Package Laporan

Use Case : Cetak Laporan Penjualan Sparepart


Aktor : Service Advisor
Deskripsi :
 Tabel yang digunakan dalam laporan penjualan sparepart yaitu: Tabel
sparepart, saf, dapat, motor dan kwitansi.
 Laporan penjualan sparepart berisikan jumlah barang yang telah terjual.
 Service Advisor menekan tombol cetak untuk mencetak laporan
penjualan sparepart yang kemudian akan diserahkan kepada owner.

Use Case : Cetak Laporan Pendapatan Paket Service


Aktor : Service Advisor
Deskripsi :
 Tabel yang digunakan dalam laporan paket service yaitu: Tabel motor,
paket_service, kwitansi dan saf.
 Laporan pendapatan paket service jumlah pendapatan paket service .
 Service Advisor menekan tombol cetak untuk mencetak laporan paket
service yang kemudian akan diserahkan kepada owner.

Use Case : Cetak Laporan Pendapatan Service lain


Aktor : Service Advisor
Deskripsi :
 Tabel yang digunakan dalam laporan service lain yaitu: Tabel motor,
service, isi, kwitansi dan saf.
 Laporan pendapatan service lain jumlah pendapatan service lain.
 Service Advisor menekan tombol cetak untuk mencetak laporan service
lain yang kemudian akan diserahkan kepada owner.
BAB IV
Rancangan Sistem

1. Rancangan Basis Data


Rancangan Sistem Informasi Penjualan AHASS 8171 Tugu Permai didasarkan pada
usulan pemecahan masalah, yang merupakan pemecahan dari kendala-kendala yang
dihadapi oleh sistem yang sedang berjalan.

a. Entity-Relationship Diagram (ERD)


Berikut ini diagram hubungan data (ER-Diagram) yang didapat berdasarkan hasil
analisa :

Gambar 4.1
Entity-Relationship Diagram (ERD)
b. Transformasi ERD ke LRS

Gambar 4.2
Transformasi ERD ke LRS
c. Logical Record Structure (LRS)

Mekanik
WO
*Id_Mekanik
*No_Wo
Nm_Mekanik
Tgl_wo
Alamat
TgL_Keluar Advisor
tlp *Id_Advisor
*No_Saf
*Id_Advisor
Nm_Advisor
*Id_Mekanik Alamat
tlp

Motor SAF Paket_Service

*No_pol *No_Saf *No_Saf *Kd_Paket *Kd_Paket


No_rangka Keluhan Nm_Paket
No_mesin tgl_saf Hrg_Paket
Warna
*No_pol Jam_Masuk *No_Saf
Type_mtr Analisa
Tahun Saran
*Kd_Paket
Pemilik *No_Saf Tot_Biaya_service
alamat *No_pol
telp *Id_Advisor
Jns_mtr *Id_Mekanik Punya
Isi
*Kd_Paket
*Kd_Service
*No_Saf *Kd_Paket
dapat *Kd_Service Keterangan
Biaya_Service
*Kd_sprt *No_Saf
*No_Saf
Jumlah_sprt *Kd_Service
Jum_harga_sprt
Kwitansi
Service
*Kd_sprt *No_kwitansi *Kd_Service
*No_Saf *Kd_service
tgl_Kwitansi Nm_service
Hrg_service
Sparepart

*Kd_sprt
Nm_sprt
Hrg_sprt
Stock

Gambar 4.3
Logical Record Structure (LRS)

d. Normalisasi
Normalisasi dilakukan terhadap suatu relasi untuk menghindari kemungkinan
terdapatnya anomali yang timbul pada saat pemanfaatan basis data. Langkah-
langkah yang harus dilakukan pada tahap normalisasi dapat dilihat di halaman
berikut ini :
No_rangka

No_mesin

warna

Type_mtr

No_pol
Tahun

Pemilik

alamat

telp

Jns_mtr

Gambar 4.4
Diagram Ketergantungan Fungsi Tabel motor

• Tabel motor berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu No_pol.
Nm_sprt

Hrg_sprt
Kd_sprt
Stock

Gambar 4.5
Diagram Ketergantungan Fungsi Tabel sparepart

• Tabel sparepart berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Kd_sprt.

Gambar 4.6
Diagram Ketergantungan Fungsi Tabel paket_service

• Tabel paket_service berada pada 1 NF, karena tidak ada attribut yang
berulang (Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Kd_paket.
Gambar 4.7
Diagram Ketergantungan Fungsi Tabel service

• Tabel service berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Kd_service.

Gambar 4.8
Diagram Ketergantungan Fungsi Tabel advisor

• Tabel advisor berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Id_advisor.

Gambar 4.9
Diagram Ketergantungan Fungsi Tabel mekanik
• Tabel mekanik berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Id_mekanik.

Gambar 4.10
Diagram Ketergantungan Fungsi Tabel saf

• Tabel saf berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu No_Saf

Tgl_Wo

Jam_Keluar
No_Wo
No_Saf

Gambar 4.11
Diagram Ketergantungan Fungsi Tabel WO

• Tabel wo berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu No_Wo.

Gambar 4.12
Diagram Ketergantungan Fungsi Tabel Kwitansi

• Tabel kwitansi berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu No_kwitansi
Gambar 4.13
Diagram Ketergantungan Fungsi Tabel dapat

• Tabel dapat berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu No_Saf dan Kd_Sprt.

Gambar 4.14
Diagram Ketergantungan Fungsi Tabel punya

• Tabel punya berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Kd_Service dan Kd_Paket
Gambar 4.15
Diagram Ketergantungan Fungsi Tabel isi

• Tabel isi berada pada 1 NF, karena tidak ada attribut yang berulang
(Repeating Group).
• Relasi diatas sudah 2 NF, karena sudah 1 NF dan atribut bukan key sudah
bergantung penuh pada primary key (tidak terjadi partial dependencies).
• Relasi diatas sudah 3 NF, karena sudah 2 NF dan tidak ada transitive
dependency. Yaitu semua atribut non key tidak bergantung pada atribut
lainnya kecuali terhadap primary key yaitu Kd_Service dan No_Saf

e. Spesifikasi Basis Data

Basis data yang telah mempunyai bentuk normal selanjutnya dijelaskan dalam
spesifikasi basis data yang meliputi nama file, media penyimpanan yang
digunakan, isi yang disimpan, organisasi yang digunakan, primary key, panjang
record, jumlah record dan struktur.
Spesifikasi basis data yang memberikan penjelasan secara detil tentang
masing-masing basis data yang digunakan dalam sistem penjualan dan service
pada AHASS TUGU PERMAI adalah sebagai berikut :

1) Nama Tabel : motor


Media : Harddisk
Isi : Informasi data motor
Organisasi : Index Sequential
Primary Key : No_pol
Panjang Record : 157 byte
Jumlah Record : 7.742 record
Struktur :

Tabel 4.1
Tabel Spesifikasi motor
No Nama Field Type Data Field Size Desimal Keterangan
1 No_pol Varchar 10 - Nomor Polisi
2 No_rangka Varchar 17 - Nomor Rangka
3 No_mesin Varchar 12 - No Mesin motor
4 warna Varchar 10 - Warna Motor
5 Type_mtr Varchar 10 - Type Motor
6 Tahun int 4 - Tahun Pembuatan Motor
7 Pemilik Varchar 25 - Pemilik Motor
8 Alamat Varchar 50 - Alamat Pemilik Motor
9 Telp Varchar 12 - No Telepon Pemilik Motor
10 Jns_mtr Varchar 7 - Jenis Motor

2) Nama Tabel : sparepart


Media : Harddisk
Isi : Informasi data sparepart
Organisasi : Index Sequential
Primary Key : Kd_sparepart
Panjang Record : 45 byte
Jumlah Record : 2.715 record
Struktur :

Tabel 4.2
Tabel Spesifikasi sparepart

No Nama Field Type Data Field Size Desimal Keterangan


1 Kd_sprt Varchar 11 - Kode Sparepart
2 Nm_sprt Varchar 25 - Nama Sparepart
3 Hrg_sprt Int 7 - Harga Sparepart
4 Stock Int 2 - Stock Sparepart

3) Nama Tabel : service


Media : Harddisk
Isi : Informasi data service
Organisasi : Index Sequential
Primary Key : kd_service
Panjang Record : 35 byte
Jumlah Record : 51 record
Struktur :

Tabel 4.3
Tabel Spesifikasi service
No Nama Field Type Data Field Size Desimal Keterangan
1 Kd_service Varchar 5 - Kode Service
2 Nm_service Varchar 25 - Nama Service
3 Hrg_service Int 5 - Harga Service

4) Nama Tabel : paket_service


Media : Harddisk
Isi : Informasi data paket service
Organisasi : Index Sequential
Primary Key : kd_paket
Panjang Record : 38 byte
Jumlah Record : 15 record
Struktur :

Tabel 4.4
Tabel Spesifikasi paket_service

No Nama Field Type Data Field Size Desimal Keterangan


1 Kd_paket Varchar 8 - Kode Paket
2 Nm_paket Varchar 25 - Nama Paket
3 Hrg_paket Int 5 - Harga Paket Service

5) Nama Tabel : advisor


Media : Harddisk
Isi : Informasi data advisor
Organisasi : Index Sequential
Primary Key : id_advisor
Panjang Record : 92 byte
Jumlah Record : 9 record
Struktur :

Tabel 4.5
Tabel Spesifikasi advisor

No Nama Field Type Data Field Size Desimal Keterangan


1 id_advisor Varchar 5 - Identitas advisor
2 nm_ advisor Varchar 25 - Nama advisor
3 Alamat Varchar 50 - Alamat advisor
4 Tlp Varchar 12 - Telepon advisor
6) Nama Tabel : Mekanik
Media : Harddisk
Isi : Informasi data mekanik
Organisasi : Index Sequential
Primary Key : id_ mekanik
Panjang Record : 92 byte
Jumlah Record : 9 record
Struktur :

Tabel 4.6
Tabel Spesifikasi mekanik

No Nama Field Type Data Field Size Desimal Keterangan


1 Id_ mekanik Varchar 5 - Identitas Mekanik
2 nm_ mekanik Varchar 25 - Nama Mekanik
3 Alamat Varchar 50 - Alamat Mekanik
4 Tlp Varchar 12 - Telepon Mekanik

7) Nama Tabel : wo
Media : Harddisk
Isi : Informasi data Work Order
Organisasi : Index Sequential
Primary Key : No_wo
Panjang Record : 22 byte
Jumlah Record : 7.391 record
Struktur :

Tabel 4.7
Tabel Spesifikasi wo

No Nama Field Type Data Field Size Desimal Keterangan


1 No_wo Varchar 5 - Nomor Work Order
2 No_Saf Varchar 7 - Nomor SAF
3 Tgl_wo Date 10 - Tanggal Motor Keluar
4 Jam_keluar Time - - Jam Motor Keluar

8) Nama Tabel : saf


Media : Harddisk
Isi : Informasi data service advisor form
Organisasi : Index Sequential
Primary Key : No_Saf
Panjang Record : 141 byte
Jumlah Record : 7.391 record
Struktur :
Tabel 4.8
Tabel Spesifikasi saf

No Nama Field Type Data Field Size Desimal Keterangan


1 No_Saf Varchar 7 - Nomor Service
Advisor Form
2 Keluhan Varchar 30 - Keluhan Pelanggan
3 Tgl_saf Date 10 - Tanggal Service
Advisor Form
4 Jam_masuk Time - - Jam Motor Masuk
5 Analisa Varchar 30 - Analisa Mekanik
6 Saran Varchar 30 - Saran Mekanik
7 TotalBiaya_Seluruh Int 9 - Total Biaya Service
8 No_pol Varchar 10 - Nomor Polisi
9 Kd_service Varchar 5 - Kode Service
10 Id_Mekanik Varchar 5 - Identitas Mekanik
11 Id_Advisor Varchar 5 - Identitas Advisor

9) Nama Tabel : dapat


Media : Harddisk
Isi : Informasi data detai sparepart
Organisasi : Index Sequential
Primary Key : Kd_sprt + No_kwitansi
Panjang Record : 27 byte
Jumlah Record : 28.080 record
Struktur :

Tabel 4.9
Tabel Spesifikasi dapat

No Nama Field Type Data Field Size Desimal Keterangan


1 No_kwitansi Varchar 5 - Nomor Kwitansi
2 Kd_sprt Varchar 11 - Kode Sparepart
3 jumlah_sprt Int 2 - Jumlah Sparepart yang
di Pesan
4 jml_harga_sprt Int 9 - Jumlah harga Sparepart

10) Nama Tabel : kwitansi


Media : Harddisk
Isi : Informasi pelunasan pembayaran
Organisasi : Index Sequential
Primary Key : No_kwitansi
Panjang Record : 22 byte
Jumlah Record : 9.360 record
Struktur :
Tabel 4.10
Tabel Spesifikasi kwitansi

No Nama Field Type Data Field size Desimal Keterangan


1 No_kwitansi Varchar 5 - Nomor kwitansi
2 No_Saf Varchar 7 - Nomor Service
Advisor Form
3 tgl_kwitansi Date 10 - Tanggal kwitansi

11) Nama Tabel : punya


Media : Harddisk
Isi : Detail Paket Service
Organisasi : Index Sequential
Primary Key : Kd_paket + Kd_service
Panjang Record : 38 byte
Jumlah Record : 18 record
Struktur :

Tabel 4.11
Tabel Spesifikasi punya

1 Kd_paket Varchar 8 - Kode Paket


2 Kd_Service Varchar 5 - Kode Service
3 Keterangan Varchar 25 - Ketrangan Detail
Paket Service

11) Nama Tabel : isi


Media : Harddisk
Isi : Detail Service
Organisasi : Index Sequential
Primary Key : No_saf + Kd_service
Panjang Record : 18 byte
Jumlah Record : 22.176 record
Struktur :

Tabel 4.12
Tabel Spesifikasi isi

1 No_Saf Varchar 7 - Nomor SAF


2 Kd_Service Varchar 5 - Kode Service
3 Biaya Service int 6 - Biaya Service
f. Rancangan Kode
Dalam sistem penjualan dan service ini, diperlukan kode untuk mempermudah
melakukan pencarian data. Berikut adalah rancangan kode yang akan digunakan:

1) No_pol : 10 digit - Di entry berdasarkan nomor polisi


kendaraan pelanggan
2) Kd_sprt : 11 digit - Di entry berdasarkan Kode Sparepart
3) Kd_service 5 digit - Di entry berdasarkan Kode Service
4) Kd_Paket : 8 digit - Di entry berdasarkan kode paket service
- 1 digit terakhir mewakili kode ASS.
5) id_Advisor : 5 digit - 2 digit pertama mewakili inisial jabatan.
- 3 digit terakhir adalah urutan dari
jabatan tersebut.
6) Id_Mekanik : 5 digit - 2 digit pertama mewakili inisial jabatan.
- 3 digit terakhir adalah urutan dari
jabatan tersebut.
7) No_Saf : 7 digit - 2 digit pertama mewakili inisial nama
SAF.
- 3 digit terakhir adalah urutan dari nomor
SAF tersebut.
8) No_Wo : 7 digit - Urutan dari nomor Wo
9) No_kwitansi : 5 digit - 2 digit pertama adalah mewakili inisial
nama kwitansi.
- 3 digit terakhir merupakan urutan dari
nomor kwitansi.

2. Rancangan Antar Muka

Rancangan antar muka merupakan bentuk tampilan yang dirancang untuk sistem
yang dibuat.

a. Rancangan Keluaran

a) Nama Keluaran : SAF


Fungsi : SAF sebagai tanda melakukan service dan
pemakaian sparepart.
Media : Kertas
Distribusi : 1) Pelanggan
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Setiap melakukan pembayaran
Volume : 260 / bulan
Format : Lihat Lampiran C-1

b) Nama Keluaran : Kwitansi


Fungsi : Kwitansi sebagai tanda bukti pembayaran.
Media : Kertas
Distribusi : 1) Pelanggan
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Setiap melakukan pembayaran
Volume : 260 / bulan
Format : Lihat Lampiran C-2

c) Nama Keluaran : Laporan Paket Service


Fungsi : Laporan yang diberikan kepada pemilik berupa
catatan Pendapatan Paket Service dalam satu
periode
Media : Kertas
Distribusi : 1) Pemilik
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Harian
Volume : 1 / hari
Format : Lihat Lampiran C-3

d) Nama Keluaran : Laporan Service Lain


Fungsi : Laporan yang diberikan kepada pemilik berupa
catatan pendapatan service lain dalam satu
periode
Media : Kertas
Distribusi : 1) Pemilik
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Harian
Volume : 1 / hari
Format : Lihat Lampiran C-4

e) Nama Keluaran : Laporan Penjualan Sparepart


Fungsi : Laporan yang diberikan kepada pemilik berupa
catatan penjualan sparepart dalam satu periode
Media : Kertas
Distribusi : 1) Pemilik
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Bulanan
Volume : 1 / bulan
Format : Lihat Lampiran C-5

b. Rancangan Masukan

a) Nama Masukan : Data Motor


Fungsi : Data-data Motor Pelanggan
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Harian
Volume : 8 / hari
Format : Lihat Lampiran D-1

b) Nama Masukan : Data Sparepart


Fungsi : Data-data Sparepart
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Mingguan
Volume : 15 / minggu
Format : Lihat Lampiran D-2

c) Nama Masukan : Data Service


Fungsi : Data-data Service
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Tahunan
Volume : 2 / tahun
Format : Lihat Lampiran D-3

d) Nama Masukan : Data Paket Service


Fungsi : Data-data Paket Service
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Tahunan
Volume : 2 / tahun
Format : Lihat Lampiran D-4

e) Nama Masukan : Data Advisor


Fungsi : Data-data Advisor
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Tahunan
Volume : 2 / tahun
Format : Lihat Lampiran D-5

f) Nama Masukan : Data Mekanik


Fungsi : Data-data Mekanik
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Tahunan
Volume : 1 / tahun
Format : Lihat Lampiran D-6

g) Nama Masukan : Data Saf


Fungsi : Menyimpan data transaksi paket service, service
lain dan sparepart
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Harian
Volume : 8 / hari
Format : Lihat Lampiran D-7

h) Nama Masukan : Data Wo


Fungsi : Data-data Work Order
Media : Kertas
Distribusi : 1) Advisor
2) Arsip
Rangkap : 2 (dua)
Frekuensi : Harian
Volume : 8 / hari
Format : Lihat Lampiran D-8
c. Rancangan Dialog Layar

1) Struktur Tampilan

Gambar 4.16
Struktur Tampilan
2) Rancangan Layar

1) Rancangan Layar Menu Utama

Gambar 4.17
Rancangan Dialog Layar Menu Utama

2) Rancangan Layar Menu Master

Gambar 4.18
Rancangan Dialog Layar Menu Master
3) Rancangan Layar Menu Transaksi

Gambar 4.19
Rancangan Dialog Layar Menu Transaksi

4) Rancangan Layar Menu Laporan

Gambar 4.20
Rancangan Dialog Layar Menu Laporan
5) Rancangan Layar Entry Motor

Gambar 4.21
Rancangan Layar Entry Motor

6) Rancangan Layar Entry Sparepart

Gambar 4.22
Rancangan Layar Entry Sparepart
7) Rancangan Layar Entry Service

Gambar 4.23
Rancangan Layar Entry Service

8) Rancangan Layar entry Paket Service

Gambar 4.24
Rancangan LayarEntry Paket Service
9) Rancangan Layar Entry Advisor

Gambar 4.25
Rancangan Layar Entry Advisor

10) Rancangan Layar Entry Mekanik

Gambar 4.26
Rancangan Layar Entry Mekanik
11) Rancangan Layar Entry Wo

Gambar 4.27
Rancangan Layar Entry Wo

12) Rancangan Layar Entry SAF

Gambar 4.28
Rancangan Layar Entry SAF

13) Rancangan Layar Entry Kwitansi

Gambar 4.29
Rancangan Layar Entry Kwitansi

14) Rancangan Layar Laporan Paket Service

AHASS TUGU PERMAI

Laporan Paket Service


Periode

dd/mm/yyyy [s/d] dd/mm/yyyy

Cetak Batal Keluar

Gambar 4.30
Rancangan Layar Laporan Paket Service
15) Rancangan Layar Laporan Service Lain

AHASS TUGU PERMAI

Laporan Service Lain


Periode

dd/mm/yyyy [s/d] dd/mm/yyyy

Cetak Batal Keluar

Gambar 4.31
Rancangan Layar Laporan Service Lain

16) Rancangan Layar Laporan Penjualan Sparepart

AHASS TUGU PERMAI

Laporan Penjualan Sparepart


Periode

dd/mm/yyyy [s/d] dd/mm/yyyy

Cetak Batal Keluar

Gambar 4.32
Rancangan Layar Laporan Penjualan Sparepart
3. Sequence Diagram

1) File Data Master


a) Sequence Diagram Entry Motor

Service Advisor MenuUtama Motor CtrlMotor motor

Load ()
Show ()

Tambah ()
Tambah ()

Input Motor ()
Input Motor ()

Simpan ()
Simpan ()
Simpan Motor ()
Tampil Listview ()

Pilih Motor ()
Pilih Motor ()
Get Motor ()
Tampil Motor

Ubah ()
Ubah ()
Ubah Motor ()

Hapus ()
Hapus ()
Hapus ()

Batal ()

Keluar ()

Gambar 4.33
Sequence Diagram Entry Motor
b) Sequence Diagram Entry Sparepart

Gambar 4.34
Sequence Diagram Entry Sparepart
c) Sequence Diagram Entry Service

Gambar 4.35
Sequence Diagram Entry Service

d) Sequence Diagram Entry Peket Service

MenuUtama PaketService CtrlPaketService paket punya service


Service Advisor

Load ()
Show ()

Tambah ()
Tambah ()

Input data paket ()


Input data Paket ()

Loop Pilih Service ()


Pilih Service ()
Get Service ()

Tambah ()
Tambah ()
Tampil Listview ()

Kurang ()
Kurang ()
Tampil Listview ()

Simpan ()
Simpan ()
Simpan ()
Simpan ()
Pilih paket () Pilih paket ()
Get paket ()
Tampil paket ()
Get paket ()

Ubah () Ubah ()
Ubah ()
Ubah ()

Hapus ()
Hapus ()
Hapus ()
Hapus ()

Batal ()

Keluar ()

Gambar 4.36
Sequence Diagram Entry Paket Service
e) Sequence Diagram Entry Advisor

Gambar 4.37
Sequence Diagram Entry Advisor
f) Sequence Diagram Entry Mekanik

Gambar 4.38
Sequence Diagram Entry Mekanik
2) File Transaksi
a) Sequence Diagram Entry SAF

Gambar 4.39
Sequence Diagram Entry SAF
b) Sequence Diagram Entry Wo

Gambar 4.40
Sequence Diagram Entry Wo
c) Sequence Diagram Entry Kwitansi

Gambar 4.41
Sequence Diagram Entry Kwitansi
3) File Laporan
a) Sequence Diagram Cetak Laporan Paket Service

Gambar 4.42
Sequence Diagram Cetak Laporan Paket Service

b) Sequence Diagram Cetak Laporan Service Lain

Gambar 4.43
Sequence Diagram Cetak Laporan Service Lain
c) Sequence Diagram Cetak Laporan Penjualan Sparepart

Gambar 4.44
Sequence Diagram Cetak Laporan Penjualan Sparepart
e. Rancangan Class Diagram

1) Entity Class

Gambar 4.45
Entity Class
2) Boundary Class

Gambar 4.46
Boundary Class
3) Control Class

CtrlMotor CtrlDataSparepart CtrlService CtrlPaketService

Tambah () Tambah () Tambah () Tambah ()


Input Motor () Input Sparepart () Input Service () Input Paket ()
Simpan () Simpan () Simpan () Pilih service ()
Pilih Motor () Pilih Sparepart () Pilih Service () Tambah service ()
Ubah () Ubah () Ubah () Hapus service ()
Hapus () Hapus () Hapus () Simpan ()
Pilih paket ()
Ubah ()
Hapus ()

CtrlAdvisor CtrlMekanik CtrlWo CtrlSAF

Tambah () Tambah () Tambah () Tambah ()


Input Advisor () Input mekanik () Pilih saf() Input No_pol ()
Simpan () Simpan () Simpan () Pilih Paket Service ()
Pilih Advisor () Pilih Mekanik () Pilih Service ()
Ubah () Ubah () Tambah Service ()
Hapus () Hapus () Hapus Service ()
Pilih Sparepart ()
Tambah Sparepart ()
Hapus Sparepart ()
Pilih Mekanik ()
Pilih Advisor ()
Hitung total ()
Simpan ()
Pilih SAF ()
Ubah ()
Cetak ()

CtrlKwitansi CtrlLapPaketService CtrlLapSparepart


CtrlServiceLain
Tambah () Cetak ()
Cetak () Cetak ()
Pilih SAF() Hitung total ()
Hitung total () Hitung total ()
Simpan ()
Cetak ()

Gambar 4.47
Control Class
BAB V
PENUTUP

1. Kesimpulan
Pendekatan yang digunakan didalam kegiatan analisis dan desain pada tugas akhir
ini adalah pendekatan yang berorientasi obyek (object oriented) menggunakan UML.
Penggunaan UML memudahkan analisis dan desain aplikasi sistem didalam tugas akhir
ini. Dengan menggunakan pendekatan berorientasi obyek dan UML, kegiatan analisa dan
desain lebih difokuskan pada obyek-obyek yang mendukung sistem. Disamping itu, UML
memiliki artifact-artifact yang membantu pendokumentasian kegiatan analisis dan
desain.
Analisis yang dilakukan adalah analisis terhadap kebutuhan-kebutuhan yang harus
dipenuhi oleh aplikasi sistem (use case). Sehingga hal-hal yang mungkin terlupakan pada
saat pembangunan aplikasi sistem atau software dapat dihindari.
Setelah mempelajari permasalahan yang dihadapi dan solusi yang ditawarkan,
maka dapat ditarik beberapa kesimpulan yang dapat dirinci sebagai berikut:
a. Sistem penjualan sparepart dan service pada AHASS Tugu Permai yang
terkomputerisasi lebih mempermudah dan memperlancar proses.
b. Dengan proses komputerisasi mempercepat pengolahan data dan pembuatan
laporan serta informasi yang dihasilkan lebih akurat, cepat, lengkap, dan bentuknya
dapat dirancang sesuai dengan keinginan, sehingga terjadinya kesalahan dapat
diperkecil.
c. Kerangkapan data dikarenakan menumpuknya dokumen dapat diminimalisasi,
sehingga informasi yang dibutuhkan dapat segera terpenuhi dengan lengkap dan
akurat.
d. Efektifitas dan efisiensi dalam proses administrasi penjualan sparepart dan service
dapat tercapai.

2. Saran
Untuk memperoleh hasil yang optimal dari Aplikasi Sistem Informasi Penjualan
sparepart dan service ini, maka beberapa hal yang perlu diperhatikan diantaranya
adalah:
a. Perlu diadakan dokumentasi dan pemeliharaan sistem.
b. Perlu Backup data untuk menjamin keamanan data.
c. Faktor ketelitian dan kecermatan dalam mengolah informasi.
d. Peningkatan kualitas sumber daya manusia dalam pengolahan informasi.
e. Kontrol yang tepat untuk menghasilkan laporan yang tepat waktu, dan akurat
sebagai bahan untuk mengambil keputusan.
f. Memberikan pelatihan kepada karyawan untuk memperkenalkan sistem yang baru.
DAFTAR PUSTAKA

Munawar. Pemodelan Visual dengan UML, Edisi pertama, Jakarta : Graha Ilmu 2005.

Jogiyanto. Sistem Teknologi Informasi. Yogyakarta : Penerbit Andi, 2003.

Prasetyo, Didik Dwi. Mengolah Database dengan Visual Basic.NET. Jakarta : PT. Alex Media
Komputindo, 2003.

Kurniawan, Yahya, ST. Pemrograman Visual Basic.NET 2003. Jakarta : PT. Alek Media
Komputindo, 2003.

Whitten, Jeffery L., Lonnie D. Bentley, Kevin C. Dittman. System Analysis and Design
Methods. 6th ed. New York : McGraw – Hill, 2004.
LAMPIRAN A
KELUARAN
SISTEM BERJALAN
Lampiran A - 1
Formulir Keluaran Service Advisor Form
Lampiran A - 2
Formulir Keluaran Kwitansi
Lampiran A - 3
Formulir Keluaran Laporan Penjualan Sparepart
Lampiran A - 4
Formulir Keluaran Laporan Harian
LAMPIRAN B
MASUKAN
SISTEM BERJALAN
Lampiran B – 1
Formulir Masukan Work Order
LAMPIRAN C
RANCANGAN KELUARAN
ASTRA HONDA AUTHORIZED SERVICE STATION
AHASS 8171
TUGU PERMAI MOTOR
Jl. H. Murtado B4 No. 7
Semper - Jakarta Utara
(021) 70642358

Service Advisor Form


No. SAF : X – 7 - X

DATA MOTOR DATA SAF


Nomor Polisi : X – 10 - X Nama Paket Service : X – 25 - X Saran : X – 30 - X
Jenis Motor : X–7-X Harga Paket : Rp 999.999
Pemilik : X – 25 - X Keluhan : X – 30 - X Nama Mekanik : X – 25 - X
Alamat : X – 50 - X Analisa : X – 30 - X Nama Advisor : X – 25 - X

No. Tp : X – 12 - X

Service Lain Detil Paket Service Nama Sparepart Jml Sparepart

X – 30- X X – 30- X X – 25 - X 99

Lampiran C – 1
Rancangan Keluaran SAF
ASTRA HONDA AUTHORIZED SERVICE STATION
AHASS 8171
TUGU PERMAI MOTOR
Jl. H. Murtado B4 No. 7
Semper - Jakarta Utara
(021) 70642358

TANDA PEMBAYARAN
Nomor Kwitansi : X–5-X Nomor SAF : X–7-X
Tanggal Kwitansi : dd/mm/yyyy Tanggal SAF : dd/mm/yyyy
Nomor Polisi : X – 10 - X Nama Paket Service : X – 25 - X

Type Motor : X – 10 - X Harga Paket Service : Rp 999.999

DATA SERVICE LAIN / SPAREPART

No SPAREPART / SERVICE LAIN QTY HARGA JUMLAH HARGA

99 X - 25 - X / X – 30 - X 99 Rp. 9.999.999 999.999.999

99 X - 25 - X / X – 30 - X 99 Rp. 9.999.999 999.999.999

Total Hrg Service Lain : Rp 9.999.999 Total Hrg Sparepart : Rp 999.999.999

TOTAL BAYAR Rp 999.999.999

PERHATIAN !!!
Barang-barang yang sudah dibeli tidak dapat ditukar atau dikembalikan.
Anda puas beritahu kawan-kawan pemakai Motor Honda
Anda Complain SMS ke 0816 770 991

Lampiran C – 2
Rancangan Keluaran Kwitansi
Lampiran C – 3
Rancangan Keluaran Laporan Paket Service
Lampiran C – 4
Rancangan Keluaran Laporan Service Lain
AHASS 8171 TUGU PERMAI MOTOR
Jl. H. Murtado B4 No. 7 Semper - Jakarta Utara
Telp. (021) 70642358

LAPORAN PENJUALAN SPAREPART


Periode dd/mm/yyyy s/d dd/mm/yyyy

Nomor Tanggal Nomor Nomor Nama Harga Jumlah


Banyak
Kwitansi Kwitansi SAF Polisi Sparepart Satuan Harga

X-5-X dd/mm/yyyy X-7-X X - 10 - X X - 25 - X 9.999.999 99 999.999.999

X - 5 - X dd/mm/yyyy X - 7 - X X - 10 - X X - 25 - X 9.999.999 99 999.999.999

X - 5 - X dd/mm/yyyy X - 7 - X X - 10 - X X - 25 - X 9.999.999 99 999.999.999

Total Harga Sparepart 9.999.999.999

Lampiran C – 5
Rancangan Keluaran Laporan Penjualan Sparepart
\

LAMPIRAN D
RANCANGAN MASUKAN
Lampiran D-1
Rancangan Masukan Data Motor

Lampiran D-2
Rancangan Masukan Data Sparepart
Lampiran D-3
Rancangan Masukan Data Service

Lampiran D-4
Rancangan Masukan Data Paket Service
Lampiran D-5
Rancangan Masukan Data Advisor

Lampiran D-6
Rancangan Masukan Data Mekanik
Lampiran D-7
Rancangan Masukan Data Saf

Lampiran D-8
Rancangan Masukan Data Wo
LAMPIRAN E
SURAT KETERANGAN RESET
LISTING PROGRAM
MENU UTAMA
Imports MySql.Data.MySqlClient
Public Class MenuUtama
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


Application.EnableVisualStyles()
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents MnMotor As System.Windows.Forms.MenuItem
Friend WithEvents MnService As System.Windows.Forms.MenuItem
Friend WithEvents MnSparepart As System.Windows.Forms.MenuItem
Friend WithEvents MnLapPenjSprt As System.Windows.Forms.MenuItem
Friend WithEvents MnKeluar As System.Windows.Forms.MenuItem
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
Friend WithEvents judul As System.Windows.Forms.StatusBarPanel
Friend WithEvents tgl As System.Windows.Forms.StatusBarPanel
Friend WithEvents wkt As System.Windows.Forms.StatusBarPanel
Friend WithEvents MnKwitansi As System.Windows.Forms.MenuItem
Friend WithEvents MnSAF As System.Windows.Forms.MenuItem
Friend WithEvents MnAdvsr As System.Windows.Forms.MenuItem
Friend WithEvents MnMekanik As System.Windows.Forms.MenuItem
Friend WithEvents MnPaketService As
System.Windows.Forms.MenuItem
Friend WithEvents MnWO As System.Windows.Forms.MenuItem
Friend WithEvents MnLapServiceLain As
System.Windows.Forms.MenuItem
Friend WithEvents MnLapPaket As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(MenuUtama))
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MnMotor = New System.Windows.Forms.MenuItem
Me.MnSparepart = New System.Windows.Forms.MenuItem
Me.MnPaketService = New System.Windows.Forms.MenuItem
Me.MnService = New System.Windows.Forms.MenuItem
Me.MnAdvsr = New System.Windows.Forms.MenuItem
Me.MnMekanik = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MnSAF = New System.Windows.Forms.MenuItem
Me.MnWO = New System.Windows.Forms.MenuItem
Me.MnKwitansi = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.MnLapServiceLain = New System.Windows.Forms.MenuItem
Me.MnLapPaket = New System.Windows.Forms.MenuItem
Me.MnLapPenjSprt = New System.Windows.Forms.MenuItem
Me.MnKeluar = New System.Windows.Forms.MenuItem
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.StatusBar1 = New System.Windows.Forms.StatusBar
Me.judul = New System.Windows.Forms.StatusBarPanel
Me.tgl = New System.Windows.Forms.StatusBarPanel
Me.wkt = New System.Windows.Forms.StatusBarPanel
CType(Me.judul,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.tgl,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.wkt,
System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New
System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2,
Me.MenuItem3, Me.MnKeluar})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New
System.Windows.Forms.MenuItem() {Me.MnMotor, Me.MnSparepart,
Me.MnService, Me.MnPaketService, Me.MnAdvsr, Me.MnMekanik})
Me.MenuItem1.Text = "&Master"
'
'MnMotor
'
Me.MnMotor.Index = 0
Me.MnMotor.Text = "Motor"
'
'MnSparepart
'
Me.MnSparepart.Index = 1
Me.MnSparepart.Text = "Sparepart"
'
'MnPaketService
'
Me.MnPaketService.Index = 3
Me.MnPaketService.Text = "Paket Service"
'
'MnService
'
Me.MnService.Index = 2
Me.MnService.Text = "Service"
'
'MnAdvsr
'
Me.MnAdvsr.Index = 4
Me.MnAdvsr.Text = "Advisor"
'
'MnMekanik
'
Me.MnMekanik.Index = 5
Me.MnMekanik.Text = "Mekanik"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.MenuItems.AddRange(New
System.Windows.Forms.MenuItem() {Me.MnSAF, Me.MnWO, Me.MnKwitansi})
Me.MenuItem2.Text = "&Transaksi"
'
'MnSAF
'
Me.MnSAF.Index = 0
Me.MnSAF.Text = "SAF"
'
'MnWO
'
Me.MnWO.Index = 1
Me.MnWO.Text = "WO"
'
'MnKwitansi
'
Me.MnKwitansi.Index = 2
Me.MnKwitansi.Text = "Kwitansi"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.MenuItems.AddRange(New
System.Windows.Forms.MenuItem() {Me.MnLapServiceLain, Me.MnLapPaket,
Me.MnLapPenjSprt})
Me.MenuItem3.Text = "&Laporan"
'
'MnLapServiceLain
'
Me.MnLapServiceLain.Index = 0
Me.MnLapServiceLain.Text = "Service Lain"
'
'MnLapPaket
'
Me.MnLapPaket.Index = 1
Me.MnLapPaket.Text = "Paket Service"
'
'MnLapPenjSprt
'
Me.MnLapPenjSprt.Index = 2
Me.MnLapPenjSprt.Text = "Penjualan Sparepart"
'
'MnKeluar
'
Me.MnKeluar.Index = 3
Me.MnKeluar.Text = "&Keluar"
'
'Timer1
'
'
'StatusBar1
'
Me.StatusBar1.Font = New System.Drawing.Font("Microsoft Sans
Serif", 14.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.StatusBar1.Location = New System.Drawing.Point(0, 436)
Me.StatusBar1.Name = "StatusBar1"
Me.StatusBar1.Panels.AddRange(New
System.Windows.Forms.StatusBarPanel() {Me.judul, Me.tgl, Me.wkt})
Me.StatusBar1.ShowPanels = True
Me.StatusBar1.Size = New System.Drawing.Size(744, 24)
Me.StatusBar1.TabIndex = 1
'
'judul
'
Me.judul.Alignment =
System.Windows.Forms.HorizontalAlignment.Center
Me.judul.AutoSize =
System.Windows.Forms.StatusBarPanelAutoSize.Spring
Me.judul.Text = ".:. SISTEM PENJUALAN DAN SERVICE BENGKEL
AHASS TUGU PERMAI .:."
Me.judul.ToolTipText = "Sistem Penjualan dan Service"
Me.judul.Width = 428
'
'tgl
'
Me.tgl.Alignment =
System.Windows.Forms.HorizontalAlignment.Right
Me.tgl.AutoSize =
System.Windows.Forms.StatusBarPanelAutoSize.Contents
Me.tgl.Text = "Hari, dd mm yyyy"
Me.tgl.ToolTipText = "Tanggal Sekarang"
Me.tgl.Width = 173
'
'wkt
'
Me.wkt.Alignment =
System.Windows.Forms.HorizontalAlignment.Center
Me.wkt.AutoSize =
System.Windows.Forms.StatusBarPanelAutoSize.Contents
Me.wkt.Text = "hh : mm : ss"
Me.wkt.ToolTipText = "Waktu Sekarang"
Me.wkt.Width = 127
'
'MenuUtama
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackgroundImage =
CType(resources.GetObject("$this.BackgroundImage"),
System.Drawing.Image)
Me.ClientSize = New System.Drawing.Size(744, 460)
Me.Controls.Add(Me.StatusBar1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Icon = CType(resources.GetObject("$this.Icon"),
System.Drawing.Icon)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "MenuUtama"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.WindowState =
System.Windows.Forms.FormWindowState.Maximized
CType(Me.judul,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.tgl,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.wkt,
System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)

End Sub

#End Region
Public frm As New Form

Private Sub MnMotor_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles MnMotor.Click
frm = New Motor
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnService_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles MnService.Click
frm = New Service
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnSparepart_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MnSparepart.Click
frm = New DataSparepart
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnLapPenjSprt_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MnLapPenjSprt.Click
frm = New CLapPenjSprt
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnKeluar_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles MnKeluar.Click
Dim keluar As String
keluar = MsgBox("Anda yakin ingin keluar dari sistem ?",
MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Informasi")
If keluar = vbYes Then
Me.Close()
End If
End Sub

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


As System.EventArgs) Handles Timer1.Tick
wkt.Text = Format(Now, "HH : mm : ss")
StatusBar1.Text = System.DateTime.Now
End Sub

Public Sub Menu_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
tgl.Text = Format(Now.Date, "dddd, dd MMMM yyyy")
Timer1.Start()
End Sub

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


As System.EventArgs) Handles MnSAF.Click
frm = New SAF
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnKwitansi_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MnKwitansi.Click
frm = New CetakKW
frm.MdiParent = Me
frm.Show()
End Sub

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


As System.EventArgs) Handles MnAdvsr.Click
frm = New Advsr
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnMekanik_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles MnMekanik.Click
frm = New mekanik
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnPaketService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MnPaketService.Click
frm = New PaketService
frm.MdiParent = Me
frm.Show()
End Sub

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


System.EventArgs) Handles MnWO.Click
frm = New Wo
frm.MdiParent = Me
frm.Show()
End Sub
Private Sub MnLapPaket_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MnLapPaket.Click
frm = New CLapPaketService
frm.MdiParent = Me
frm.Show()
End Sub

Private Sub MnLapServiceLain_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
MnLapServiceLain.Click
frm = New CLapServiceLain
frm.MdiParent = Me
frm.Show()
End Sub
End Class

MASTER MOTOR
Imports MySql.Data.MySqlClient
Public Class Motor
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Txt_NoPol As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents Txt_NoRangka As System.Windows.Forms.TextBox
Friend WithEvents Txt_NoMesin As System.Windows.Forms.TextBox
Friend WithEvents Txt_Type As System.Windows.Forms.TextBox
Friend WithEvents Txt_Thn As System.Windows.Forms.TextBox
Friend WithEvents Txt_Warna As System.Windows.Forms.TextBox
Friend WithEvents Txt_Pmilik As System.Windows.Forms.TextBox
Friend WithEvents Txt_Alamat As System.Windows.Forms.TextBox
Friend WithEvents Txt_NoTlp As System.Windows.Forms.TextBox
Friend WithEvents ListViewMotor As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader7 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader8 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader9 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader10 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader11 As
System.Windows.Forms.ColumnHeader
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents Btn_hps As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_ubh As System.Windows.Forms.Button
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents Cmb_JnsMtr As System.Windows.Forms.ComboBox
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Cmb_JnsMtr = New System.Windows.Forms.ComboBox
Me.Txt_NoTlp = New System.Windows.Forms.TextBox
Me.Txt_Alamat = New System.Windows.Forms.TextBox
Me.Txt_Pmilik = New System.Windows.Forms.TextBox
Me.Txt_Thn = New System.Windows.Forms.TextBox
Me.Txt_Type = New System.Windows.Forms.TextBox
Me.Txt_Warna = New System.Windows.Forms.TextBox
Me.Txt_NoMesin = New System.Windows.Forms.TextBox
Me.Txt_NoRangka = New System.Windows.Forms.TextBox
Me.Label21 = New System.Windows.Forms.Label
Me.Label20 = New System.Windows.Forms.Label
Me.Label19 = New System.Windows.Forms.Label
Me.Label18 = New System.Windows.Forms.Label
Me.Label17 = New System.Windows.Forms.Label
Me.Label16 = New System.Windows.Forms.Label
Me.Label15 = New System.Windows.Forms.Label
Me.Label14 = New System.Windows.Forms.Label
Me.Label13 = New System.Windows.Forms.Label
Me.Label12 = New System.Windows.Forms.Label
Me.Txt_NoPol = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.ListViewMotor = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader7 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader8 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader9 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader10 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader11 = New System.Windows.Forms.ColumnHeader
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_hps = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_ubh = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(216, 8)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 10
Me.Label11.Text = "Entry Data Motor"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.txt_counter)
Me.GroupBox1.Controls.Add(Me.Cmb_JnsMtr)
Me.GroupBox1.Controls.Add(Me.Txt_NoTlp)
Me.GroupBox1.Controls.Add(Me.Txt_Alamat)
Me.GroupBox1.Controls.Add(Me.Txt_Pmilik)
Me.GroupBox1.Controls.Add(Me.Txt_Thn)
Me.GroupBox1.Controls.Add(Me.Txt_Type)
Me.GroupBox1.Controls.Add(Me.Txt_Warna)
Me.GroupBox1.Controls.Add(Me.Txt_NoMesin)
Me.GroupBox1.Controls.Add(Me.Txt_NoRangka)
Me.GroupBox1.Controls.Add(Me.Label21)
Me.GroupBox1.Controls.Add(Me.Label20)
Me.GroupBox1.Controls.Add(Me.Label19)
Me.GroupBox1.Controls.Add(Me.Label18)
Me.GroupBox1.Controls.Add(Me.Label17)
Me.GroupBox1.Controls.Add(Me.Label16)
Me.GroupBox1.Controls.Add(Me.Label15)
Me.GroupBox1.Controls.Add(Me.Label14)
Me.GroupBox1.Controls.Add(Me.Label13)
Me.GroupBox1.Controls.Add(Me.Label12)
Me.GroupBox1.Controls.Add(Me.Txt_NoPol)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(8, 48)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(728, 216)
Me.GroupBox1.TabIndex = 11
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data Motor"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(592, 152)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(24, 20)
Me.txt_counter.TabIndex = 30
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Cmb_JnsMtr
'
Me.Cmb_JnsMtr.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Cmb_JnsMtr.Items.AddRange(New Object() {"< pilih >",
"Bebek", "Scooter", "Sport"})
Me.Cmb_JnsMtr.Location = New System.Drawing.Point(400, 152)
Me.Cmb_JnsMtr.Name = "Cmb_JnsMtr"
Me.Cmb_JnsMtr.Size = New System.Drawing.Size(88, 21)
Me.Cmb_JnsMtr.TabIndex = 9
'
'Txt_NoTlp
'
Me.Txt_NoTlp.Location = New System.Drawing.Point(400, 120)
Me.Txt_NoTlp.MaxLength = 12
Me.Txt_NoTlp.Name = "Txt_NoTlp"
Me.Txt_NoTlp.Size = New System.Drawing.Size(128, 20)
Me.Txt_NoTlp.TabIndex = 8
Me.Txt_NoTlp.Text = ""
'
'Txt_Alamat
'
Me.Txt_Alamat.AutoSize = False
Me.Txt_Alamat.Location = New System.Drawing.Point(400, 56)
Me.Txt_Alamat.MaxLength = 50
Me.Txt_Alamat.Multiline = True
Me.Txt_Alamat.Name = "Txt_Alamat"
Me.Txt_Alamat.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Alamat.Size = New System.Drawing.Size(160, 56)
Me.Txt_Alamat.TabIndex = 7
Me.Txt_Alamat.Text = ""
'
'Txt_Pmilik
'
Me.Txt_Pmilik.Location = New System.Drawing.Point(400, 24)
Me.Txt_Pmilik.MaxLength = 25
Me.Txt_Pmilik.Name = "Txt_Pmilik"
Me.Txt_Pmilik.Size = New System.Drawing.Size(160, 20)
Me.Txt_Pmilik.TabIndex = 6
Me.Txt_Pmilik.Text = ""
'
'Txt_Thn
'
Me.Txt_Thn.Location = New System.Drawing.Point(120, 184)
Me.Txt_Thn.MaxLength = 4
Me.Txt_Thn.Name = "Txt_Thn"
Me.Txt_Thn.TabIndex = 5
Me.Txt_Thn.Text = ""
'
'Txt_Type
'
Me.Txt_Type.Location = New System.Drawing.Point(120, 152)
Me.Txt_Type.MaxLength = 10
Me.Txt_Type.Name = "Txt_Type"
Me.Txt_Type.TabIndex = 4
Me.Txt_Type.Text = ""
'
'Txt_Warna
'
Me.Txt_Warna.Location = New System.Drawing.Point(120, 120)
Me.Txt_Warna.MaxLength = 10
Me.Txt_Warna.Name = "Txt_Warna"
Me.Txt_Warna.TabIndex = 3
Me.Txt_Warna.Text = ""
'
'Txt_NoMesin
'
Me.Txt_NoMesin.Location = New System.Drawing.Point(120, 88)
Me.Txt_NoMesin.MaxLength = 12
Me.Txt_NoMesin.Name = "Txt_NoMesin"
Me.Txt_NoMesin.Size = New System.Drawing.Size(120, 20)
Me.Txt_NoMesin.TabIndex = 2
Me.Txt_NoMesin.Text = ""
'
'Txt_NoRangka
'
Me.Txt_NoRangka.Location = New System.Drawing.Point(120, 56)
Me.Txt_NoRangka.MaxLength = 17
Me.Txt_NoRangka.Name = "Txt_NoRangka"
Me.Txt_NoRangka.Size = New System.Drawing.Size(144, 20)
Me.Txt_NoRangka.TabIndex = 1
Me.Txt_NoRangka.Text = ""
'
'Label21
'
Me.Label21.Location = New System.Drawing.Point(384, 152)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(16, 23)
Me.Label21.TabIndex = 20
Me.Label21.Text = ":"
'
'Label20
'
Me.Label20.Location = New System.Drawing.Point(384, 120)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(16, 23)
Me.Label20.TabIndex = 19
Me.Label20.Text = ":"
'
'Label19
'
Me.Label19.Location = New System.Drawing.Point(384, 72)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(16, 23)
Me.Label19.TabIndex = 18
Me.Label19.Text = ":"
'
'Label18
'
Me.Label18.Location = New System.Drawing.Point(384, 24)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(16, 23)
Me.Label18.TabIndex = 17
Me.Label18.Text = ":"
'
'Label17
'
Me.Label17.Location = New System.Drawing.Point(96, 184)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(16, 23)
Me.Label17.TabIndex = 16
Me.Label17.Text = ":"
'
'Label16
'
Me.Label16.Location = New System.Drawing.Point(96, 152)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(16, 23)
Me.Label16.TabIndex = 15
Me.Label16.Text = ":"
'
'Label15
'
Me.Label15.Location = New System.Drawing.Point(96, 120)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(16, 23)
Me.Label15.TabIndex = 14
Me.Label15.Text = ":"
'
'Label14
'
Me.Label14.Location = New System.Drawing.Point(96, 88)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(16, 23)
Me.Label14.TabIndex = 13
Me.Label14.Text = ":"
'
'Label13
'
Me.Label13.Location = New System.Drawing.Point(96, 56)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(16, 23)
Me.Label13.TabIndex = 12
Me.Label13.Text = ":"
'
'Label12
'
Me.Label12.Location = New System.Drawing.Point(96, 24)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(16, 23)
Me.Label12.TabIndex = 11
Me.Label12.Text = ":"
'
'Txt_NoPol
'
Me.Txt_NoPol.Location = New System.Drawing.Point(120, 24)
Me.Txt_NoPol.MaxLength = 10
Me.Txt_NoPol.Name = "Txt_NoPol"
Me.Txt_NoPol.TabIndex = 0
Me.Txt_NoPol.Text = ""
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(296, 152)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(88, 23)
Me.Label10.TabIndex = 9
Me.Label10.Text = "Jenis Motor"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(296, 120)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(88, 23)
Me.Label9.TabIndex = 8
Me.Label9.Text = "No. Telepon"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(296, 72)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(88, 23)
Me.Label8.TabIndex = 7
Me.Label8.Text = "Alamat"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(296, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(88, 23)
Me.Label7.TabIndex = 6
Me.Label7.Text = "Pemilik"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(8, 184)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(88, 23)
Me.Label6.TabIndex = 5
Me.Label6.Text = "Tahun "
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(8, 152)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(88, 23)
Me.Label5.TabIndex = 4
Me.Label5.Text = "Type"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 120)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(88, 23)
Me.Label4.TabIndex = 3
Me.Label4.Text = "Warna"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(8, 88)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(88, 23)
Me.Label3.TabIndex = 2
Me.Label3.Text = "No. Mesin"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 56)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(88, 23)
Me.Label2.TabIndex = 1
Me.Label2.Text = "No. Rangka"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(88, 23)
Me.Label1.TabIndex = 0
Me.Label1.Text = "No. Polisi"
'
'ListViewMotor
'
Me.ListViewMotor.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader4,
Me.ColumnHeader5, Me.ColumnHeader7, Me.ColumnHeader8,
Me.ColumnHeader9, Me.ColumnHeader10, Me.ColumnHeader11})
Me.ListViewMotor.GridLines = True
Me.ListViewMotor.Location = New System.Drawing.Point(8, 272)
Me.ListViewMotor.Name = "ListViewMotor"
Me.ListViewMotor.Size = New System.Drawing.Size(728, 280)
Me.ListViewMotor.TabIndex = 12
Me.ListViewMotor.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "No. Polisi"
Me.ColumnHeader1.Width = 69
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "No. Rangka"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 90
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "No. Mesin"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 84
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Warna"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 52
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Type"
Me.ColumnHeader5.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
'
'ColumnHeader7
'
Me.ColumnHeader7.Text = "Tahun"
Me.ColumnHeader7.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
'
'ColumnHeader8
'
Me.ColumnHeader8.Text = "Pemilik"
Me.ColumnHeader8.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader8.Width = 66
'
'ColumnHeader9
'
Me.ColumnHeader9.Text = "Alamat"
Me.ColumnHeader9.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader9.Width = 102
'
'ColumnHeader10
'
Me.ColumnHeader10.Text = "Telepon"
Me.ColumnHeader10.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader10.Width = 69
'
'ColumnHeader11
'
Me.ColumnHeader11.Text = "Jenis Motor"
Me.ColumnHeader11.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader11.Width = 73
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Controls.Add(Me.Btn_hps)
Me.GroupBox2.Controls.Add(Me.Btn_smpan)
Me.GroupBox2.Controls.Add(Me.Btn_btal)
Me.GroupBox2.Controls.Add(Me.Btn_ubh)
Me.GroupBox2.Controls.Add(Me.Btn_tmbh)
Me.GroupBox2.Location = New System.Drawing.Point(72, 560)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(576, 56)
Me.GroupBox2.TabIndex = 15
Me.GroupBox2.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(488, 16)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 15
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_hps
'
Me.Btn_hps.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_hps.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_hps.Location = New System.Drawing.Point(296, 16)
Me.Btn_hps.Name = "Btn_hps"
Me.Btn_hps.Size = New System.Drawing.Size(75, 32)
Me.Btn_hps.TabIndex = 13
Me.Btn_hps.Text = "&Hapus"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(104, 16)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(75, 32)
Me.Btn_smpan.TabIndex = 11
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(392, 16)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(75, 32)
Me.Btn_btal.TabIndex = 14
Me.Btn_btal.Text = "&Batal"
'
'Btn_ubh
'
Me.Btn_ubh.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_ubh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubh.Location = New System.Drawing.Point(200, 16)
Me.Btn_ubh.Name = "Btn_ubh"
Me.Btn_ubh.Size = New System.Drawing.Size(75, 32)
Me.Btn_ubh.TabIndex = 12
Me.Btn_ubh.Text = "&Ubah"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(8, 16)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(75, 32)
Me.Btn_tmbh.TabIndex = 10
Me.Btn_tmbh.Text = "&Tambah"
'
'Motor
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(744, 632)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.ListViewMotor)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Motor"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region
Private Sub Btn_Keluar_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub

Function simpan()
SQL = "Insert Into motor values('" & Txt_NoPol.Text & "','"
& Txt_NoRangka.Text & "','" & Txt_NoMesin.Text & "','" &
Txt_Warna.Text & "','" & Txt_Type.Text & "','" & Txt_Thn.Text &
"','" & Txt_Pmilik.Text & "','" & Txt_Alamat.Text & "','" &
Txt_NoTlp.Text & "','" & Cmb_JnsMtr.Text & "')"
Try
If Txt_NoPol.Text = "" Then
MsgBox("Nomor Polisi Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_NoPol.Focus()
Call button()
ElseIf Txt_Type.Text = "" Then
MsgBox("Type Motor Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Type.Focus()
Call button()
ElseIf Txt_Thn.Text = "" Then
MsgBox("Tahun Motor Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_Thn.Focus()
Call button()
ElseIf Txt_Pmilik.Text = "" Then
MsgBox("Nama Pemilik Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_Pmilik.Focus()
Call button()
ElseIf Txt_Alamat.Text = "" Then
MsgBox("Alamat Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_Alamat.Focus()
Call button()
ElseIf Txt_NoTlp.Text = "" Then
MsgBox("Nomor Telepon Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_NoTlp.Focus()
Call button()
ElseIf Cmb_JnsMtr.Text = "< pilih >" Then
MsgBox("Jenis Motor Harus Dipilih...!",
MsgBoxStyle.Critical, "Informasi")
Cmb_JnsMtr.Focus()
Call button()
Else
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
Else
MsgBox("Data Gagal Disimpan",
MsgBoxStyle.Critical, "Peringatan")
End If
Call Bersih()
Call reset()
Btn_tmbh.Enabled = True
Btn_smpan.Enabled = False
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
Call validasi()
End Function
Function ubah()
SQL = "UPDATE motor SET No_rangka = '" & Txt_NoRangka.Text &
"', no_mesin = '" & Txt_NoMesin.Text & "', warna='" & Txt_Warna.Text
& "', type_mtr='" & Txt_Type.Text & "', " & _
" tahun = '" & Txt_Thn.Text & "', pemilik='" &
Txt_Pmilik.Text & "', alamat='" & Txt_Alamat.Text & "', telp='" &
Txt_NoTlp.Text & "', jns_mtr='" & Cmb_JnsMtr.Text & "' " & _
"WHERE No_pol='" & Txt_NoPol.Text & "'"
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call validasi()
Call tampil_listview()
Call Bersih()
End Function
Function hapus()
SQL = "DELETE FROM motor WHERE No_pol = '" & Txt_NoPol.Text
& "' "
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
End Function

Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM Motor ORDER BY No_pol Asc"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListViewMotor.Items.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")
ListViewMotor.Items(ListViewMotor.Items.Count -
1).SubItems.Add("")

'ListViewMotor.Items(y).SubItems(0).Text = (y +
1).ToString
ListViewMotor.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListViewMotor.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListViewMotor.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListViewMotor.Items(y).SubItems(3).Text =
Reader.GetString(3)
ListViewMotor.Items(y).SubItems(4).Text =
Reader.GetString(4)
ListViewMotor.Items(y).SubItems(5).Text =
Reader.GetString(5)
ListViewMotor.Items(y).SubItems(6).Text =
Reader.GetString(6)
ListViewMotor.Items(y).SubItems(7).Text =
Reader.GetString(7)
ListViewMotor.Items(y).SubItems(8).Text =
Reader.GetString(8)
ListViewMotor.Items(y).SubItems(9).Text =
Reader.GetString(9)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function tampil_Motor()
SQL = "SELECT * FROM motor WHERE No_pol = '" &
Txt_NoPol.Text & "'"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_NoPol.Text = Reader.GetString(0)
Txt_NoRangka.Text = Reader.GetString(1)
Txt_NoMesin.Text = Reader.GetString(2)
Txt_Warna.Text = Reader.GetString(3)
Txt_Type.Text = Reader.GetString(4)
Txt_Thn.Text = Reader.GetString(5)
Txt_Pmilik.Text = Reader.GetString(6)
Txt_Alamat.Text = Reader.GetString(7)
Txt_NoTlp.Text = Reader.GetString(8)
Cmb_JnsMtr.Text = Reader.GetString(9)
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function validasi()
Connect.Close()
While Val(txt_counter.Text)
ListViewMotor.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While
End Function
Function aktif()
Txt_NoPol.Focus()
Txt_NoPol.Enabled = True
Txt_NoMesin.Enabled = True
Txt_NoRangka.Enabled = True
Txt_Warna.Enabled = True
Txt_Type.Enabled = True
Txt_Alamat.Enabled = True
Txt_NoTlp.Enabled = True
Txt_Pmilik.Enabled = True
Txt_Thn.Enabled = True
Cmb_JnsMtr.Enabled = True
End Function
Function reset()
Txt_NoPol.Enabled = False
Txt_NoMesin.Enabled = False
Txt_NoRangka.Enabled = False
Txt_Warna.Enabled = False
Txt_Type.Enabled = False
Txt_Alamat.Enabled = False
Txt_NoTlp.Enabled = False
Txt_Pmilik.Enabled = False
Txt_Thn.Enabled = False
Cmb_JnsMtr.Enabled = False
Call Bersih()
Txt_NoPol.Focus()
Cmb_JnsMtr.Text = "< pilih >"
Btn_btal.Enabled = False
Btn_hps.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = False
End Function
Function Bersih()
Txt_NoPol.Text = ""
Txt_NoMesin.Text = ""
Txt_NoRangka.Text = ""
Txt_Type.Text = ""
Txt_Warna.Text = ""
Txt_Thn.Text = ""
Txt_Pmilik.Text = ""
Txt_Alamat.Text = ""
Txt_NoTlp.Text = ""
Cmb_JnsMtr.Text = "< pilih >"
End Function
Function button()
Btn_ubh.Enabled = False
Btn_hps.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = True
End Function
Private Sub Motor_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call reset()
Call tampil_listview()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data Motor")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_hps, "Hapus Data Motor")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data Motor")
mToolTip.SetToolTip(Btn_ubh, "Ubah Data Motor")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data Motor")
End Sub
Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Btn_tmbh.Click
Call aktif()
Txt_NoPol.Focus()
Btn_smpan.Enabled = True
Btn_btal.Enabled = True
Btn_tmbh.Enabled = False
End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Dim Cek As Boolean = False
Dim CekItem As Integer
For CekItem = 0 To Val(txt_counter.Text) - 1
If Txt_NoPol.Text =
ListViewMotor.Items(CekItem).SubItems(0).Text Then
Cek = True
End If
Next
If Cek = False Then
Call simpan()
Call tampil_listview()
Else
MsgBox("Nomor Polisi Sudah Ada, Silahkan Masukkan Nomor
Polisi Lain", MsgBoxStyle.Critical)
Txt_NoPol.Focus()
End If

End Sub

Private Sub ListViewMotor_DoubleClick(ByVal sender As Object,


ByVal e As System.EventArgs) Handles ListViewMotor.DoubleClick
Txt_NoPol.Text =
ListViewMotor.SelectedItems(0).SubItems(0).Text.ToString
Call tampil_Motor()
Call aktif()
Txt_NoPol.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = True
Btn_hps.Enabled = True
Btn_btal.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_hps.Click
Call hapus()
Call validasi()
Call reset()
Call tampil_listview()
Btn_tmbh.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_ubh.Click
Call ubah()
Btn_tmbh.Enabled = True
Call reset()
End Sub

Private Sub Txt_NoTlp_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
Txt_NoTlp.KeyPress
Call angka(e)
End Sub

Private Sub Txt_Thn_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Thn.KeyPress
Call angka(e)
End Sub

Private Sub Txt_Type_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Type.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_Pmilik_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
Txt_Pmilik.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_Warna_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
Txt_Warna.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_NoPol_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
Txt_NoPol.KeyPress
If e.KeyChar = Chr(13) Then
SQL = "select * from motor where no_pol='" &
Txt_NoPol.Text & "'"
Try
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
Txt_NoRangka.Text = Reader.GetString(1)
Txt_NoMesin.Text = Reader.GetString(2)
Txt_Warna.Text = Reader.GetString(3)
Txt_Type.Text = Reader.GetString(4)
Txt_Thn.Text = Reader.GetString(5)
Txt_Pmilik.Text = Reader.GetString(6)
Txt_Alamat.Text = Reader.GetString(7)
Txt_NoTlp.Text = Reader.GetString(8)
Cmb_JnsMtr.Text = Reader.GetString(9)

Btn_btal.Enabled = True
Btn_hps.Enabled = True
Btn_smpan.Enabled = False
Btn_ubh.Enabled = True
Btn_tmbh.Enabled = False
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Information, "Informasi")
Txt_NoPol.Text = ""
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End If
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call reset()
Btn_tmbh.Enabled = True
End Sub

End Class

MASTER SPAREPART
Imports MySql.Data.MySqlClient
Public Class DataSparepart
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "


Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents btn_tambah As System.Windows.Forms.Button
Friend WithEvents txt_stok As System.Windows.Forms.TextBox
Friend WithEvents txt_hrgsprt As System.Windows.Forms.TextBox
Friend WithEvents txt_nmsprt As System.Windows.Forms.TextBox
Friend WithEvents txt_kdsprt As System.Windows.Forms.TextBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents btn_kluar As System.Windows.Forms.Button
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents btn_hapus As System.Windows.Forms.Button
Friend WithEvents btn_btal As System.Windows.Forms.Button
Friend WithEvents btn_ubah As System.Windows.Forms.Button
Friend WithEvents btn_simpan As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.btn_tambah = New System.Windows.Forms.Button
Me.txt_stok = New System.Windows.Forms.TextBox
Me.txt_hrgsprt = New System.Windows.Forms.TextBox
Me.txt_nmsprt = New System.Windows.Forms.TextBox
Me.txt_kdsprt = New System.Windows.Forms.TextBox
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.btn_kluar = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.btn_hapus = New System.Windows.Forms.Button
Me.btn_btal = New System.Windows.Forms.Button
Me.btn_ubah = New System.Windows.Forms.Button
Me.btn_simpan = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.txt_counter = New System.Windows.Forms.TextBox
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.btn_tambah)
Me.GroupBox1.Controls.Add(Me.txt_stok)
Me.GroupBox1.Controls.Add(Me.txt_hrgsprt)
Me.GroupBox1.Controls.Add(Me.txt_nmsprt)
Me.GroupBox1.Controls.Add(Me.txt_kdsprt)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Location = New System.Drawing.Point(16, 64)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(424, 152)
Me.GroupBox1.TabIndex = 9
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data Sparepart"
'
'btn_tambah
'
Me.btn_tambah.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_tambah.Font = New System.Drawing.Font("Microsoft Sans
Serif", 14.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_tambah.Location = New System.Drawing.Point(216, 24)
Me.btn_tambah.Name = "btn_tambah"
Me.btn_tambah.Size = New System.Drawing.Size(48, 24)
Me.btn_tambah.TabIndex = 0
Me.btn_tambah.Text = "+"
'
'txt_stok
'
Me.txt_stok.Location = New System.Drawing.Point(128, 120)
Me.txt_stok.MaxLength = 2
Me.txt_stok.Name = "txt_stok"
Me.txt_stok.Size = New System.Drawing.Size(32, 20)
Me.txt_stok.TabIndex = 4
Me.txt_stok.Text = ""
'
'txt_hrgsprt
'
Me.txt_hrgsprt.Location = New System.Drawing.Point(128, 88)
Me.txt_hrgsprt.MaxLength = 7
Me.txt_hrgsprt.Name = "txt_hrgsprt"
Me.txt_hrgsprt.Size = New System.Drawing.Size(112, 20)
Me.txt_hrgsprt.TabIndex = 3
Me.txt_hrgsprt.Text = ""
'
'txt_nmsprt
'
Me.txt_nmsprt.Location = New System.Drawing.Point(128, 56)
Me.txt_nmsprt.MaxLength = 25
Me.txt_nmsprt.Name = "txt_nmsprt"
Me.txt_nmsprt.Size = New System.Drawing.Size(184, 20)
Me.txt_nmsprt.TabIndex = 2
Me.txt_nmsprt.Text = ""
'
'txt_kdsprt
'
Me.txt_kdsprt.Location = New System.Drawing.Point(128, 24)
Me.txt_kdsprt.MaxLength = 11
Me.txt_kdsprt.Name = "txt_kdsprt"
Me.txt_kdsprt.Size = New System.Drawing.Size(72, 20)
Me.txt_kdsprt.TabIndex = 1
Me.txt_kdsprt.Text = ""
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(112, 120)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(16, 23)
Me.Label9.TabIndex = 8
Me.Label9.Text = ":"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(112, 88)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 7
Me.Label8.Text = ":"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(112, 56)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(16, 23)
Me.Label7.TabIndex = 6
Me.Label7.Text = ":"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(112, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 5
Me.Label6.Text = ":"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(8, 120)
Me.Label5.Name = "Label5"
Me.Label5.TabIndex = 4
Me.Label5.Text = "Stock"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 88)
Me.Label4.Name = "Label4"
Me.Label4.TabIndex = 3
Me.Label4.Text = "Harga Sparepart"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 24)
Me.Label2.Name = "Label2"
Me.Label2.TabIndex = 1
Me.Label2.Text = "Kode Sparepart"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(8, 56)
Me.Label3.Name = "Label3"
Me.Label3.TabIndex = 2
Me.Label3.Text = "Nama Sparepart"
'
'btn_kluar
'
Me.btn_kluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_kluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_kluar.Location = New System.Drawing.Point(368, 544)
Me.btn_kluar.Name = "btn_kluar"
Me.btn_kluar.Size = New System.Drawing.Size(75, 32)
Me.btn_kluar.TabIndex = 9
Me.btn_kluar.Text = "&Keluar"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.btn_hapus)
Me.GroupBox2.Controls.Add(Me.btn_btal)
Me.GroupBox2.Controls.Add(Me.btn_ubah)
Me.GroupBox2.Controls.Add(Me.btn_simpan)
Me.GroupBox2.Location = New System.Drawing.Point(8, 528)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(448, 56)
Me.GroupBox2.TabIndex = 11
Me.GroupBox2.TabStop = False
'
'btn_hapus
'
Me.btn_hapus.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_hapus.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_hapus.Location = New System.Drawing.Point(184, 16)
Me.btn_hapus.Name = "btn_hapus"
Me.btn_hapus.Size = New System.Drawing.Size(75, 32)
Me.btn_hapus.TabIndex = 8
Me.btn_hapus.Text = "&Hapus"
'
'btn_btal
'
Me.btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_btal.Location = New System.Drawing.Point(272, 16)
Me.btn_btal.Name = "btn_btal"
Me.btn_btal.Size = New System.Drawing.Size(75, 32)
Me.btn_btal.TabIndex = 7
Me.btn_btal.Text = "&Batal"
'
'btn_ubah
'
Me.btn_ubah.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_ubah.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_ubah.Location = New System.Drawing.Point(96, 16)
Me.btn_ubah.Name = "btn_ubah"
Me.btn_ubah.Size = New System.Drawing.Size(75, 32)
Me.btn_ubah.TabIndex = 6
Me.btn_ubah.Text = "&Ubah"
'
'btn_simpan
'
Me.btn_simpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_simpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_simpan.Location = New System.Drawing.Point(8, 16)
Me.btn_simpan.Name = "btn_simpan"
Me.btn_simpan.Size = New System.Drawing.Size(75, 32)
Me.btn_simpan.TabIndex = 5
Me.btn_simpan.Text = "&Simpan"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(64, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(312, 32)
Me.Label1.TabIndex = 8
Me.Label1.Text = "Entry Data Sparepart"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader2,
Me.ColumnHeader3, Me.ColumnHeader4, Me.ColumnHeader5})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(24, 224)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(400, 296)
Me.ListView1.TabIndex = 10
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Kode Sparepart"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 95
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Nama Sparepart"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 156
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Harga"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 95
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Stock"
Me.ColumnHeader5.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader5.Width = 56
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(416, 32)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 13
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'DataSparepart
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(464, 600)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.ListView1)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.btn_kluar)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "DataSparepart"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub btn_kluar_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btn_kluar.Click
Me.Close()
End Sub
Function simpan()
SQL = " Insert Into sparepart values ('" & txt_kdsprt.Text &
"','" & txt_nmsprt.Text & "','" & txt_hrgsprt.Text & "','" &
txt_stok.Text & "')"
Try
If txt_kdsprt.Text = "" Or txt_nmsprt.Text = "" Or
txt_hrgsprt.Text = "" Or txt_stok.Text = "" Then
MsgBox("Data Yang Dimasukan Harus Lengkap",
MsgBoxStyle.Critical, "Informasi")
If txt_kdsprt.Text = "" Then
txt_kdsprt.Focus()
Call button()
ElseIf txt_nmsprt.Text = "" Then
txt_nmsprt.Focus()
Call button()
ElseIf txt_hrgsprt.Text = "" Then
txt_hrgsprt.Focus()
Call button()
ElseIf txt_stok.Focus() Then
Call button()
End If
Else
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
Else
MsgBox("Data Gagal Disimpan",
MsgBoxStyle.Critical, "Peringatan")
End If
Call bersih()
Call reset()
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
Call validasi()
End Function
Function ubah()
SQL = "UPDATE sparepart SET Kd_sprt = '" & txt_kdsprt.Text &
"', Nm_sprt = '" & txt_nmsprt.Text & "', Hrg_sprt = '" &
txt_hrgsprt.Text & "', Stock = '" & txt_stok.Text & "' WHERE Kd_sprt
= '" & txt_kdsprt.Text & "' || Nm_sprt = '" & txt_nmsprt.Text & "'"
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call validasi()
Call tampil_listview()
Call bersih()
End Function
Function hapus()
SQL = "DELETE FROM sparepart WHERE Kd_sprt = '" &
txt_kdsprt.Text & "' "
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Dihapus")
End Try
Connect.Close()
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM sparepart ORDER BY Kd_sprt Asc"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

' ListView1.Items(y).SubItems(0).Text = (y +
1).ToString(0)
ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListView1.Items(y).SubItems(3).Text =
Reader.GetString(3)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function tampil_Sparepart()
SQL = "SELECT * FROM sparepart WHERE Kd_sprt= '" &
txt_kdsprt.Text & "'"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
txt_kdsprt.Text = Reader.GetString(0)
txt_nmsprt.Text = Reader.GetString(1)
txt_hrgsprt.Text = Reader.GetString(2)
txt_stok.Text = Reader.GetString(3)
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function bersih()
txt_hrgsprt.Text = ""
txt_kdsprt.Text = ""
txt_nmsprt.Text = ""
txt_stok.Text = ""
End Function
Function reset()
btn_btal.Enabled = False
btn_hapus.Enabled = False
btn_simpan.Enabled = False
btn_ubah.Enabled = False
txt_hrgsprt.Enabled = False
txt_kdsprt.Enabled = False
txt_nmsprt.Enabled = False
txt_stok.Enabled = False
Call bersih()
txt_kdsprt.Focus()
End Function
Function button()
btn_ubah.Enabled = False
btn_hapus.Enabled = False
btn_tambah.Enabled = False
btn_simpan.Enabled = True
End Function
Private Sub DataSparepart_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Call reset()
Call tampil_listview()
mToolTip.SetToolTip(btn_btal, "Batal Input Data")
mToolTip.SetToolTip(btn_kluar, "Keluar Dari Form")
mToolTip.SetToolTip(btn_simpan, "Simpan Data Sparepart")
mToolTip.SetToolTip(btn_ubah, "Ubah Data Barang")
mToolTip.SetToolTip(btn_tambah, "Menambah Data Sparepart")
End Sub
Function validasi()
Connect.Close()
While Val(txt_counter.Text)
ListView1.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While
End Function
Function aktif()
txt_kdsprt.Enabled = True
txt_nmsprt.Enabled = True
txt_hrgsprt.Enabled = True
txt_stok.Enabled = True
End Function
Private Sub btn_tambah_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btn_tambah.Click
btn_simpan.Enabled = True
btn_btal.Enabled = True
txt_hrgsprt.Enabled = True
txt_kdsprt.Enabled = True
txt_nmsprt.Enabled = True
txt_stok.Enabled = True
txt_kdsprt.Focus()
btn_tambah.Enabled = False
End Sub
Private Sub btn_simpan_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btn_simpan.Click

Dim Cek As Boolean = False


Dim CekItem As Integer
For CekItem = 0 To Val(txt_counter.Text) - 1
If txt_kdsprt.Text =
ListView1.Items(CekItem).SubItems(0).Text Then
Cek = True
End If
Next
If Cek = False Then
btn_tambah.Enabled = True
Call simpan()
Call tampil_listview()
Else
MsgBox("Kode Sparepart Sudah Ada, Silahkan Masukkan Kode
Sparepart yang Lain", MsgBoxStyle.Critical)
txt_kdsprt.Focus()
End If

End Sub
Private Sub btn_btal_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btn_btal.Click
Call reset()
btn_hapus.Enabled = False
btn_ubah.Enabled = False
btn_tambah.Enabled = True
End Sub

Private Sub btn_ubah_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btn_ubah.Click
Call ubah()
btn_tambah.Enabled = True
Call reset()
End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
txt_kdsprt.Text =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Call tampil_Sparepart()
btn_tambah.Enabled = False
btn_simpan.Enabled = False
btn_ubah.Enabled = True
btn_hapus.Enabled = True
btn_btal.Enabled = True
Call aktif()
End Sub

Private Sub btn_hapus_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btn_hapus.Click
Call hapus()
Call validasi()
Call reset()
Call tampil_listview()
btn_tambah.Enabled = True
End Sub

Private Sub txt_nmsprt_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
txt_nmsprt.KeyPress
Call huruf(e)
End Sub

Private Sub txt_hrgsprt_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
txt_hrgsprt.KeyPress
Call angka(e)
End Sub

Private Sub txt_stok_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles txt_stok.KeyPress
Call angka(e)
End Sub

Private Sub txt_kdsprt_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
txt_kdsprt.KeyPress
If e.KeyChar = Chr(13) Then
SQL = "select * from sparepart where kd_sprt='" &
txt_kdsprt.Text & "'"
Try
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
txt_nmsprt.Text = Reader.GetString(1)
txt_hrgsprt.Text = Reader.GetString(2)
txt_stok.Text = Reader.GetString(3)

btn_btal.Enabled = True
btn_hapus.Enabled = True
btn_simpan.Enabled = False
btn_ubah.Enabled = True
btn_tambah.Enabled = False
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Information, "Informasi")
txt_kdsprt.Text = ""
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End If
End Sub
End Class

MASTER PAKET SERVICE


Imports MySql.Data.MySqlClient
Public Class PaketService
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents Txt_Hrg As System.Windows.Forms.TextBox
Friend WithEvents Txt_nm As System.Windows.Forms.TextBox
Friend WithEvents Txt_kd As System.Windows.Forms.TextBox
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_HpusService As System.Windows.Forms.Button
Friend WithEvents Btn_TmbhService As System.Windows.Forms.Button
Friend WithEvents Btn_CariService As System.Windows.Forms.Button
Friend WithEvents Txt_NmService As System.Windows.Forms.TextBox
Friend WithEvents Txt_KdService As System.Windows.Forms.TextBox
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents ListViewPaket As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents Btn_CariPaket As System.Windows.Forms.Button
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents Btn_hps As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_ubh As System.Windows.Forms.Button
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents txt_ket As System.Windows.Forms.TextBox
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Btn_CariPaket = New System.Windows.Forms.Button
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Txt_Hrg = New System.Windows.Forms.TextBox
Me.Txt_nm = New System.Windows.Forms.TextBox
Me.Txt_kd = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.txt_ket = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.Btn_HpusService = New System.Windows.Forms.Button
Me.Btn_TmbhService = New System.Windows.Forms.Button
Me.Btn_CariService = New System.Windows.Forms.Button
Me.Txt_NmService = New System.Windows.Forms.TextBox
Me.Txt_KdService = New System.Windows.Forms.TextBox
Me.Label15 = New System.Windows.Forms.Label
Me.Label14 = New System.Windows.Forms.Label
Me.ListViewPaket = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_hps = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_ubh = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Btn_CariPaket)
Me.GroupBox1.Controls.Add(Me.txt_counter)
Me.GroupBox1.Controls.Add(Me.Txt_Hrg)
Me.GroupBox1.Controls.Add(Me.Txt_nm)
Me.GroupBox1.Controls.Add(Me.Txt_kd)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(16, 56)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(416, 120)
Me.GroupBox1.TabIndex = 15
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data Paket Service"
'
'Btn_CariPaket
'
Me.Btn_CariPaket.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_CariPaket.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_CariPaket.Location = New System.Drawing.Point(344,
40)
Me.Btn_CariPaket.Name = "Btn_CariPaket"
Me.Btn_CariPaket.Size = New System.Drawing.Size(56, 32)
Me.Btn_CariPaket.TabIndex = 24
Me.Btn_CariPaket.Text = "Cari"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(312, 96)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 22
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Txt_Hrg
'
Me.Txt_Hrg.Location = New System.Drawing.Point(160, 88)
Me.Txt_Hrg.MaxLength = 6
Me.Txt_Hrg.Name = "Txt_Hrg"
Me.Txt_Hrg.Size = New System.Drawing.Size(112, 20)
Me.Txt_Hrg.TabIndex = 4
Me.Txt_Hrg.Text = ""
'
'Txt_nm
'
Me.Txt_nm.Location = New System.Drawing.Point(160, 56)
Me.Txt_nm.MaxLength = 25
Me.Txt_nm.Name = "Txt_nm"
Me.Txt_nm.Size = New System.Drawing.Size(176, 20)
Me.Txt_nm.TabIndex = 2
Me.Txt_nm.Text = ""
'
'Txt_kd
'
Me.Txt_kd.Location = New System.Drawing.Point(160, 24)
Me.Txt_kd.MaxLength = 8
Me.Txt_kd.Name = "Txt_kd"
Me.Txt_kd.Size = New System.Drawing.Size(80, 20)
Me.Txt_kd.TabIndex = 1
Me.Txt_kd.Text = ""
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(136, 88)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 12
Me.Label8.Text = ":"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(136, 56)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(16, 23)
Me.Label5.TabIndex = 10
Me.Label5.Text = ":"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(136, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 9
Me.Label6.Text = ":"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(24, 88)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(112, 23)
Me.Label4.TabIndex = 3
Me.Label4.Text = "Harga Paket Service"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(24, 56)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(112, 23)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Nama Paket Service"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(24, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(112, 23)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Kode Paket Service"
'
'txt_ket
'
Me.txt_ket.Location = New System.Drawing.Point(296, 48)
Me.txt_ket.Name = "txt_ket"
Me.txt_ket.Size = New System.Drawing.Size(104, 20)
Me.txt_ket.TabIndex = 26
Me.txt_ket.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(312, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(72, 23)
Me.Label3.TabIndex = 19
Me.Label3.Text = "Keterangan"
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(52, 8)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 14
Me.Label11.Text = "Entry Data Paket Service"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Btn_HpusService)
Me.GroupBox3.Controls.Add(Me.Btn_TmbhService)
Me.GroupBox3.Controls.Add(Me.Btn_CariService)
Me.GroupBox3.Controls.Add(Me.Txt_NmService)
Me.GroupBox3.Controls.Add(Me.Txt_KdService)
Me.GroupBox3.Controls.Add(Me.Label15)
Me.GroupBox3.Controls.Add(Me.Label14)
Me.GroupBox3.Controls.Add(Me.ListViewPaket)
Me.GroupBox3.Controls.Add(Me.Label3)
Me.GroupBox3.Controls.Add(Me.txt_ket)
Me.GroupBox3.Location = New System.Drawing.Point(16, 184)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(416, 296)
Me.GroupBox3.TabIndex = 22
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Detil Paket Service"
'
'Btn_HpusService
'
Me.Btn_HpusService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_HpusService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_HpusService.Location = New System.Drawing.Point(168,
248)
Me.Btn_HpusService.Name = "Btn_HpusService"
Me.Btn_HpusService.Size = New System.Drawing.Size(56, 32)
Me.Btn_HpusService.TabIndex = 16
Me.Btn_HpusService.Text = "Hapus"
'
'Btn_TmbhService
'
Me.Btn_TmbhService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_TmbhService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_TmbhService.Location = New System.Drawing.Point(96,
248)
Me.Btn_TmbhService.Name = "Btn_TmbhService"
Me.Btn_TmbhService.Size = New System.Drawing.Size(56, 32)
Me.Btn_TmbhService.TabIndex = 15
Me.Btn_TmbhService.Text = "+"
'
'Btn_CariService
'
Me.Btn_CariService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_CariService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_CariService.Location = New System.Drawing.Point(24,
248)
Me.Btn_CariService.Name = "Btn_CariService"
Me.Btn_CariService.Size = New System.Drawing.Size(56, 32)
Me.Btn_CariService.TabIndex = 14
Me.Btn_CariService.Text = "Cari"
'
'Txt_NmService
'
Me.Txt_NmService.AutoSize = False
Me.Txt_NmService.BackColor = System.Drawing.Color.White
Me.Txt_NmService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_NmService.Enabled = False
Me.Txt_NmService.Location = New System.Drawing.Point(120,
48)
Me.Txt_NmService.MaxLength = 25
Me.Txt_NmService.Name = "Txt_NmService"
Me.Txt_NmService.Size = New System.Drawing.Size(160, 20)
Me.Txt_NmService.TabIndex = 18
Me.Txt_NmService.Text = ""
'
'Txt_KdService
'
Me.Txt_KdService.AutoSize = False
Me.Txt_KdService.BackColor = System.Drawing.Color.White
Me.Txt_KdService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_KdService.Enabled = False
Me.Txt_KdService.Location = New System.Drawing.Point(32, 48)
Me.Txt_KdService.MaxLength = 11
Me.Txt_KdService.Name = "Txt_KdService"
Me.Txt_KdService.Size = New System.Drawing.Size(72, 20)
Me.Txt_KdService.TabIndex = 17
Me.Txt_KdService.Text = ""
'
'Label15
'
Me.Label15.Location = New System.Drawing.Point(152, 24)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(88, 23)
Me.Label15.TabIndex = 13
Me.Label15.Text = "Nama Service"
'
'Label14
'
Me.Label14.Location = New System.Drawing.Point(32, 24)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(88, 23)
Me.Label14.TabIndex = 12
Me.Label14.Text = "Kode Service"
'
'ListViewPaket
'
Me.ListViewPaket.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader3})
Me.ListViewPaket.GridLines = True
Me.ListViewPaket.Location = New System.Drawing.Point(24, 80)
Me.ListViewPaket.Name = "ListViewPaket"
Me.ListViewPaket.Size = New System.Drawing.Size(376, 160)
Me.ListViewPaket.TabIndex = 16
Me.ListViewPaket.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Kd Service"
Me.ColumnHeader1.Width = 77
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Nama Service"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 182
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Ket"
Me.ColumnHeader3.Width = 111
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Controls.Add(Me.Btn_hps)
Me.GroupBox2.Controls.Add(Me.Btn_smpan)
Me.GroupBox2.Controls.Add(Me.Btn_btal)
Me.GroupBox2.Controls.Add(Me.Btn_ubh)
Me.GroupBox2.Controls.Add(Me.Btn_tmbh)
Me.GroupBox2.Location = New System.Drawing.Point(64, 488)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(312, 96)
Me.GroupBox2.TabIndex = 23
Me.GroupBox2.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(224, 56)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 9
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_hps
'
Me.Btn_hps.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_hps.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_hps.Location = New System.Drawing.Point(120, 56)
Me.Btn_hps.Name = "Btn_hps"
Me.Btn_hps.Size = New System.Drawing.Size(75, 32)
Me.Btn_hps.TabIndex = 7
Me.Btn_hps.Text = "&Hapus"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(16, 56)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(75, 32)
Me.Btn_smpan.TabIndex = 5
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(224, 16)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(75, 32)
Me.Btn_btal.TabIndex = 8
Me.Btn_btal.Text = "&Batal"
'
'Btn_ubh
'
Me.Btn_ubh.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_ubh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubh.Location = New System.Drawing.Point(120, 16)
Me.Btn_ubh.Name = "Btn_ubh"
Me.Btn_ubh.Size = New System.Drawing.Size(75, 32)
Me.Btn_ubh.TabIndex = 6
Me.Btn_ubh.Text = "&Ubah"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(16, 16)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(75, 32)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "&Tambah"
'
'PaketService
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(464, 595)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "PaketService"
Me.Text = "PaketService"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region
Public y As Integer

Function simpan()
SQL = "Insert Into Paket_Service values ('" & Txt_kd.Text &
"','" & Txt_nm.Text & "','" & Txt_Hrg.Text & "')"
Try
If Txt_kd.Text = "" Then
MsgBox("Kode Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_kd.Focus()
Call button()
ElseIf Txt_nm.Text = "" Then
MsgBox("Nama Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_nm.Focus()
Call button()
ElseIf Txt_Hrg.Text = "" Then
MsgBox("Harga Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_Hrg.Focus()
Call button()
Else
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
Dim x, y As Integer
x = Val(txt_counter.Text)
For y = 0 To x - 1
Me.simpan_detil(Txt_kd.Text,
ListViewPaket.Items(y).SubItems(0).Text,
ListViewPaket.Items(y).SubItems(2).Text)
Next
MsgBox("Data berhasil disimpan",
MsgBoxStyle.Information, "Informasi")
End If
Call bersih_form()
Call reset()
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
End Function
Function simpan_detil(ByVal KodePaket As String, ByVal
KodeService As String, ByVal Ket As String)

If Connect.State = ConnectionState.Closed Then


Connect.Open()
SQLDetil = "INSERT INTO punya VALUES ('" & KodePaket &
"','" & KodeService & "','" & Ket & "')"
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
End If

Connect.Close()
End Function
Function utkcari_service()

Dim form As New CariService


form.ShowDialog()
Txt_KdService.Text = form.kode
Call tampilkan_service()

End Function

Function tampilkan_service()

SQL = "SELECT Kd_service, Nm_service FROM service WHERE


Kd_service= '" & Txt_KdService.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_KdService.Text = Reader.GetString(0)
Txt_NmService.Text = Reader.GetString(1)

Btn_TmbhService.Enabled = True
Btn_CariService.Enabled = False

End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()

End Function
Function utkcari_paket()
Dim form As New CariPaketService
form.ShowDialog()
Txt_kd.Text = form.kode
Btn_CariPaket.Enabled = True
If Txt_kd.Text <> "" Then
tampilkan_paket()
Btn_CariPaket.Enabled = False
End If
End Function

Function tampilkan_paket()

SQL = "SELECT * FROM paket_service WHERE kd_paket = '" &


Txt_kd.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_kd.Text = Reader.GetString(0)
Txt_nm.Text = Reader.GetString(1)
Txt_Hrg.Text = Reader.GetString(2)

Btn_TmbhService.Enabled = True
Btn_CariService.Enabled = False
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
Call tampil_detilservice()
Txt_kd.Enabled = False
Txt_nm.Focus()
End Function
Function tampil_detilservice()
SQL = "SELECT punya.kd_service, service.nm_service,
punya.keterangan FROM punya INNER JOIN service ON punya.kd_service =
service.kd_service INNER JOIN paket_service ON punya.kd_paket =
paket_service.kd_paket WHERE punya.kd_paket = '" & Txt_kd.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
Try
While Reader.Read
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)
ListViewPaket.Items.Add("")
ListViewPaket.Items(ListViewPaket.Items.Count -
1).SubItems.Add("")
ListViewPaket.Items(ListViewPaket.Items.Count -
1).SubItems.Add("")

ListViewPaket.Items(y).SubItems(0).Text() =
Reader.GetString(0)
ListViewPaket.Items(y).SubItems(1).Text() =
Reader.GetString(1)
ListViewPaket.Items(y).SubItems(2).Text() =
Reader.GetString(2)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function
Function isilist()

Dim Row As Integer


Row = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListViewPaket.Items.Add(Txt_KdService.Text)
ListViewPaket.Items(ListViewPaket.Items.Count -
1).SubItems.Add(Txt_NmService.Text)
ListViewPaket.Items(ListViewPaket.Items.Count -
1).SubItems.Add(txt_ket.Text)

'ListViewPaket.Items(Row).SubItems(0).Text =
Txt_KdService.Text
'ListViewPaket.Items(Row).SubItems(1).Text =
Txt_NmService.Text
'ListViewPaket.Items(Row).SubItems(2).Text = txt_ket.Text
Call bersih_service()
End Function

Function hapus_list()

For y = 0 To Val(txt_counter.Text) - 1
If ListViewPaket.Items(y).SubItems(0).Text =
Txt_KdService.Text Then
ListViewPaket.Items(y).Remove()
Me.hapus_list_service2(Txt_kd.Text,
Txt_KdService.Text)
Exit For
End If
Next
txt_counter.Text = Val(txt_counter.Text) - 1
Call bersih_service()
End Function

Function ubah()
SQL = "UPDATE paket_service SET Nm_paket='" & Txt_nm.Text &
"', Hrg_paket='" & Txt_Hrg.Text & "' WHERE Kd_paket='" & Txt_kd.Text
& "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
Call ubah_list_service()
End If
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call bersih_form()
End Function
Function ubah_list_service()
Dim x, y As Integer

SQLDetil = "DELETE FROM punya WHERE kd_paket = '" &


Txt_kd.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery

x = Val(txt_counter.Text)
For y = 0 To x - 1
Me.simpan_detil(Txt_kd.Text,
ListViewPaket.Items(y).SubItems(0).Text,
ListViewPaket.Items(y).SubItems(2).Text)
Next
Connect.Close()
End Function
Function hapus()
SQL = "DELETE FROM paket_service WHERE Kd_paket = '" &
Txt_kd.Text & "' "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
Me.hapus_list_service()
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Dihapus")
End Try
Connect.Close()
End Function

Function hapus_list_service()
SQL = "DELETE FROM punya WHERE Kd_paket = '" & Txt_kd.Text &
"' "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
End If

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Dihapus")
End Try
Connect.Close()
End Function

Function hapus_list_service2(ByVal KodePaket As String, ByVal


KodeService As String)
SQL = "DELETE FROM punya WHERE Kd_paket = '" & KodePaket &
"' && kd_service = '" & KodeService & "' "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
End If

Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Dihapus")
End Try
Connect.Close()
End Function
Function reset()
Txt_kd.Enabled = False
Txt_nm.Enabled = False
Txt_Hrg.Enabled = False
txt_ket.Enabled = False
Call bersih_form()
Btn_CariPaket.Enabled = False
Btn_CariService.Enabled = False
Btn_TmbhService.Enabled = False
Btn_HpusService.Enabled = False
Btn_btal.Enabled = False
Btn_hps.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = False
End Function

Function aktif()

Txt_kd.Enabled = True
Txt_nm.Enabled = True
Txt_Hrg.Enabled = True
txt_ket.Enabled = True
Txt_kd.Focus()
End Function

Function bersih_service()

Txt_KdService.Text = ""
Txt_NmService.Text = ""
txt_ket.Text = ""
Btn_TmbhService.Enabled = True
Btn_HpusService.Enabled = False

End Function

Function bersih_listview()

While Val(txt_counter.Text) > 0


ListViewPaket.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While

End Function

Function bersih_form()
Txt_kd.Text = ""
Txt_nm.Text = ""
Txt_Hrg.Text = ""
txt_ket.Text = ""
Call bersih_service()
Call bersih_listview()
End Function

Function button()
Btn_ubh.Enabled = False
Btn_hps.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = True
End Function

Private Sub PaketService_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
Call reset()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data Service")
mToolTip.SetToolTip(Btn_ubh, "Ubah Data Service")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data Service")
End Sub

Private Sub Btn_TmbhService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_TmbhService.Click
Dim Cek As Boolean = False
Dim CekItem As Integer
If txt_ket.Text = "" Then
MsgBox("Keterangan Harus Diisi", MsgBoxStyle.Critical,
"Peringatan")
txt_ket.Focus()
Exit Sub
End If
For CekItem = 0 To Val(txt_counter.Text) - 1
If Txt_KdService.Text =
ListViewPaket.Items(CekItem).SubItems(0).Text Then
Cek = True
ListViewPaket.Items(CekItem).SubItems(2).Text =
txt_ket.Text
bersih_service()
End If
Next
If Cek = False Then
Call isilist()
Btn_TmbhService.Enabled = False

End If
Btn_CariService.Enabled = True
Btn_ubh.Enabled = True
End Sub

Private Sub Btn_CariService_Click(ByVal sender As Object, ByVal


e As System.EventArgs) Handles Btn_CariService.Click
Call utkcari_service()
Btn_CariService.Enabled = False
End Sub

Private Sub Btn_HpusService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_HpusService.Click
Call hapus_list()
Btn_TmbhService.Enabled = False
End Sub

Private Sub Btn_CariPaket_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_CariPaket.Click
Call utkcari_paket()

Btn_CariService.Enabled = True
Btn_TmbhService.Enabled = False
Btn_ubh.Enabled = True
Btn_hps.Enabled = True
Btn_smpan.Enabled = False
End Sub

Private Sub Btn_tmbh_Click_1(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_tmbh.Click
Call aktif()
Btn_CariService.Enabled = True
Btn_CariPaket.Enabled = True
Btn_smpan.Enabled = True
Btn_btal.Enabled = True
Btn_tmbh.Enabled = False
End Sub

Private Sub Btn_smpan_Click_1(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_smpan.Click
Call simpan()
Call bersih_form()
Btn_smpan.Enabled = False
Btn_tmbh.Enabled = True
Btn_TmbhService.Enabled = False
End Sub

Private Sub Btn_Keluar_Click_1(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call reset()
Btn_tmbh.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_ubh.Click
Call ubah()
Btn_tmbh.Enabled = True
Call reset()
End Sub
Private Sub ListViewPaket_DoubleClick(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ListViewPaket.DoubleClick
Txt_KdService.Text =
ListViewPaket.SelectedItems(0).SubItems(0).Text.ToString
Txt_NmService.Text =
ListViewPaket.SelectedItems(0).SubItems(1).Text.ToString
txt_ket.Text =
ListViewPaket.SelectedItems(0).SubItems(2).Text.ToString

Btn_TmbhService.Enabled = True
Btn_CariService.Enabled = True
Btn_HpusService.Enabled = True
Call aktif()
Txt_kd.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = False
Btn_hps.Enabled = True
Btn_btal.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_hps.Click
Call hapus()
Call reset()
Btn_tmbh.Enabled = True
End Sub

End Class

MASTER SERVICE
Imports MySql.Data.MySqlClient
Public Class Service
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Txt_kd As System.Windows.Forms.TextBox
Friend WithEvents Txt_nm As System.Windows.Forms.TextBox
Friend WithEvents Txt_Hrg As System.Windows.Forms.TextBox
Friend WithEvents ListViewService As
System.Windows.Forms.ListView
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents Btn_ubh As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_hps As System.Windows.Forms.Button
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Txt_Hrg = New System.Windows.Forms.TextBox
Me.Txt_nm = New System.Windows.Forms.TextBox
Me.Txt_kd = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.ListViewService = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_hps = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_ubh = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(16, 8)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 10
Me.Label11.Text = "Entry Data Service"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.txt_counter)
Me.GroupBox1.Controls.Add(Me.Txt_Hrg)
Me.GroupBox1.Controls.Add(Me.Txt_nm)
Me.GroupBox1.Controls.Add(Me.Txt_kd)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(8, 48)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(328, 128)
Me.GroupBox1.TabIndex = 11
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data Service"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(264, 80)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 22
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Txt_Hrg
'
Me.Txt_Hrg.Location = New System.Drawing.Point(128, 88)
Me.Txt_Hrg.MaxLength = 6
Me.Txt_Hrg.Name = "Txt_Hrg"
Me.Txt_Hrg.TabIndex = 4
Me.Txt_Hrg.Text = ""
'
'Txt_nm
'
Me.Txt_nm.Location = New System.Drawing.Point(128, 56)
Me.Txt_nm.MaxLength = 25
Me.Txt_nm.Name = "Txt_nm"
Me.Txt_nm.Size = New System.Drawing.Size(136, 20)
Me.Txt_nm.TabIndex = 2
Me.Txt_nm.Text = ""
'
'Txt_kd
'
Me.Txt_kd.Location = New System.Drawing.Point(128, 24)
Me.Txt_kd.MaxLength = 5
Me.Txt_kd.Name = "Txt_kd"
Me.Txt_kd.Size = New System.Drawing.Size(64, 20)
Me.Txt_kd.TabIndex = 1
Me.Txt_kd.Text = ""
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(112, 88)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 12
Me.Label8.Text = ":"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(112, 88)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(16, 23)
Me.Label7.TabIndex = 11
Me.Label7.Text = ":"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(112, 56)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(16, 23)
Me.Label5.TabIndex = 10
Me.Label5.Text = ":"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(112, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 9
Me.Label6.Text = ":"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(8, 88)
Me.Label4.Name = "Label4"
Me.Label4.TabIndex = 3
Me.Label4.Text = "Harga Service"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(8, 56)
Me.Label2.Name = "Label2"
Me.Label2.TabIndex = 1
Me.Label2.Text = "Nama Service"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(8, 24)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 0
Me.Label1.Text = "Kode Service"
'
'ListViewService
'
Me.ListViewService.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader4})
Me.ListViewService.GridLines = True
Me.ListViewService.Location = New System.Drawing.Point(8,
192)
Me.ListViewService.Name = "ListViewService"
Me.ListViewService.Size = New System.Drawing.Size(328, 216)
Me.ListViewService.TabIndex = 12
Me.ListViewService.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Kode Service"
Me.ColumnHeader1.Width = 77
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Nama Service"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 136
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Harga"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 116
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Controls.Add(Me.Btn_hps)
Me.GroupBox2.Controls.Add(Me.Btn_smpan)
Me.GroupBox2.Controls.Add(Me.Btn_btal)
Me.GroupBox2.Controls.Add(Me.Btn_ubh)
Me.GroupBox2.Controls.Add(Me.Btn_tmbh)
Me.GroupBox2.Location = New System.Drawing.Point(16, 416)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(312, 96)
Me.GroupBox2.TabIndex = 13
Me.GroupBox2.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(224, 56)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 9
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_hps
'
Me.Btn_hps.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_hps.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_hps.Location = New System.Drawing.Point(120, 56)
Me.Btn_hps.Name = "Btn_hps"
Me.Btn_hps.Size = New System.Drawing.Size(75, 32)
Me.Btn_hps.TabIndex = 7
Me.Btn_hps.Text = "&Hapus"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(16, 56)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(75, 32)
Me.Btn_smpan.TabIndex = 5
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(224, 16)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(75, 32)
Me.Btn_btal.TabIndex = 8
Me.Btn_btal.Text = "&Batal"
'
'Btn_ubh
'
Me.Btn_ubh.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_ubh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubh.Location = New System.Drawing.Point(120, 16)
Me.Btn_ubh.Name = "Btn_ubh"
Me.Btn_ubh.Size = New System.Drawing.Size(75, 32)
Me.Btn_ubh.TabIndex = 6
Me.Btn_ubh.Text = "&Ubah"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(16, 16)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(75, 32)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "&Tambah"
'
'Service
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(344, 528)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.ListViewService)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Service"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub
Function bersih()
Txt_kd.Text = ""
Txt_nm.Text = ""
Txt_Hrg.Text = ""
End Function
Function validasi()
Connect.Close()
While Val(txt_counter.Text)
ListViewService.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While
End Function
Function simpan()
SQL = "Insert Into Service values ('" & Txt_kd.Text & "','"
& Txt_nm.Text & "','" & Txt_Hrg.Text & "')"
Try
If Txt_kd.Text = "" Then
MsgBox("Kode Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_kd.Focus()
Call button()
ElseIf Txt_nm.Text = "" Then
MsgBox("Nama Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_nm.Focus()
Call button()
ElseIf Txt_Hrg.Text = "" Then
MsgBox("Harga Service Harus Diisi...!",
MsgBoxStyle.Critical, "Informasi")
Txt_Hrg.Focus()
Call button()
Else
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
Else
MsgBox("Data Gagal Disimpan",
MsgBoxStyle.Critical, "Peringatan")
End If
Call bersih()
Call reset()
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
Call validasi()
End Function
Function ubah()
SQL = "UPDATE service SET Nm_Service='" & Txt_nm.Text & "',
Hrg_service='" & Txt_Hrg.Text & "' WHERE Kd_service='" & Txt_kd.Text
& "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call validasi()
Call tampil_listview()
Call bersih()
End Function
Function hapus()
SQL = "DELETE FROM service WHERE Kd_service = '" &
Txt_kd.Text & "' "
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM service ORDER BY Kd_service"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListViewService.Items.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")

' ListViewService.Items(y).SubItems(0).Text = (y +
1).ToString(0)
ListViewService.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListViewService.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListViewService.Items(y).SubItems(2).Text =
Reader.GetString(2)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function tampil_service()
SQL = "SELECT * FROM service WHERE Kd_Service = '" &
Txt_kd.Text & "'"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_kd.Text = Reader.GetString(0)
Txt_nm.Text = Reader.GetString(1)
Txt_Hrg.Text = Reader.GetString(2)
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Btn_tmbh.Click
Txt_kd.Enabled = True
Txt_nm.Enabled = True
Txt_kd.Focus()
Txt_Hrg.Enabled = True
Btn_smpan.Enabled = True
Btn_btal.Enabled = True
Btn_tmbh.Enabled = False
End Sub
Function reset()
Txt_kd.Enabled = False
Txt_nm.Enabled = False
Txt_Hrg.Enabled = False
Call bersih()
Btn_btal.Enabled = False
Btn_hps.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = False
End Function
Function aktif()
Txt_kd.Focus()
Txt_kd.Enabled = True
Txt_nm.Enabled = True
Txt_Hrg.Enabled = True
End Function
Function button()
Btn_ubh.Enabled = False
Btn_hps.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = True
End Function
Private Sub Service_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
Call reset()
Call tampil_listview()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data Service")
mToolTip.SetToolTip(Btn_ubh, "Ubah Data Service")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data Service")
End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Dim Cek As Boolean = False
Dim CekItem As Integer
For CekItem = 0 To Val(txt_counter.Text) - 1
If Txt_kd.Text =
ListViewService.Items(CekItem).SubItems(0).Text Then
Cek = True
End If
Next
If Cek = False Then
Call simpan()
Call tampil_listview()
Btn_tmbh.Enabled = True
Else
MsgBox("Kode Service Sudah Ada, Silahkan Masukkan Kode
Service yang Lain", MsgBoxStyle.Critical)
Txt_kd.Focus()
End If
End Sub
Private Sub Btn_hps_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btn_hps.Click
Call hapus()
Call validasi()
Call tampil_listview()
Call reset()
Btn_tmbh.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_ubh.Click
Call ubah()
Btn_tmbh.Enabled = True
Call reset()
End Sub

Private Sub ListViewService_DoubleClick(ByVal sender As Object,


ByVal e As System.EventArgs) Handles ListViewService.DoubleClick
Txt_kd.Text =
ListViewService.SelectedItems(0).SubItems(0).Text.ToString
Call tampil_service()
Call aktif()
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_ubh.Enabled = True
Btn_hps.Enabled = True
Btn_btal.Enabled = True
End Sub

Private Sub Txt_nm_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_nm.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_Hrg_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Hrg.KeyPress
Call angka(e)
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call reset()
Btn_tmbh.Enabled = True
End Sub

Private Sub Txt_kd_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_kd.KeyPress
If e.KeyChar = Chr(13) Then
SQL = "select * from service where kd_service='" &
Txt_kd.Text & "'"
Try
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
Txt_nm.Text = Reader.GetString(1)
Txt_Hrg.Text = Reader.GetString(2)

Btn_btal.Enabled = True
Btn_hps.Enabled = True
Btn_smpan.Enabled = False
Btn_ubh.Enabled = True
Btn_tmbh.Enabled = False
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End If
End Sub
End Class

MASTER ADVISOR
Imports MySql.Data.MySqlClient
Public Class Advsr
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_kluar As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_hpus As System.Windows.Forms.Button
Friend WithEvents Btn_ubah As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader6 As
System.Windows.Forms.ColumnHeader
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents Txt_Tlp As System.Windows.Forms.TextBox
Friend WithEvents Txt_Almt As System.Windows.Forms.TextBox
Friend WithEvents Txt_Nm As System.Windows.Forms.TextBox
Friend WithEvents Txt_Id As System.Windows.Forms.TextBox
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents ListViewadvisor As
System.Windows.Forms.ListView
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_kluar = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_hpus = New System.Windows.Forms.Button
Me.Btn_ubah = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader6 = New System.Windows.Forms.ColumnHeader
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.Txt_Tlp = New System.Windows.Forms.TextBox
Me.Txt_Almt = New System.Windows.Forms.TextBox
Me.Txt_Nm = New System.Windows.Forms.TextBox
Me.Txt_Id = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.ListViewadvisor = New System.Windows.Forms.ListView
Me.GroupBox2.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Nama advisor"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 96
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_kluar)
Me.GroupBox2.Controls.Add(Me.Btn_btal)
Me.GroupBox2.Controls.Add(Me.Btn_hpus)
Me.GroupBox2.Controls.Add(Me.Btn_ubah)
Me.GroupBox2.Controls.Add(Me.Btn_smpan)
Me.GroupBox2.Location = New System.Drawing.Point(16, 432)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(448, 56)
Me.GroupBox2.TabIndex = 15
Me.GroupBox2.TabStop = False
'
'Btn_kluar
'
Me.Btn_kluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_kluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_kluar.Location = New System.Drawing.Point(360, 16)
Me.Btn_kluar.Name = "Btn_kluar"
Me.Btn_kluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_kluar.TabIndex = 9
Me.Btn_kluar.Text = "&Keluar"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(272, 16)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(75, 32)
Me.Btn_btal.TabIndex = 8
Me.Btn_btal.Text = "&Batal"
'
'Btn_hpus
'
Me.Btn_hpus.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_hpus.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_hpus.Location = New System.Drawing.Point(184, 16)
Me.Btn_hpus.Name = "Btn_hpus"
Me.Btn_hpus.Size = New System.Drawing.Size(75, 32)
Me.Btn_hpus.TabIndex = 7
Me.Btn_hpus.Text = "&Hapus"
'
'Btn_ubah
'
Me.Btn_ubah.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_ubah.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubah.Location = New System.Drawing.Point(96, 16)
Me.Btn_ubah.Name = "Btn_ubah"
Me.Btn_ubah.Size = New System.Drawing.Size(75, 32)
Me.Btn_ubah.TabIndex = 6
Me.Btn_ubah.Text = "&Ubah"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(8, 16)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(75, 32)
Me.Btn_smpan.TabIndex = 5
Me.Btn_smpan.Text = "&Simpan"
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Alamat"
Me.ColumnHeader5.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader5.Width = 161
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Id advisor"
Me.ColumnHeader3.Width = 75
'
'ColumnHeader6
'
Me.ColumnHeader6.Text = "Telepon"
Me.ColumnHeader6.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader6.Width = 106
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.txt_counter)
Me.GroupBox1.Controls.Add(Me.Btn_tmbh)
Me.GroupBox1.Controls.Add(Me.Txt_Tlp)
Me.GroupBox1.Controls.Add(Me.Txt_Almt)
Me.GroupBox1.Controls.Add(Me.Txt_Nm)
Me.GroupBox1.Controls.Add(Me.Txt_Id)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(24, 64)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(440, 192)
Me.GroupBox1.TabIndex = 12
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data advisor"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(320, 98)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(24, 20)
Me.txt_counter.TabIndex = 31
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 14.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(208, 24)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(48, 23)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "+"
'
'Txt_Tlp
'
Me.Txt_Tlp.Location = New System.Drawing.Point(128, 152)
Me.Txt_Tlp.MaxLength = 12
Me.Txt_Tlp.Name = "Txt_Tlp"
Me.Txt_Tlp.Size = New System.Drawing.Size(120, 20)
Me.Txt_Tlp.TabIndex = 4
Me.Txt_Tlp.Text = ""
'
'Txt_Almt
'
Me.Txt_Almt.AutoSize = False
Me.Txt_Almt.Location = New System.Drawing.Point(128, 88)
Me.Txt_Almt.MaxLength = 50
Me.Txt_Almt.Multiline = True
Me.Txt_Almt.Name = "Txt_Almt"
Me.Txt_Almt.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Almt.Size = New System.Drawing.Size(160, 56)
Me.Txt_Almt.TabIndex = 3
Me.Txt_Almt.Text = ""
'
'Txt_Nm
'
Me.Txt_Nm.Location = New System.Drawing.Point(128, 56)
Me.Txt_Nm.MaxLength = 25
Me.Txt_Nm.Name = "Txt_Nm"
Me.Txt_Nm.Size = New System.Drawing.Size(160, 20)
Me.Txt_Nm.TabIndex = 2
Me.Txt_Nm.Text = ""
'
'Txt_Id
'
Me.Txt_Id.Enabled = False
Me.Txt_Id.Location = New System.Drawing.Point(128, 24)
Me.Txt_Id.MaxLength = 5
Me.Txt_Id.Name = "Txt_Id"
Me.Txt_Id.Size = New System.Drawing.Size(64, 20)
Me.Txt_Id.TabIndex = 1
Me.Txt_Id.Text = ""
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(112, 152)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(16, 23)
Me.Label10.TabIndex = 12
Me.Label10.Text = ":"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(112, 104)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(16, 23)
Me.Label9.TabIndex = 11
Me.Label9.Text = ":"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(112, 56)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 10
Me.Label8.Text = ":"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(112, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(16, 23)
Me.Label7.TabIndex = 9
Me.Label7.Text = ":"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(112, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 8
Me.Label6.Text = ":"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 152)
Me.Label5.Name = "Label5"
Me.Label5.TabIndex = 6
Me.Label5.Text = "No Telepon"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 104)
Me.Label4.Name = "Label4"
Me.Label4.TabIndex = 5
Me.Label4.Text = "Alamat"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 56)
Me.Label3.Name = "Label3"
Me.Label3.TabIndex = 4
Me.Label3.Text = "Nama advisor"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 24)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 3
Me.Label1.Text = "Id advisor"
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(80, 16)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 13
Me.Label11.Text = "Entry Data Advisor"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListViewadvisor
'
Me.ListViewadvisor.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader3,
Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6})
Me.ListViewadvisor.GridLines = True
Me.ListViewadvisor.Location = New System.Drawing.Point(24,
264)
Me.ListViewadvisor.Name = "ListViewadvisor"
Me.ListViewadvisor.Size = New System.Drawing.Size(440, 160)
Me.ListViewadvisor.TabIndex = 14
Me.ListViewadvisor.View = System.Windows.Forms.View.Details
'
'Advsr
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(480, 499)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.ListViewadvisor)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "Advsr"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btn_kluar.Click
Me.Close()
End Sub
Function tambah()
Dim No As String
SQL = "SELECT MAX(RIGHT(id_advisor,3)) FROM advisor"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Not Reader.Read Then
Txt_Id.Text = "MK001"
Else
No = CInt(Reader.GetString(0)) + 1
If No.Trim.Length = 1 Then Txt_Id.Text = "SA00" & No
If No.Trim.Length = 2 Then Txt_Id.Text = "SA0" & No
If No.Trim.Length = 3 Then Txt_Id.Text = No
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal menambah
data")
Finally
Reader.Close()
End Try
Connect.Close()
Call aktif()
Txt_Id.Enabled = False
Txt_Nm.Focus()
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM advisor"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListViewadvisor.Items.Add("")
ListViewadvisor.Items(ListViewadvisor.Items.Count -
1).SubItems.Add("")
ListViewadvisor.Items(ListViewadvisor.Items.Count -
1).SubItems.Add("")
ListViewadvisor.Items(ListViewadvisor.Items.Count -
1).SubItems.Add("")
ListViewadvisor.Items(ListViewadvisor.Items.Count -
1).SubItems.Add("")

ListViewadvisor.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListViewadvisor.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListViewadvisor.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListViewadvisor.Items(y).SubItems(3).Text =
Reader.GetString(3)

End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function aktif()
Txt_Nm.Enabled = True
Txt_Almt.Enabled = True
Txt_Tlp.Enabled = True
End Function
Function simpan()
SQL = "INSERT INTO advisor VALUES('" & Txt_Id.Text & "','" &
Txt_Nm.Text & "','" & Txt_Almt.Text & "','" & Txt_Tlp.Text & "')"
Try
If Txt_Id.Text = "" Then
MsgBox("Id advisor Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Id.Focus()
Call button()
ElseIf Txt_Nm.Text = "" Then
MsgBox("Nama advisor Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Nm.Focus()
Call button()
ElseIf Txt_Almt.Text = "" Then
MsgBox("Alamat advisor Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Almt.Focus()
Call button()
ElseIf Txt_Tlp.Text = "" Then
MsgBox("Telepon advisor Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Tlp.Focus()
Call button()
Else
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
Else
MsgBox("Data Gagal Disimpan",
MsgBoxStyle.Critical, "Peringatan")
End If
Call bersih()
Call reset()
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
Call validasi()
End Function
Function ubah()
SQL = "UPDATE advisor SET Nm_advisor = '" & Txt_Nm.Text &
"', Alamat = '" & Txt_Almt.Text & "', Tlp='" & Txt_Tlp.Text & "'
WHERE Id_advisor = '" & Txt_Id.Text & "'"
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call validasi()
Call tampil_listview()
Call bersih()
End Function
Function hapus()
SQL = "DELETE FROM advisor WHERE Id_advisor = '" &
Txt_Id.Text & "' "
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
End Function
Function tampil_advisor()
SQL = "SELECT * FROM advisor WHERE Id_advisor= '" &
Txt_Id.Text & "'"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_Id.Text = Reader.GetString(0)
Txt_Nm.Text = Reader.GetString(1)
Txt_Almt.Text = Reader.GetString(2)
Txt_Tlp.Text = Reader.GetString(3)
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Txt_Id.Enabled = False
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function bersih()
Txt_Id.Text = ""
Txt_Almt.Text = ""
Txt_Nm.Text = ""
Txt_Tlp.Text = ""
End Function
Function validasi()
Connect.Close()
While Val(txt_counter.Text)
ListViewadvisor.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While
End Function
Function reset()
Txt_Nm.Focus()
Txt_Id.Enabled = False

Call bersih()
Txt_Almt.Enabled = False
Txt_Nm.Enabled = False
Txt_Tlp.Enabled = False
Btn_btal.Enabled = False
Btn_hpus.Enabled = False
Btn_smpan.Enabled = False
Btn_ubah.Enabled = False
End Function
Function button()
Btn_ubah.Enabled = False
Btn_hpus.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = True
End Function

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


As System.EventArgs) Handles MyBase.Load
Call reset()
Call tampil_listview()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_kluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data advisor")
mToolTip.SetToolTip(Btn_ubah, "Ubah Data advisor")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data advisor")
End Sub

Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_tmbh.Click
Call tambah()
Txt_Nm.Enabled = True
Txt_Almt.Enabled = True
Txt_Tlp.Enabled = True
Btn_btal.Enabled = True
Btn_smpan.Enabled = True
Btn_tmbh.Enabled = False
Btn_hpus.Enabled = False
Btn_ubah.Enabled = False
End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Btn_tmbh.Enabled = True
Btn_smpan.Enabled = False
Call simpan()
Call tampil_listview()
End Sub
Private Sub Btn_hps_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btn_hpus.Click
Call hapus()
Call validasi()
Call reset()
Call tampil_listview()
Btn_tmbh.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_ubah.Click
Call ubah()
Btn_tmbh.Enabled = True
Call reset()
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call bersih()
End Sub

Private Sub Txt_Nm_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Nm.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_Tlp_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Tlp.KeyPress
Call angka(e)
End Sub

Private Sub ListViewadvisor_DoubleClick(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ListViewadvisor.DoubleClick
Txt_Id.Text =
ListViewadvisor.SelectedItems(0).SubItems(0).Text.ToString
Call tampil_advisor()
Txt_Id.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_ubah.Enabled = True
Btn_hpus.Enabled = True
Btn_btal.Enabled = True
Call aktif()
End Sub

End Class

MASTER MEKANIK
Imports MySql.Data.MySqlClient
Public Class mekanik
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Txt_Tlp As System.Windows.Forms.TextBox
Friend WithEvents Txt_Almt As System.Windows.Forms.TextBox
Friend WithEvents Txt_Nm As System.Windows.Forms.TextBox
Friend WithEvents Txt_Id As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader6 As
System.Windows.Forms.ColumnHeader
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_ubah As System.Windows.Forms.Button
Friend WithEvents Btn_hpus As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_kluar As System.Windows.Forms.Button
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents ListViewmekanik As
System.Windows.Forms.ListView
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.Txt_Tlp = New System.Windows.Forms.TextBox
Me.Txt_Almt = New System.Windows.Forms.TextBox
Me.Txt_Nm = New System.Windows.Forms.TextBox
Me.Txt_Id = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.ListViewmekanik = New System.Windows.Forms.ListView
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader6 = New System.Windows.Forms.ColumnHeader
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_kluar = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_hpus = New System.Windows.Forms.Button
Me.Btn_ubah = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.txt_counter)
Me.GroupBox1.Controls.Add(Me.Btn_tmbh)
Me.GroupBox1.Controls.Add(Me.Txt_Tlp)
Me.GroupBox1.Controls.Add(Me.Txt_Almt)
Me.GroupBox1.Controls.Add(Me.Txt_Nm)
Me.GroupBox1.Controls.Add(Me.Txt_Id)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(16, 64)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(440, 192)
Me.GroupBox1.TabIndex = 3
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data mekanik"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(320, 98)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(24, 20)
Me.txt_counter.TabIndex = 31
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 14.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(208, 24)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(48, 23)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "+"
'
'Txt_Tlp
'
Me.Txt_Tlp.Location = New System.Drawing.Point(128, 152)
Me.Txt_Tlp.MaxLength = 12
Me.Txt_Tlp.Name = "Txt_Tlp"
Me.Txt_Tlp.Size = New System.Drawing.Size(120, 20)
Me.Txt_Tlp.TabIndex = 4
Me.Txt_Tlp.Text = ""
'
'Txt_Almt
'
Me.Txt_Almt.AutoSize = False
Me.Txt_Almt.Location = New System.Drawing.Point(128, 88)
Me.Txt_Almt.MaxLength = 50
Me.Txt_Almt.Multiline = True
Me.Txt_Almt.Name = "Txt_Almt"
Me.Txt_Almt.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Almt.Size = New System.Drawing.Size(160, 56)
Me.Txt_Almt.TabIndex = 3
Me.Txt_Almt.Text = ""
'
'Txt_Nm
'
Me.Txt_Nm.Location = New System.Drawing.Point(128, 56)
Me.Txt_Nm.MaxLength = 25
Me.Txt_Nm.Name = "Txt_Nm"
Me.Txt_Nm.Size = New System.Drawing.Size(160, 20)
Me.Txt_Nm.TabIndex = 2
Me.Txt_Nm.Text = ""
'
'Txt_Id
'
Me.Txt_Id.Enabled = False
Me.Txt_Id.Location = New System.Drawing.Point(128, 24)
Me.Txt_Id.MaxLength = 5
Me.Txt_Id.Name = "Txt_Id"
Me.Txt_Id.Size = New System.Drawing.Size(64, 20)
Me.Txt_Id.TabIndex = 1
Me.Txt_Id.Text = ""
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(112, 152)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(16, 23)
Me.Label10.TabIndex = 12
Me.Label10.Text = ":"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(112, 104)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(16, 23)
Me.Label9.TabIndex = 11
Me.Label9.Text = ":"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(112, 56)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 10
Me.Label8.Text = ":"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(112, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(16, 23)
Me.Label7.TabIndex = 9
Me.Label7.Text = ":"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(112, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 8
Me.Label6.Text = ":"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 152)
Me.Label5.Name = "Label5"
Me.Label5.TabIndex = 6
Me.Label5.Text = "No Telepon"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 104)
Me.Label4.Name = "Label4"
Me.Label4.TabIndex = 5
Me.Label4.Text = "Alamat"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(16, 56)
Me.Label3.Name = "Label3"
Me.Label3.TabIndex = 4
Me.Label3.Text = "Nama mekanik"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 24)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 3
Me.Label1.Text = "Id mekanik"
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(72, 16)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 9
Me.Label11.Text = "Entry Data Mekanik"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListViewmekanik
'
Me.ListViewmekanik.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader3,
Me.ColumnHeader4, Me.ColumnHeader5, Me.ColumnHeader6})
Me.ListViewmekanik.GridLines = True
Me.ListViewmekanik.Location = New System.Drawing.Point(16,
264)
Me.ListViewmekanik.Name = "ListViewmekanik"
Me.ListViewmekanik.Size = New System.Drawing.Size(440, 160)
Me.ListViewmekanik.TabIndex = 10
Me.ListViewmekanik.View = System.Windows.Forms.View.Details
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Id mekanik"
Me.ColumnHeader3.Width = 75
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Nama mekanik"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 96
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Alamat"
Me.ColumnHeader5.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader5.Width = 161
'
'ColumnHeader6
'
Me.ColumnHeader6.Text = "Telepon"
Me.ColumnHeader6.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader6.Width = 106
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_kluar)
Me.GroupBox2.Controls.Add(Me.Btn_btal)
Me.GroupBox2.Controls.Add(Me.Btn_hpus)
Me.GroupBox2.Controls.Add(Me.Btn_ubah)
Me.GroupBox2.Controls.Add(Me.Btn_smpan)
Me.GroupBox2.Location = New System.Drawing.Point(8, 432)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(448, 56)
Me.GroupBox2.TabIndex = 11
Me.GroupBox2.TabStop = False
'
'Btn_kluar
'
Me.Btn_kluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_kluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_kluar.Location = New System.Drawing.Point(360, 16)
Me.Btn_kluar.Name = "Btn_kluar"
Me.Btn_kluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_kluar.TabIndex = 9
Me.Btn_kluar.Text = "&Keluar"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(272, 16)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(75, 32)
Me.Btn_btal.TabIndex = 8
Me.Btn_btal.Text = "&Batal"
'
'Btn_hpus
'
Me.Btn_hpus.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_hpus.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_hpus.Location = New System.Drawing.Point(184, 16)
Me.Btn_hpus.Name = "Btn_hpus"
Me.Btn_hpus.Size = New System.Drawing.Size(75, 32)
Me.Btn_hpus.TabIndex = 7
Me.Btn_hpus.Text = "&Hapus"
'
'Btn_ubah
'
Me.Btn_ubah.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_ubah.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubah.Location = New System.Drawing.Point(96, 16)
Me.Btn_ubah.Name = "Btn_ubah"
Me.Btn_ubah.Size = New System.Drawing.Size(75, 32)
Me.Btn_ubah.TabIndex = 6
Me.Btn_ubah.Text = "&Ubah"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(8, 16)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(75, 32)
Me.Btn_smpan.TabIndex = 5
Me.Btn_smpan.Text = "&Simpan"
'
'mekanik
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(464, 507)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.ListViewmekanik)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.GroupBox1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "mekanik"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

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


As System.EventArgs) Handles Btn_kluar.Click
Me.Close()
End Sub
Function tambah()
Dim No As String
SQL = "SELECT MAX(RIGHT(id_mekanik,3)) FROM mekanik"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Not Reader.Read Then
Txt_Id.Text = "MK001"
Else
No = CInt(Reader.GetString(0)) + 1
If No.Trim.Length = 1 Then Txt_Id.Text = "MK00" & No
If No.Trim.Length = 2 Then Txt_Id.Text = "MK0" & No
If No.Trim.Length = 3 Then Txt_Id.Text = No
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal menambah
data")
Finally
Reader.Close()
End Try
Connect.Close()
Call aktif()
Txt_Id.Enabled = False
Txt_Nm.Focus()
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM mekanik"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListViewmekanik.Items.Add("")
ListViewmekanik.Items(ListViewmekanik.Items.Count -
1).SubItems.Add("")
ListViewmekanik.Items(ListViewmekanik.Items.Count -
1).SubItems.Add("")
ListViewmekanik.Items(ListViewmekanik.Items.Count -
1).SubItems.Add("")
ListViewmekanik.Items(ListViewmekanik.Items.Count -
1).SubItems.Add("")

ListViewmekanik.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListViewmekanik.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListViewmekanik.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListViewmekanik.Items(y).SubItems(3).Text =
Reader.GetString(3)

End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function aktif()
Txt_Nm.Enabled = True
Txt_Almt.Enabled = True
Txt_Tlp.Enabled = True
End Function
Function simpan()
SQL = "INSERT INTO mekanik VALUES('" & Txt_Id.Text & "','" &
Txt_Nm.Text & "','" & Txt_Almt.Text & "','" & Txt_Tlp.Text & "')"
Try
If Txt_Id.Text = "" Then
MsgBox("Id mekanik Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Id.Focus()
Call button()
ElseIf Txt_Nm.Text = "" Then
MsgBox("Nama mekanik Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Nm.Focus()
Call button()
ElseIf Txt_Almt.Text = "" Then
MsgBox("Alamat mekanik Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Almt.Focus()
Call button()
ElseIf Txt_Tlp.Text = "" Then
MsgBox("Telepon mekanik Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
Txt_Tlp.Focus()
Call button()
Else
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
Else
MsgBox("Data Gagal Disimpan",
MsgBoxStyle.Critical, "Peringatan")
End If
Call bersih()
Call reset()
End If
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
Call validasi()
End Function
Function ubah()
SQL = "UPDATE mekanik SET Nm_mekanik = '" & Txt_Nm.Text &
"', Alamat = '" & Txt_Almt.Text & "', Tlp='" & Txt_Tlp.Text & "'
WHERE Id_mekanik = '" & Txt_Id.Text & "'"
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
Call validasi()
Call tampil_listview()
Call bersih()
End Function
Function hapus()
SQL = "DELETE FROM mekanik WHERE Id_mekanik = '" &
Txt_Id.Text & "' "
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
MsgBox("Data Telah Dihapus",
MsgBoxStyle.Information, "Informasi")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
End Function
Function tampil_mekanik()
SQL = "SELECT * FROM mekanik WHERE Id_mekanik= '" &
Txt_Id.Text & "'"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_Id.Text = Reader.GetString(0)
Txt_Nm.Text = Reader.GetString(1)
Txt_Almt.Text = Reader.GetString(2)
Txt_Tlp.Text = Reader.GetString(3)
Else
MsgBox("Data Tidak Dapat Ditampilkan",
MsgBoxStyle.Critical, "Informasi")
End If
Txt_Id.Enabled = False
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function
Function bersih()
Txt_Id.Text = ""
Txt_Almt.Text = ""
Txt_Nm.Text = ""
Txt_Tlp.Text = ""
End Function
Function validasi()
Connect.Close()
While Val(txt_counter.Text)
ListViewmekanik.Items(0).Remove()
txt_counter.Text = Val(txt_counter.Text) - 1
End While
End Function
Function reset()
Txt_Nm.Focus()
Txt_Id.Enabled = False

Call bersih()
Txt_Almt.Enabled = False
Txt_Nm.Enabled = False
Txt_Tlp.Enabled = False
Btn_btal.Enabled = False
Btn_hpus.Enabled = False
Btn_smpan.Enabled = False
Btn_ubah.Enabled = False
End Function
Function button()
Btn_ubah.Enabled = False
Btn_hpus.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = True
End Function

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


As System.EventArgs) Handles MyBase.Load
Call reset()
Call tampil_listview()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_kluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data mekanik")
mToolTip.SetToolTip(Btn_ubah, "Ubah Data mekanik")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data mekanik")
End Sub

Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_tmbh.Click
Call tambah()
Txt_Nm.Enabled = True
Txt_Almt.Enabled = True
Txt_Tlp.Enabled = True
Btn_btal.Enabled = True
Btn_smpan.Enabled = True
Btn_tmbh.Enabled = False
Btn_hpus.Enabled = False
Btn_ubah.Enabled = False
End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Btn_tmbh.Enabled = True
Btn_smpan.Enabled = False
Call simpan()
Call tampil_listview()
End Sub
Private Sub Btn_hps_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Btn_hpus.Click
Call hapus()
Call validasi()
Call reset()
Call tampil_listview()
Btn_tmbh.Enabled = True
End Sub

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


As System.EventArgs) Handles Btn_ubah.Click
Call ubah()
Btn_tmbh.Enabled = True
Call reset()
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call bersih()
End Sub

Private Sub Txt_Nm_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Nm.KeyPress
Call huruf(e)
End Sub

Private Sub Txt_Tlp_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Txt_Tlp.KeyPress
Call angka(e)
End Sub

Private Sub ListViewmekanik_DoubleClick(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
ListViewmekanik.DoubleClick
Txt_Id.Text =
ListViewmekanik.SelectedItems(0).SubItems(0).Text.ToString
Call tampil_mekanik()
Txt_Id.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_ubah.Enabled = True
Btn_hpus.Enabled = True
Call aktif()
End Sub
End Class

TRANSAKSI SAF
Imports MySql.Data.MySqlClient
Public Class SAF
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
Friend WithEvents Label22 As System.Windows.Forms.Label
Friend WithEvents Label23 As System.Windows.Forms.Label
Friend WithEvents Label24 As System.Windows.Forms.Label
Friend WithEvents Label28 As System.Windows.Forms.Label
Friend WithEvents Label29 As System.Windows.Forms.Label
Friend WithEvents Label30 As System.Windows.Forms.Label
Friend WithEvents Label25 As System.Windows.Forms.Label
Friend WithEvents Label31 As System.Windows.Forms.Label
Friend WithEvents Txt_JnsMtr As System.Windows.Forms.TextBox
Friend WithEvents Txt_NoSAF As System.Windows.Forms.TextBox
Friend WithEvents Txt_Keluhan As System.Windows.Forms.TextBox
Friend WithEvents Txt_Saran As System.Windows.Forms.TextBox
Friend WithEvents Txt_mekanik As System.Windows.Forms.TextBox
Friend WithEvents Txt_Analisa As System.Windows.Forms.TextBox
Friend WithEvents Cmb_mekanik As System.Windows.Forms.ComboBox
Friend WithEvents txt_Nopol As System.Windows.Forms.TextBox
Friend WithEvents Cmb_advisor As System.Windows.Forms.ComboBox
Friend WithEvents Txt_advisor As System.Windows.Forms.TextBox
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents Btn_HpusSprt As System.Windows.Forms.Button
Friend WithEvents Btn_TmbhSprt As System.Windows.Forms.Button
Friend WithEvents Btn_cariSprt As System.Windows.Forms.Button
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents Label26 As System.Windows.Forms.Label
Friend WithEvents Label27 As System.Windows.Forms.Label
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents Txt_TotBiayaService As
System.Windows.Forms.TextBox
Friend WithEvents Label32 As System.Windows.Forms.Label
Friend WithEvents Label33 As System.Windows.Forms.Label
Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
Friend WithEvents btncetak As System.Windows.Forms.Button
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
Friend WithEvents Label35 As System.Windows.Forms.Label
Friend WithEvents Label36 As System.Windows.Forms.Label
Friend WithEvents Label37 As System.Windows.Forms.Label
Friend WithEvents Label38 As System.Windows.Forms.Label
Friend WithEvents Label39 As System.Windows.Forms.Label
Friend WithEvents Label40 As System.Windows.Forms.Label
Friend WithEvents ColumnHeader6 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader7 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader8 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader9 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader10 As
System.Windows.Forms.ColumnHeader
Friend WithEvents txt_Paket As System.Windows.Forms.TextBox
Friend WithEvents Cmb_KdPaket As System.Windows.Forms.ComboBox
Friend WithEvents txt_NmPaket As System.Windows.Forms.TextBox
Friend WithEvents Txt_KdService As System.Windows.Forms.TextBox
Friend WithEvents Btn_totalBiayaSeluruh As
System.Windows.Forms.Button
Friend WithEvents txt_hrgService As System.Windows.Forms.TextBox
Friend WithEvents txt_NmService As System.Windows.Forms.TextBox
Friend WithEvents Btn_HpusService As System.Windows.Forms.Button
Friend WithEvents Btn_TmbhService As System.Windows.Forms.Button
Friend WithEvents btn_cariService As System.Windows.Forms.Button
Friend WithEvents Txt_HrgSprt As System.Windows.Forms.TextBox
Friend WithEvents Txt_NmSprt As System.Windows.Forms.TextBox
Friend WithEvents txt_KdSprt As System.Windows.Forms.TextBox
Friend WithEvents Txt_jumSprt As System.Windows.Forms.TextBox
Friend WithEvents Txt_JumHrgSprt As System.Windows.Forms.TextBox
Friend WithEvents txt_counter_sprt As
System.Windows.Forms.TextBox
Friend WithEvents txt_tothrgService As
System.Windows.Forms.TextBox
Friend WithEvents txt_tothrgSprt As System.Windows.Forms.TextBox
Friend WithEvents ListViewService As
System.Windows.Forms.ListView
Friend WithEvents ListViewSparepart As
System.Windows.Forms.ListView
Friend WithEvents txt_counter_service As
System.Windows.Forms.TextBox
Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents txt_tgl As System.Windows.Forms.TextBox
Friend WithEvents txt_jam As System.Windows.Forms.TextBox
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents Label34 As System.Windows.Forms.Label
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents Btn_ubh As System.Windows.Forms.Button
Friend WithEvents btn_cariSaf As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(SAF))
Me.Label1 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Label15 = New System.Windows.Forms.Label
Me.Label16 = New System.Windows.Forms.Label
Me.txt_Nopol = New System.Windows.Forms.TextBox
Me.Txt_Keluhan = New System.Windows.Forms.TextBox
Me.Txt_JnsMtr = New System.Windows.Forms.TextBox
Me.txt_Paket = New System.Windows.Forms.TextBox
Me.Txt_NoSAF = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label10 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.Label12 = New System.Windows.Forms.Label
Me.Cmb_KdPaket = New System.Windows.Forms.ComboBox
Me.txt_NmPaket = New System.Windows.Forms.TextBox
Me.btn_cariSaf = New System.Windows.Forms.Button
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.Btn_totalBiayaSeluruh = New System.Windows.Forms.Button
Me.Txt_TotBiayaService = New System.Windows.Forms.TextBox
Me.Label32 = New System.Windows.Forms.Label
Me.Label33 = New System.Windows.Forms.Label
Me.Label25 = New System.Windows.Forms.Label
Me.Label31 = New System.Windows.Forms.Label
Me.Cmb_advisor = New System.Windows.Forms.ComboBox
Me.Cmb_mekanik = New System.Windows.Forms.ComboBox
Me.Txt_Analisa = New System.Windows.Forms.TextBox
Me.Txt_advisor = New System.Windows.Forms.TextBox
Me.Txt_mekanik = New System.Windows.Forms.TextBox
Me.Txt_Saran = New System.Windows.Forms.TextBox
Me.Label30 = New System.Windows.Forms.Label
Me.Label29 = New System.Windows.Forms.Label
Me.Label28 = New System.Windows.Forms.Label
Me.Label23 = New System.Windows.Forms.Label
Me.Label22 = New System.Windows.Forms.Label
Me.Label24 = New System.Windows.Forms.Label
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.txt_counter_service = New System.Windows.Forms.TextBox
Me.txt_tothrgService = New System.Windows.Forms.TextBox
Me.Label19 = New System.Windows.Forms.Label
Me.ListViewService = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.txt_hrgService = New System.Windows.Forms.TextBox
Me.txt_NmService = New System.Windows.Forms.TextBox
Me.Txt_KdService = New System.Windows.Forms.TextBox
Me.Label21 = New System.Windows.Forms.Label
Me.Label26 = New System.Windows.Forms.Label
Me.Label27 = New System.Windows.Forms.Label
Me.btn_cariService = New System.Windows.Forms.Button
Me.Btn_TmbhService = New System.Windows.Forms.Button
Me.Btn_HpusService = New System.Windows.Forms.Button
Me.Btn_HpusSprt = New System.Windows.Forms.Button
Me.Btn_TmbhSprt = New System.Windows.Forms.Button
Me.Btn_cariSprt = New System.Windows.Forms.Button
Me.GroupBox5 = New System.Windows.Forms.GroupBox
Me.btncetak = New System.Windows.Forms.Button
Me.Label14 = New System.Windows.Forms.Label
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.GroupBox4 = New System.Windows.Forms.GroupBox
Me.txt_counter_sprt = New System.Windows.Forms.TextBox
Me.txt_tothrgSprt = New System.Windows.Forms.TextBox
Me.Label35 = New System.Windows.Forms.Label
Me.ListViewSparepart = New System.Windows.Forms.ListView
Me.ColumnHeader6 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader7 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader8 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader9 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader10 = New System.Windows.Forms.ColumnHeader
Me.Txt_HrgSprt = New System.Windows.Forms.TextBox
Me.Txt_NmSprt = New System.Windows.Forms.TextBox
Me.txt_KdSprt = New System.Windows.Forms.TextBox
Me.Label36 = New System.Windows.Forms.Label
Me.Label37 = New System.Windows.Forms.Label
Me.Label38 = New System.Windows.Forms.Label
Me.Label39 = New System.Windows.Forms.Label
Me.Label40 = New System.Windows.Forms.Label
Me.Txt_jumSprt = New System.Windows.Forms.TextBox
Me.Txt_JumHrgSprt = New System.Windows.Forms.TextBox
Me.GroupBox6 = New System.Windows.Forms.GroupBox
Me.Label34 = New System.Windows.Forms.Label
Me.txt_jam = New System.Windows.Forms.TextBox
Me.Label20 = New System.Windows.Forms.Label
Me.txt_tgl = New System.Windows.Forms.TextBox
Me.Label17 = New System.Windows.Forms.Label
Me.Label18 = New System.Windows.Forms.Label
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Btn_ubh = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox3.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.GroupBox5.SuspendLayout()
Me.GroupBox4.SuspendLayout()
Me.GroupBox6.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(352, 6)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(312, 34)
Me.Label1.TabIndex = 9
Me.Label1.Text = "Entry Service Advisor"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Label15)
Me.GroupBox1.Controls.Add(Me.Label16)
Me.GroupBox1.Controls.Add(Me.txt_Nopol)
Me.GroupBox1.Controls.Add(Me.Txt_Keluhan)
Me.GroupBox1.Controls.Add(Me.Txt_JnsMtr)
Me.GroupBox1.Controls.Add(Me.txt_Paket)
Me.GroupBox1.Controls.Add(Me.Txt_NoSAF)
Me.GroupBox1.Controls.Add(Me.Label13)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label11)
Me.GroupBox1.Controls.Add(Me.Label12)
Me.GroupBox1.Controls.Add(Me.Cmb_KdPaket)
Me.GroupBox1.Controls.Add(Me.txt_NmPaket)
Me.GroupBox1.Controls.Add(Me.btn_cariSaf)
Me.GroupBox1.Location = New System.Drawing.Point(8, 56)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(688, 120)
Me.GroupBox1.TabIndex = 10
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data SAF"
'
'Label15
'
Me.Label15.Location = New System.Drawing.Point(248, 56)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(112, 23)
Me.Label15.TabIndex = 18
Me.Label15.Text = "Nama Paket Service"
'
'Label16
'
Me.Label16.Location = New System.Drawing.Point(360, 56)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(16, 23)
Me.Label16.TabIndex = 19
Me.Label16.Text = ":"
'
'txt_Nopol
'
Me.txt_Nopol.Location = New System.Drawing.Point(120, 56)
Me.txt_Nopol.MaxLength = 10
Me.txt_Nopol.Name = "txt_Nopol"
Me.txt_Nopol.Size = New System.Drawing.Size(88, 20)
Me.txt_Nopol.TabIndex = 2
Me.txt_Nopol.Text = ""
'
'Txt_Keluhan
'
Me.Txt_Keluhan.AutoSize = False
Me.Txt_Keluhan.Location = New System.Drawing.Point(568, 24)
Me.Txt_Keluhan.MaxLength = 30
Me.Txt_Keluhan.Multiline = True
Me.Txt_Keluhan.Name = "Txt_Keluhan"
Me.Txt_Keluhan.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Keluhan.Size = New System.Drawing.Size(112, 48)
Me.Txt_Keluhan.TabIndex = 4
Me.Txt_Keluhan.Text = ""
'
'Txt_JnsMtr
'
Me.Txt_JnsMtr.BackColor = System.Drawing.Color.White
Me.Txt_JnsMtr.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_JnsMtr.Enabled = False
Me.Txt_JnsMtr.Location = New System.Drawing.Point(120, 88)
Me.Txt_JnsMtr.MaxLength = 10
Me.Txt_JnsMtr.Name = "Txt_JnsMtr"
Me.Txt_JnsMtr.TabIndex = 4
Me.Txt_JnsMtr.Text = ""
'
'txt_Paket
'
Me.txt_Paket.BackColor = System.Drawing.Color.White
Me.txt_Paket.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_Paket.Enabled = False
Me.txt_Paket.Location = New System.Drawing.Point(384, 88)
Me.txt_Paket.MaxLength = 5
Me.txt_Paket.Name = "txt_Paket"
Me.txt_Paket.Size = New System.Drawing.Size(112, 20)
Me.txt_Paket.TabIndex = 3
Me.txt_Paket.Text = ""
'
'Txt_NoSAF
'
Me.Txt_NoSAF.Location = New System.Drawing.Point(120, 24)
Me.Txt_NoSAF.MaxLength = 7
Me.Txt_NoSAF.Name = "Txt_NoSAF"
Me.Txt_NoSAF.Size = New System.Drawing.Size(64, 20)
Me.Txt_NoSAF.TabIndex = 1
Me.Txt_NoSAF.Text = ""
'
'Label13
'
Me.Label13.Location = New System.Drawing.Point(104, 56)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(16, 23)
Me.Label13.TabIndex = 13
Me.Label13.Text = ":"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(360, 24)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(16, 23)
Me.Label9.TabIndex = 12
Me.Label9.Text = ":"
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 56)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(88, 23)
Me.Label7.TabIndex = 5
Me.Label7.Text = "No. Polisi"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(496, 32)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(56, 23)
Me.Label6.TabIndex = 4
Me.Label6.Text = "Keluhan"
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(16, 88)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(88, 23)
Me.Label5.TabIndex = 3
Me.Label5.Text = "Jenis Motor"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(248, 88)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(112, 23)
Me.Label4.TabIndex = 2
Me.Label4.Text = "Harga Paket Service"
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(248, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(112, 23)
Me.Label3.TabIndex = 1
Me.Label3.Text = "Kode Paket Service"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 24)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(88, 23)
Me.Label2.TabIndex = 0
Me.Label2.Text = "No. SAF"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(104, 24)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 11
Me.Label8.Text = ":"
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(360, 88)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(16, 23)
Me.Label10.TabIndex = 11
Me.Label10.Text = ":"
'
'Label11
'
Me.Label11.Location = New System.Drawing.Point(104, 88)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(16, 23)
Me.Label11.TabIndex = 11
Me.Label11.Text = ":"
'
'Label12
'
Me.Label12.Location = New System.Drawing.Point(552, 32)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(16, 23)
Me.Label12.TabIndex = 11
Me.Label12.Text = ":"
'
'Cmb_KdPaket
'
Me.Cmb_KdPaket.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Cmb_KdPaket.Items.AddRange(New Object() {"<-Pilih->"})
Me.Cmb_KdPaket.Location = New System.Drawing.Point(384, 24)
Me.Cmb_KdPaket.Name = "Cmb_KdPaket"
Me.Cmb_KdPaket.Size = New System.Drawing.Size(88, 21)
Me.Cmb_KdPaket.TabIndex = 3
'
'txt_NmPaket
'
Me.txt_NmPaket.BackColor = System.Drawing.Color.White
Me.txt_NmPaket.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_NmPaket.Enabled = False
Me.txt_NmPaket.Location = New System.Drawing.Point(384, 56)
Me.txt_NmPaket.MaxLength = 25
Me.txt_NmPaket.Name = "txt_NmPaket"
Me.txt_NmPaket.Size = New System.Drawing.Size(112, 20)
Me.txt_NmPaket.TabIndex = 39
Me.txt_NmPaket.Text = ""
'
'btn_cariSaf
'
Me.btn_cariSaf.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_cariSaf.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_cariSaf.Location = New System.Drawing.Point(568, 80)
Me.btn_cariSaf.Name = "btn_cariSaf"
Me.btn_cariSaf.Size = New System.Drawing.Size(56, 32)
Me.btn_cariSaf.TabIndex = 44
Me.btn_cariSaf.Text = "Cari"
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Btn_totalBiayaSeluruh)
Me.GroupBox3.Controls.Add(Me.Txt_TotBiayaService)
Me.GroupBox3.Controls.Add(Me.Label32)
Me.GroupBox3.Controls.Add(Me.Label33)
Me.GroupBox3.Controls.Add(Me.Label25)
Me.GroupBox3.Controls.Add(Me.Label31)
Me.GroupBox3.Controls.Add(Me.Cmb_advisor)
Me.GroupBox3.Controls.Add(Me.Cmb_mekanik)
Me.GroupBox3.Controls.Add(Me.Txt_Analisa)
Me.GroupBox3.Controls.Add(Me.Txt_advisor)
Me.GroupBox3.Controls.Add(Me.Txt_mekanik)
Me.GroupBox3.Controls.Add(Me.Txt_Saran)
Me.GroupBox3.Controls.Add(Me.Label30)
Me.GroupBox3.Controls.Add(Me.Label29)
Me.GroupBox3.Controls.Add(Me.Label28)
Me.GroupBox3.Controls.Add(Me.Label23)
Me.GroupBox3.Controls.Add(Me.Label22)
Me.GroupBox3.Controls.Add(Me.Label24)
Me.GroupBox3.Location = New System.Drawing.Point(712, 152)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(272, 296)
Me.GroupBox3.TabIndex = 12
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "Keterangan"
'
'Btn_totalBiayaSeluruh
'
Me.Btn_totalBiayaSeluruh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_totalBiayaSeluruh.Font = New
System.Drawing.Font("Microsoft Sans Serif", 9.75!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
CType(0, Byte))
Me.Btn_totalBiayaSeluruh.Location = New
System.Drawing.Point(80, 208)
Me.Btn_totalBiayaSeluruh.Name = "Btn_totalBiayaSeluruh"
Me.Btn_totalBiayaSeluruh.Size = New System.Drawing.Size(112,
40)
Me.Btn_totalBiayaSeluruh.TabIndex = 42
Me.Btn_totalBiayaSeluruh.Text = "Hitung Total Biaya Seluruh"
'
'Txt_TotBiayaService
'
Me.Txt_TotBiayaService.BackColor =
System.Drawing.Color.White
Me.Txt_TotBiayaService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_TotBiayaService.Enabled = False
Me.Txt_TotBiayaService.Location = New
System.Drawing.Point(136, 264)
Me.Txt_TotBiayaService.MaxLength = 6
Me.Txt_TotBiayaService.Name = "Txt_TotBiayaService"
Me.Txt_TotBiayaService.Size = New System.Drawing.Size(120,
20)
Me.Txt_TotBiayaService.TabIndex = 39
Me.Txt_TotBiayaService.Text = ""
'
'Label32
'
Me.Label32.Location = New System.Drawing.Point(120, 264)
Me.Label32.Name = "Label32"
Me.Label32.Size = New System.Drawing.Size(16, 23)
Me.Label32.TabIndex = 41
Me.Label32.Text = ":"
'
'Label33
'
Me.Label33.Location = New System.Drawing.Point(16, 264)
Me.Label33.Name = "Label33"
Me.Label33.Size = New System.Drawing.Size(104, 23)
Me.Label33.TabIndex = 40
Me.Label33.Text = "Total Biaya Service"
'
'Label25
'
Me.Label25.Location = New System.Drawing.Point(64, 32)
Me.Label25.Name = "Label25"
Me.Label25.Size = New System.Drawing.Size(16, 23)
Me.Label25.TabIndex = 37
Me.Label25.Text = ":"
'
'Label31
'
Me.Label31.Location = New System.Drawing.Point(16, 32)
Me.Label31.Name = "Label31"
Me.Label31.Size = New System.Drawing.Size(56, 23)
Me.Label31.TabIndex = 36
Me.Label31.Text = "Analisa"
'
'Cmb_advisor
'
Me.Cmb_advisor.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Cmb_advisor.Items.AddRange(New Object() {"< pilih >"})
Me.Cmb_advisor.Location = New System.Drawing.Point(86, 168)
Me.Cmb_advisor.Name = "Cmb_advisor"
Me.Cmb_advisor.Size = New System.Drawing.Size(72, 21)
Me.Cmb_advisor.TabIndex = 13
'
'Cmb_mekanik
'
Me.Cmb_mekanik.DropDownStyle =
System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Cmb_mekanik.Items.AddRange(New Object() {"< pilih >"})
Me.Cmb_mekanik.Location = New System.Drawing.Point(86, 136)
Me.Cmb_mekanik.Name = "Cmb_mekanik"
Me.Cmb_mekanik.Size = New System.Drawing.Size(72, 21)
Me.Cmb_mekanik.TabIndex = 12
'
'Txt_Analisa
'
Me.Txt_Analisa.AutoSize = False
Me.Txt_Analisa.Location = New System.Drawing.Point(88, 16)
Me.Txt_Analisa.MaxLength = 30
Me.Txt_Analisa.Multiline = True
Me.Txt_Analisa.Name = "Txt_Analisa"
Me.Txt_Analisa.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Analisa.Size = New System.Drawing.Size(152, 48)
Me.Txt_Analisa.TabIndex = 14
Me.Txt_Analisa.Text = ""
'
'Txt_advisor
'
Me.Txt_advisor.BackColor = System.Drawing.Color.White
Me.Txt_advisor.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_advisor.Enabled = False
Me.Txt_advisor.Location = New System.Drawing.Point(166, 168)
Me.Txt_advisor.Name = "Txt_advisor"
Me.Txt_advisor.Size = New System.Drawing.Size(80, 20)
Me.Txt_advisor.TabIndex = 27
Me.Txt_advisor.Text = ""
'
'Txt_mekanik
'
Me.Txt_mekanik.BackColor = System.Drawing.Color.White
Me.Txt_mekanik.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_mekanik.Enabled = False
Me.Txt_mekanik.Location = New System.Drawing.Point(166, 136)
Me.Txt_mekanik.Name = "Txt_mekanik"
Me.Txt_mekanik.Size = New System.Drawing.Size(80, 20)
Me.Txt_mekanik.TabIndex = 25
Me.Txt_mekanik.Text = ""
'
'Txt_Saran
'
Me.Txt_Saran.AutoSize = False
Me.Txt_Saran.Location = New System.Drawing.Point(88, 80)
Me.Txt_Saran.MaxLength = 30
Me.Txt_Saran.Multiline = True
Me.Txt_Saran.Name = "Txt_Saran"
Me.Txt_Saran.ScrollBars =
System.Windows.Forms.ScrollBars.Vertical
Me.Txt_Saran.Size = New System.Drawing.Size(152, 48)
Me.Txt_Saran.TabIndex = 15
Me.Txt_Saran.Text = ""
'
'Label30
'
Me.Label30.Location = New System.Drawing.Point(66, 168)
Me.Label30.Name = "Label30"
Me.Label30.Size = New System.Drawing.Size(8, 23)
Me.Label30.TabIndex = 24
Me.Label30.Text = ":"
'
'Label29
'
Me.Label29.Location = New System.Drawing.Point(66, 136)
Me.Label29.Name = "Label29"
Me.Label29.Size = New System.Drawing.Size(8, 23)
Me.Label29.TabIndex = 23
Me.Label29.Text = ":"
'
'Label28
'
Me.Label28.Location = New System.Drawing.Point(64, 88)
Me.Label28.Name = "Label28"
Me.Label28.Size = New System.Drawing.Size(16, 23)
Me.Label28.TabIndex = 22
Me.Label28.Text = ":"
'
'Label23
'
Me.Label23.Location = New System.Drawing.Point(10, 136)
Me.Label23.Name = "Label23"
Me.Label23.Size = New System.Drawing.Size(56, 23)
Me.Label23.TabIndex = 3
Me.Label23.Text = "Mekanik"
'
'Label22
'
Me.Label22.Location = New System.Drawing.Point(16, 88)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(56, 23)
Me.Label22.TabIndex = 2
Me.Label22.Text = "Saran"
'
'Label24
'
Me.Label24.Location = New System.Drawing.Point(10, 168)
Me.Label24.Name = "Label24"
Me.Label24.Size = New System.Drawing.Size(56, 23)
Me.Label24.TabIndex = 19
Me.Label24.Text = "Advisor"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.txt_counter_service)
Me.GroupBox2.Controls.Add(Me.txt_tothrgService)
Me.GroupBox2.Controls.Add(Me.Label19)
Me.GroupBox2.Controls.Add(Me.ListViewService)
Me.GroupBox2.Controls.Add(Me.txt_hrgService)
Me.GroupBox2.Controls.Add(Me.txt_NmService)
Me.GroupBox2.Controls.Add(Me.Txt_KdService)
Me.GroupBox2.Controls.Add(Me.Label21)
Me.GroupBox2.Controls.Add(Me.Label26)
Me.GroupBox2.Controls.Add(Me.Label27)
Me.GroupBox2.Controls.Add(Me.btn_cariService)
Me.GroupBox2.Controls.Add(Me.Btn_TmbhService)
Me.GroupBox2.Controls.Add(Me.Btn_HpusService)
Me.GroupBox2.Location = New System.Drawing.Point(8, 184)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(688, 192)
Me.GroupBox2.TabIndex = 44
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Service Lain-Lain"
'
'txt_counter_service
'
Me.txt_counter_service.Location = New
System.Drawing.Point(600, 104)
Me.txt_counter_service.Name = "txt_counter_service"
Me.txt_counter_service.Size = New System.Drawing.Size(32,
20)
Me.txt_counter_service.TabIndex = 43
Me.txt_counter_service.Text = ""
Me.txt_counter_service.Visible = False
'
'txt_tothrgService
'
Me.txt_tothrgService.BackColor = System.Drawing.Color.White
Me.txt_tothrgService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_tothrgService.Enabled = False
Me.txt_tothrgService.Location = New
System.Drawing.Point(552, 154)
Me.txt_tothrgService.MaxLength = 10
Me.txt_tothrgService.Name = "txt_tothrgService"
Me.txt_tothrgService.Size = New System.Drawing.Size(128, 20)
Me.txt_tothrgService.TabIndex = 39
Me.txt_tothrgService.Text = ""
'
'Label19
'
Me.Label19.Location = New System.Drawing.Point(424, 154)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(120, 23)
Me.Label19.TabIndex = 17
Me.Label19.Text = "Total Harga Service :"
'
'ListViewService
'
Me.ListViewService.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader3})
Me.ListViewService.GridLines = True
Me.ListViewService.Location = New System.Drawing.Point(16,
80)
Me.ListViewService.Name = "ListViewService"
Me.ListViewService.Size = New System.Drawing.Size(400, 96)
Me.ListViewService.TabIndex = 15
Me.ListViewService.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Kd Service"
Me.ColumnHeader1.Width = 77
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Nama Service"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 169
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Harga Service Lain"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 149
'
'txt_hrgService
'
Me.txt_hrgService.AutoSize = False
Me.txt_hrgService.BackColor = System.Drawing.Color.White
Me.txt_hrgService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_hrgService.Enabled = False
Me.txt_hrgService.Location = New System.Drawing.Point(271,
48)
Me.txt_hrgService.MaxLength = 6
Me.txt_hrgService.Name = "txt_hrgService"
Me.txt_hrgService.Size = New System.Drawing.Size(129, 20)
Me.txt_hrgService.TabIndex = 12
Me.txt_hrgService.Text = ""
'
'txt_NmService
'
Me.txt_NmService.AutoSize = False
Me.txt_NmService.BackColor = System.Drawing.Color.White
Me.txt_NmService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_NmService.Enabled = False
Me.txt_NmService.Location = New System.Drawing.Point(104,
48)
Me.txt_NmService.MaxLength = 25
Me.txt_NmService.Name = "txt_NmService"
Me.txt_NmService.Size = New System.Drawing.Size(152, 20)
Me.txt_NmService.TabIndex = 11
Me.txt_NmService.Text = ""
'
'Txt_KdService
'
Me.Txt_KdService.AutoSize = False
Me.Txt_KdService.BackColor = System.Drawing.Color.White
Me.Txt_KdService.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_KdService.Enabled = False
Me.Txt_KdService.Location = New System.Drawing.Point(19, 48)
Me.Txt_KdService.MaxLength = 11
Me.Txt_KdService.Name = "Txt_KdService"
Me.Txt_KdService.Size = New System.Drawing.Size(72, 20)
Me.Txt_KdService.TabIndex = 10
Me.Txt_KdService.Text = ""
'
'Label21
'
Me.Label21.Location = New System.Drawing.Point(296, 24)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(88, 23)
Me.Label21.TabIndex = 2
Me.Label21.Text = "Harga Service"
'
'Label26
'
Me.Label26.Location = New System.Drawing.Point(136, 24)
Me.Label26.Name = "Label26"
Me.Label26.Size = New System.Drawing.Size(88, 23)
Me.Label26.TabIndex = 1
Me.Label26.Text = "Nama Service"
'
'Label27
'
Me.Label27.Location = New System.Drawing.Point(16, 24)
Me.Label27.Name = "Label27"
Me.Label27.Size = New System.Drawing.Size(88, 23)
Me.Label27.TabIndex = 0
Me.Label27.Text = "Kode Service"
'
'btn_cariService
'
Me.btn_cariService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_cariService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_cariService.Location = New System.Drawing.Point(456,
32)
Me.btn_cariService.Name = "btn_cariService"
Me.btn_cariService.Size = New System.Drawing.Size(56, 32)
Me.btn_cariService.TabIndex = 6
Me.btn_cariService.Text = "Cari"
'
'Btn_TmbhService
'
Me.Btn_TmbhService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_TmbhService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_TmbhService.Location = New System.Drawing.Point(536,
32)
Me.Btn_TmbhService.Name = "Btn_TmbhService"
Me.Btn_TmbhService.Size = New System.Drawing.Size(56, 32)
Me.Btn_TmbhService.TabIndex = 8
Me.Btn_TmbhService.Text = "+"
'
'Btn_HpusService
'
Me.Btn_HpusService.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_HpusService.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_HpusService.Location = New System.Drawing.Point(488,
80)
Me.Btn_HpusService.Name = "Btn_HpusService"
Me.Btn_HpusService.Size = New System.Drawing.Size(56, 32)
Me.Btn_HpusService.TabIndex = 9
Me.Btn_HpusService.Text = "Hapus"
'
'Btn_HpusSprt
'
Me.Btn_HpusSprt.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_HpusSprt.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_HpusSprt.Location = New System.Drawing.Point(608,
112)
Me.Btn_HpusSprt.Name = "Btn_HpusSprt"
Me.Btn_HpusSprt.Size = New System.Drawing.Size(56, 32)
Me.Btn_HpusSprt.TabIndex = 9
Me.Btn_HpusSprt.Text = "Hapus"
'
'Btn_TmbhSprt
'
Me.Btn_TmbhSprt.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_TmbhSprt.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_TmbhSprt.Location = New System.Drawing.Point(608, 72)
Me.Btn_TmbhSprt.Name = "Btn_TmbhSprt"
Me.Btn_TmbhSprt.Size = New System.Drawing.Size(56, 32)
Me.Btn_TmbhSprt.TabIndex = 8
Me.Btn_TmbhSprt.Text = "+"
'
'Btn_cariSprt
'
Me.Btn_cariSprt.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_cariSprt.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_cariSprt.Location = New System.Drawing.Point(608, 32)
Me.Btn_cariSprt.Name = "Btn_cariSprt"
Me.Btn_cariSprt.Size = New System.Drawing.Size(56, 32)
Me.Btn_cariSprt.TabIndex = 6
Me.Btn_cariSprt.Text = "Cari"
'
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.btncetak)
Me.GroupBox5.Controls.Add(Me.Label14)
Me.GroupBox5.Controls.Add(Me.Btn_Keluar)
Me.GroupBox5.Controls.Add(Me.Btn_smpan)
Me.GroupBox5.Controls.Add(Me.Btn_btal)
Me.GroupBox5.Controls.Add(Me.Btn_tmbh)
Me.GroupBox5.Controls.Add(Me.Btn_ubh)
Me.GroupBox5.Location = New System.Drawing.Point(712, 456)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(272, 152)
Me.GroupBox5.TabIndex = 45
Me.GroupBox5.TabStop = False
'
'btncetak
'
Me.btncetak.Font = New System.Drawing.Font("Arial", 12.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
CType(0, Byte))
Me.btncetak.Image =
CType(resources.GetObject("btncetak.Image"), System.Drawing.Image)
Me.btncetak.ImageAlign =
System.Drawing.ContentAlignment.TopCenter
Me.btncetak.Location = New System.Drawing.Point(216, 48)
Me.btncetak.Name = "btncetak"
Me.btncetak.Size = New System.Drawing.Size(48, 56)
Me.btncetak.TabIndex = 43
Me.btncetak.TextAlign =
System.Drawing.ContentAlignment.BottomCenter
'
'Label14
'
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label14.ImageAlign =
System.Drawing.ContentAlignment.MiddleLeft
Me.Label14.Location = New System.Drawing.Point(216, 24)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(48, 16)
Me.Label14.TabIndex = 44
Me.Label14.Text = "CETAK"
Me.Label14.TextAlign =
System.Drawing.ContentAlignment.MiddleLeft
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(64, 112)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(88, 32)
Me.Btn_Keluar.TabIndex = 18
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(112, 24)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(88, 32)
Me.Btn_smpan.TabIndex = 16
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(112, 66)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(88, 32)
Me.Btn_btal.TabIndex = 17
Me.Btn_btal.Text = "&Batal"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(8, 24)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(88, 32)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "&Tambah"
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.txt_counter_sprt)
Me.GroupBox4.Controls.Add(Me.txt_tothrgSprt)
Me.GroupBox4.Controls.Add(Me.Label35)
Me.GroupBox4.Controls.Add(Me.ListViewSparepart)
Me.GroupBox4.Controls.Add(Me.Txt_HrgSprt)
Me.GroupBox4.Controls.Add(Me.Txt_NmSprt)
Me.GroupBox4.Controls.Add(Me.txt_KdSprt)
Me.GroupBox4.Controls.Add(Me.Label36)
Me.GroupBox4.Controls.Add(Me.Label37)
Me.GroupBox4.Controls.Add(Me.Label38)
Me.GroupBox4.Controls.Add(Me.Label39)
Me.GroupBox4.Controls.Add(Me.Label40)
Me.GroupBox4.Controls.Add(Me.Txt_jumSprt)
Me.GroupBox4.Controls.Add(Me.Txt_JumHrgSprt)
Me.GroupBox4.Controls.Add(Me.Btn_cariSprt)
Me.GroupBox4.Controls.Add(Me.Btn_TmbhSprt)
Me.GroupBox4.Controls.Add(Me.Btn_HpusSprt)
Me.GroupBox4.Location = New System.Drawing.Point(8, 384)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(688, 224)
Me.GroupBox4.TabIndex = 46
Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "Sparepart yang Diperlukan"
'
'txt_counter_sprt
'
Me.txt_counter_sprt.Location = New System.Drawing.Point(584,
160)
Me.txt_counter_sprt.Name = "txt_counter_sprt"
Me.txt_counter_sprt.Size = New System.Drawing.Size(32, 20)
Me.txt_counter_sprt.TabIndex = 42
Me.txt_counter_sprt.Text = ""
Me.txt_counter_sprt.Visible = False
'
'txt_tothrgSprt
'
Me.txt_tothrgSprt.BackColor = System.Drawing.Color.White
Me.txt_tothrgSprt.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_tothrgSprt.Enabled = False
Me.txt_tothrgSprt.Location = New System.Drawing.Point(440,
192)
Me.txt_tothrgSprt.MaxLength = 10
Me.txt_tothrgSprt.Name = "txt_tothrgSprt"
Me.txt_tothrgSprt.Size = New System.Drawing.Size(128, 20)
Me.txt_tothrgSprt.TabIndex = 39
Me.txt_tothrgSprt.Text = ""
'
'Label35
'
Me.Label35.Location = New System.Drawing.Point(304, 192)
Me.Label35.Name = "Label35"
Me.Label35.Size = New System.Drawing.Size(128, 23)
Me.Label35.TabIndex = 17
Me.Label35.Text = "Total Harga Sparepart :"
'
'ListViewSparepart
'
Me.ListViewSparepart.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader6,
Me.ColumnHeader7, Me.ColumnHeader8, Me.ColumnHeader9,
Me.ColumnHeader10})
Me.ListViewSparepart.GridLines = True
Me.ListViewSparepart.Location = New System.Drawing.Point(16,
80)
Me.ListViewSparepart.Name = "ListViewSparepart"
Me.ListViewSparepart.Size = New System.Drawing.Size(552, 96)
Me.ListViewSparepart.TabIndex = 15
Me.ListViewSparepart.View =
System.Windows.Forms.View.Details
'
'ColumnHeader6
'
Me.ColumnHeader6.Text = "Kd Sparepart"
Me.ColumnHeader6.Width = 77
'
'ColumnHeader7
'
Me.ColumnHeader7.Text = "Nama Sparepart"
Me.ColumnHeader7.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader7.Width = 161
'
'ColumnHeader8
'
Me.ColumnHeader8.Text = "Harga"
Me.ColumnHeader8.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader8.Width = 117
'
'ColumnHeader9
'
Me.ColumnHeader9.Text = "Jumlah"
Me.ColumnHeader9.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader9.Width = 59
'
'ColumnHeader10
'
Me.ColumnHeader10.Text = "Jumlah Harga"
Me.ColumnHeader10.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader10.Width = 134
'
'Txt_HrgSprt
'
Me.Txt_HrgSprt.AutoSize = False
Me.Txt_HrgSprt.BackColor = System.Drawing.Color.White
Me.Txt_HrgSprt.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_HrgSprt.Enabled = False
Me.Txt_HrgSprt.Location = New System.Drawing.Point(271, 48)
Me.Txt_HrgSprt.MaxLength = 6
Me.Txt_HrgSprt.Name = "Txt_HrgSprt"
Me.Txt_HrgSprt.Size = New System.Drawing.Size(96, 20)
Me.Txt_HrgSprt.TabIndex = 12
Me.Txt_HrgSprt.Text = ""
'
'Txt_NmSprt
'
Me.Txt_NmSprt.AutoSize = False
Me.Txt_NmSprt.BackColor = System.Drawing.Color.White
Me.Txt_NmSprt.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_NmSprt.Enabled = False
Me.Txt_NmSprt.Location = New System.Drawing.Point(104, 48)
Me.Txt_NmSprt.MaxLength = 25
Me.Txt_NmSprt.Name = "Txt_NmSprt"
Me.Txt_NmSprt.Size = New System.Drawing.Size(152, 20)
Me.Txt_NmSprt.TabIndex = 11
Me.Txt_NmSprt.Text = ""
'
'txt_KdSprt
'
Me.txt_KdSprt.AutoSize = False
Me.txt_KdSprt.BackColor = System.Drawing.Color.White
Me.txt_KdSprt.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_KdSprt.Enabled = False
Me.txt_KdSprt.Location = New System.Drawing.Point(19, 48)
Me.txt_KdSprt.MaxLength = 11
Me.txt_KdSprt.Name = "txt_KdSprt"
Me.txt_KdSprt.Size = New System.Drawing.Size(72, 20)
Me.txt_KdSprt.TabIndex = 10
Me.txt_KdSprt.Text = ""
'
'Label36
'
Me.Label36.Location = New System.Drawing.Point(464, 24)
Me.Label36.Name = "Label36"
Me.Label36.Size = New System.Drawing.Size(88, 23)
Me.Label36.TabIndex = 4
Me.Label36.Text = "Jumlah Harga"
'
'Label37
'
Me.Label37.Location = New System.Drawing.Point(384, 24)
Me.Label37.Name = "Label37"
Me.Label37.Size = New System.Drawing.Size(48, 23)
Me.Label37.TabIndex = 3
Me.Label37.Text = "Jumlah"
'
'Label38
'
Me.Label38.Location = New System.Drawing.Point(304, 24)
Me.Label38.Name = "Label38"
Me.Label38.Size = New System.Drawing.Size(40, 23)
Me.Label38.TabIndex = 2
Me.Label38.Text = "Harga"
'
'Label39
'
Me.Label39.Location = New System.Drawing.Point(136, 24)
Me.Label39.Name = "Label39"
Me.Label39.Size = New System.Drawing.Size(88, 23)
Me.Label39.TabIndex = 1
Me.Label39.Text = "Nama Sparepart"
'
'Label40
'
Me.Label40.Location = New System.Drawing.Point(16, 24)
Me.Label40.Name = "Label40"
Me.Label40.Size = New System.Drawing.Size(88, 23)
Me.Label40.TabIndex = 0
Me.Label40.Text = "Kode Sparepart"
'
'Txt_jumSprt
'
Me.Txt_jumSprt.Location = New System.Drawing.Point(383, 48)
Me.Txt_jumSprt.MaxLength = 2
Me.Txt_jumSprt.Name = "Txt_jumSprt"
Me.Txt_jumSprt.Size = New System.Drawing.Size(49, 20)
Me.Txt_jumSprt.TabIndex = 7
Me.Txt_jumSprt.Text = ""
'
'Txt_JumHrgSprt
'
Me.Txt_JumHrgSprt.BackColor = System.Drawing.Color.White
Me.Txt_JumHrgSprt.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_JumHrgSprt.Enabled = False
Me.Txt_JumHrgSprt.Location = New System.Drawing.Point(448,
48)
Me.Txt_JumHrgSprt.MaxLength = 7
Me.Txt_JumHrgSprt.Name = "Txt_JumHrgSprt"
Me.Txt_JumHrgSprt.Size = New System.Drawing.Size(120, 20)
Me.Txt_JumHrgSprt.TabIndex = 14
Me.Txt_JumHrgSprt.Text = ""
'
'GroupBox6
'
Me.GroupBox6.Controls.Add(Me.Label34)
Me.GroupBox6.Controls.Add(Me.txt_jam)
Me.GroupBox6.Controls.Add(Me.Label20)
Me.GroupBox6.Controls.Add(Me.txt_tgl)
Me.GroupBox6.Controls.Add(Me.Label17)
Me.GroupBox6.Controls.Add(Me.Label18)
Me.GroupBox6.Location = New System.Drawing.Point(712, 56)
Me.GroupBox6.Name = "GroupBox6"
Me.GroupBox6.Size = New System.Drawing.Size(272, 88)
Me.GroupBox6.TabIndex = 47
Me.GroupBox6.TabStop = False
Me.GroupBox6.Text = "Waktu"
'
'Label34
'
Me.Label34.Location = New System.Drawing.Point(104, 56)
Me.Label34.Name = "Label34"
Me.Label34.Size = New System.Drawing.Size(16, 23)
Me.Label34.TabIndex = 44
Me.Label34.Text = ":"
'
'txt_jam
'
Me.txt_jam.BackColor = System.Drawing.Color.White
Me.txt_jam.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_jam.Enabled = False
Me.txt_jam.Location = New System.Drawing.Point(120, 56)
Me.txt_jam.MaxLength = 10
Me.txt_jam.Name = "txt_jam"
Me.txt_jam.TabIndex = 43
Me.txt_jam.Text = ""
'
'Label20
'
Me.Label20.Location = New System.Drawing.Point(24, 56)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(72, 23)
Me.Label20.TabIndex = 42
Me.Label20.Text = "Jam"
'
'txt_tgl
'
Me.txt_tgl.BackColor = System.Drawing.Color.White
Me.txt_tgl.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_tgl.Enabled = False
Me.txt_tgl.Location = New System.Drawing.Point(120, 24)
Me.txt_tgl.MaxLength = 10
Me.txt_tgl.Name = "txt_tgl"
Me.txt_tgl.Size = New System.Drawing.Size(136, 20)
Me.txt_tgl.TabIndex = 41
Me.txt_tgl.Text = ""
'
'Label17
'
Me.Label17.Location = New System.Drawing.Point(24, 24)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(72, 23)
Me.Label17.TabIndex = 40
Me.Label17.Text = "Tanggal"
'
'Label18
'
Me.Label18.Location = New System.Drawing.Point(104, 24)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(16, 23)
Me.Label18.TabIndex = 40
Me.Label18.Text = ":"
'
'Timer1
'
'
'Btn_ubh
'
Me.Btn_ubh.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_ubh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_ubh.Location = New System.Drawing.Point(8, 66)
Me.Btn_ubh.Name = "Btn_ubh"
Me.Btn_ubh.Size = New System.Drawing.Size(88, 32)
Me.Btn_ubh.TabIndex = 48
Me.Btn_ubh.Text = "&Ubah"
'
'SAF
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(994, 624)
Me.Controls.Add(Me.GroupBox6)
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.GroupBox5)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.GroupBox2)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "SAF"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox4.ResumeLayout(False)
Me.GroupBox6.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Function list_data_paket()

SQL = "SELECT Kd_paket FROM paket_service"


If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
Cmb_KdPaket.Items.Add(Reader.GetString(0))
End While
Catch ex As Exception
Finally
Reader.Close()
End Try
Connect.Close()

End Function

Function tampil_data_paket()

SQL = "SELECT Nm_paket, Hrg_paket FROM paket_service WHERE


Kd_paket='" & Cmb_KdPaket.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
txt_NmPaket.Text = Reader.GetString(0)
txt_Paket.Text = Reader.GetString(1)
Reader.Close()
'Me.detil_paket_service()
End If

Catch ex As Exception
MsgBox(ex.Message.ToString)
Finally
Reader.Close()
End Try
Connect.Close()

End Function
Function detil_paket_service()
Dim x As String
SQL = "select punya.kd_service, service.nm_service FROM
punya " & _
"inner join service on service.kd_service =
punya.kd_service " & _
"inner join paket_service on paket_service.kd_paket
= punya.kd_paket " & _
"where paket_service.kd_paket = '" &
Cmb_KdPaket.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
x = x & Reader.GetString(1)
MsgBox(x)
End If
End Function
Function list_data_mekanik()

SQL = "SELECT id_mekanik FROM mekanik "


If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
Cmb_mekanik.Items.Add(Reader.GetString(0))
End While
Catch ex As Exception
Finally
Reader.Close()
End Try
Connect.Close()

End Function

Function tampil_data_mekanik()

SQL = "SELECT Nm_mekanik FROM mekanik WHERE id_mekanik ='" &


Cmb_mekanik.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
Txt_mekanik.Text = Reader.GetString(0)
End If
Catch ex As Exception
MsgBox(ex.Message.ToString)
Finally
Reader.Close()
End Try
Connect.Close()

End Function

Function list_data_advisor()

SQL = "SELECT id_advisor FROM advisor"


If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
Cmb_advisor.Items.Add(Reader.GetString(0))
End While
Catch ex As Exception
Finally
Reader.Close()
End Try
Connect.Close()

End Function

Function tampil_data_advisor()

SQL = "SELECT Nm_advisor FROM advisor WHERE id_advisor ='" &


Cmb_advisor.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read Then
Txt_advisor.Text = Reader.GetString(0)
End If
Catch ex As Exception
MsgBox(ex.Message.ToString)
Finally
Reader.Close()
End Try
Connect.Close()

End Function

Function tambah_kdSAF()

Dim No As String
SQL = "SELECT MAX(RIGHT(No_Saf,5)) FROM saf"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Not Reader.Read Then
Txt_NoSAF.Text = "SF00001"
Else
No = CInt(Reader.GetString(0)) + 1
If No.Trim.Length = 1 Then Txt_NoSAF.Text = "SF0000"
& No
If No.Trim.Length = 2 Then Txt_NoSAF.Text = "SF000"
& No
If No.Trim.Length = 3 Then Txt_NoSAF.Text = "SF00" &
No
If No.Trim.Length = 4 Then Txt_NoSAF.Text = "SF0" &
No
If No.Trim.Length = 5 Then Txt_NoSAF.Text = No
Call aktif()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal menambah
data")
Finally
Reader.Close()
End Try
Connect.Close()

Txt_NoSAF.Enabled = False
txt_Nopol.Focus()

End Function
Function utkcari_service()

Dim form As New CariService


form.ShowDialog()
Txt_KdService.Text = form.kode
If Txt_KdService.Text <> "" Then
Me.tampilkan_service()
Btn_TmbhService.Enabled = True
btn_cariService.Enabled = False
End If

End Function

Function tampilkan_service()

SQL = "SELECT * FROM service WHERE Kd_service= '" &


Txt_KdService.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_KdService.Text = Reader.GetString(0)
txt_NmService.Text = Reader.GetString(1)
txt_hrgService.Text = Reader.GetString(2)

Btn_TmbhService.Enabled = True
Btn_TmbhService.Focus()
btn_cariService.Enabled = False

End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()

End Function
Function utkcari_sparepart()

Dim form As New CariSparePart


form.ShowDialog()
txt_KdSprt.Text = form.kode
If txt_KdSprt.Text <> "" Then
Me.tampilkan_sparepart()
Btn_TmbhSprt.Enabled = True
Btn_cariSprt.Enabled = False
End If
End Function

Function tampilkan_sparepart()
SQL = "SELECT Kd_sprt,Nm_sprt,Hrg_sprt FROM sparepart WHERE
Kd_sprt= '" & txt_KdSprt.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
txt_KdSprt.Text = Reader.GetString(0)
Txt_NmSprt.Text = Reader.GetString(1)
Txt_HrgSprt.Text = Reader.GetString(2)

Txt_jumSprt.Focus()
Btn_TmbhSprt.Enabled = True
Btn_cariSprt.Enabled = False

End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()

End Function
Function utkcari_SAF()

Dim form As New CariSAF1


form.ShowDialog()
Txt_NoSAF.Text = form.kode
If Txt_NoSAF.Text <> "" Then
tampilkan_SAF()
btn_cariSaf.Enabled = False
Else
Me.tambah_kdSAF()
End If

End Function
Function tampilkan_SAF()
Dim index1, index2, index3 As String
SQL = "SELECT SAF.*, motor.jns_mtr FROM SAF INNER JOIN motor
ON saf.no_pol = motor.no_pol WHERE saf.no_saf= '" & Txt_NoSAF.Text &
"' && saf.tgl_saf = now()"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_NoSAF.Text = Reader.GetString(0)
Txt_Keluhan.Text = Reader.GetString(1)
'txt_tgl.Text = Reader.GetString(2)
txt_jam.Text = Reader.GetString(3)
Txt_Analisa.Text = Reader.GetString(4)
Txt_Saran.Text = Reader.GetString(5)
Txt_TotBiayaService.Text = Reader.GetString(6)
txt_Nopol.Text = Reader.GetString(7)
index1 = Reader.GetString(8)
index2 = Reader.GetString(9)
index3 = Reader.GetString(10)
Txt_JnsMtr.Text = Reader.GetString(11)

txt_tgl.Enabled = True
txt_jam.Enabled = True
Btn_TmbhService.Enabled = True
btn_cariService.Enabled = False
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Cmb_mekanik.Text = index1
Cmb_advisor.Text = index2
Cmb_KdPaket.Text = index3
Connect.Close()
Me.tampil_detilservice()
Me.tampil_detilsprt()
Txt_NoSAF.Enabled = False
End Function
Function tampil_detilservice()
SQL = "SELECT isi.kd_service, service.nm_service,
isi.biaya_service FROM isi INNER JOIN service ON isi.kd_service =
service.kd_service INNER JOIN saf ON isi.no_saf = saf.no_saf WHERE
isi.no_saf = '" & Txt_NoSAF.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
Try
While Reader.Read
y = Val(txt_counter_service.Text)
txt_counter_service.Text =
Str(Val(txt_counter_service.Text) + 1)

ListViewService.Items.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")

ListViewService.Items(y).SubItems(0).Text() =
Reader.GetString(0)
ListViewService.Items(y).SubItems(1).Text() =
Reader.GetString(1)
ListViewService.Items(y).SubItems(2).Text() =
Reader.GetString(2)
Me.total_service()
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function
Function tampil_detilsprt()
SQL = "SELECT dapat.kd_sprt, sparepart.nm_sprt,
sparepart.hrg_sprt, dapat.jumlah_sprt, dapat.jml_harga_sprt FROM
dapat INNER JOIN sparepart ON dapat.kd_sprt = sparepart.kd_sprt
INNER JOIN saf ON dapat.no_saf = saf.no_saf WHERE dapat.no_saf = '"
& Txt_NoSAF.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
Try
While Reader.Read
y = Val(txt_counter_sprt.Text)
txt_counter_sprt.Text =
Str(Val(txt_counter_sprt.Text) + 1)

ListViewSparepart.Items.Add("")

ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

ListViewSparepart.Items(y).SubItems(0).Text() =
Reader.GetString(0)
ListViewSparepart.Items(y).SubItems(1).Text() =
Reader.GetString(1)
ListViewSparepart.Items(y).SubItems(2).Text() =
Reader.GetString(2)
ListViewSparepart.Items(y).SubItems(3).Text() =
Reader.GetString(3)
ListViewSparepart.Items(y).SubItems(4).Text() =
Reader.GetString(4)
End While
Me.total_sprt()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function
Function simpan()
SQL = "INSERT INTO saf VALUES('" & Txt_NoSAF.Text & "','" &
Txt_Keluhan.Text & "','" & Format(Now.Date, "yyyy-MM-dd") & "', '" &
txt_jam.Text & "' ,'" & Txt_Analisa.Text & "','" & Txt_Saran.Text &
"','" & Txt_TotBiayaService.Text & "','" & txt_Nopol.Text & "','" &
Cmb_mekanik.Text & "','" & Cmb_advisor.Text & "','" &
Cmb_KdPaket.Text & "')"
Try
If Txt_NoSAF.Text = "" Then
MsgBox("Data Yang Dimasukan Harus Lengkap",
MsgBoxStyle.Critical, "Informasi")
Btn_tmbh.Focus()
ElseIf txt_Nopol.Text = "" Then
MsgBox("No Polisi Harus Diisi",
MsgBoxStyle.Critical, "Informasi")
txt_Nopol.Focus()
Btn_tmbh.Enabled = False
ElseIf Cmb_mekanik.Text = "< pilih >" Or
Txt_mekanik.Text = "" Then
MsgBox("Silahkan Pilih Mekanik",
MsgBoxStyle.Critical, "Informasi")
Cmb_mekanik.Focus()
Btn_tmbh.Enabled = False
ElseIf Cmb_advisor.Text = "< pilih >" Or
Txt_advisor.Text = "" Then
MsgBox("Silahkan Pilih Service Advisor",
MsgBoxStyle.Critical, "Informasi")
Cmb_advisor.Focus()
Btn_tmbh.Enabled = False
ElseIf Txt_TotBiayaService.Text = "" Then
MsgBox("Hitung Total Service Terlebih Dahulu",
MsgBoxStyle.Critical, "Informasi")
Btn_totalBiayaSeluruh.Focus()
Btn_tmbh.Enabled = False
Else
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
Call simpan_isi()
Call simpan_dapat()
End If
MsgBox("Data berhasil disimpan",
MsgBoxStyle.Information, "Informasi")
MsgBox("Silakan Cetak SAF", MsgBoxStyle.Exclamation,
"Informasi")
btncetak.Focus()
Btn_smpan.Enabled = False
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal")
End Try
Connect.Close()

End Function
Function simpan_isi()
Dim x, y As Integer
x = Val(txt_counter_service.Text)
For y = 0 To x - 1
SQLDetil = "INSERT INTO isi VALUES ('" & Txt_NoSAF.Text
& "','" & ListViewService.Items(y).SubItems(0).Text & "','" &
ListViewService.Items(y).SubItems(2).Text & "')"
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
End If
Next
End Function
Function simpan_dapat()
Dim x, y As Integer
x = Val(txt_counter_sprt.Text)
For y = 0 To x - 1
SQLDetil = "INSERT INTO dapat VALUES ('" &
Txt_NoSAF.Text & "','" & ListViewSparepart.Items(y).SubItems(0).Text
& "','" & ListViewSparepart.Items(y).SubItems(3).Text & "','" &
ListViewSparepart.Items(y).SubItems(4).Text & "')"
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
SQLDetil = "UPDATE sparepart SET stock = stock - '"
& ListViewSparepart.Items(y).SubItems(3).Text & "' WHERE kd_sprt =
'" & ListViewSparepart.Items(y).SubItems(0).Text & "'"
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
End If
Next
End Function
Function ubah()
SQL = " UPDATE saf SET keluhan = '" & Txt_Keluhan.Text & "',
tgl_saf = '" & Format(Now.Date, "yyyy-MM-dd") & "', jam_masuk = '" &
txt_jam.Text & "', analisa = '" & Txt_Analisa.Text & "', saran = '"
& Txt_Saran.Text & "', " & _
"tot_biaya_service = '" & Txt_TotBiayaService.Text &
"' WHERE no_saf = '" & Txt_NoSAF.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
Try
If ResultSet > 0 Then
Me.ubah_list_service()
Me.ubah_list_sprt()
End If
MsgBox("Data Telah Diubah", MsgBoxStyle.Information,
"Informasi")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Data Gagal
Diubah")
End Try
Connect.Close()
End Function
Function ubah_list_service()
SQLDetil = "DELETE FROM isi WHERE no_saf = '" &
Txt_NoSAF.Text & "' "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
Me.simpan_isi()
Connect.Close()
End Function
Function ubah_list_sprt()
SQLDetil = "DELETE FROM dapat WHERE no_saf = '" &
Txt_NoSAF.Text & "' "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQLDetil, Connect)
ResultSet = Command.ExecuteNonQuery
Me.simpan_dapat()
Connect.Close()
End Function
Function cetak()
SQL = "SELECT saf.*, motor.no_rangka, motor.no_mesin,
motor.warna, motor.type_mtr, motor.tahun, motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
"mekanik.nm_mekanik, mekanik.tlp as
tlp_mekanik, advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
"service.*, isi.biaya_service FROM(saf) "
& _
"INNER JOIN motor ON motor.no_pol =
saf.no_pol " & _
"INNER JOIN paket_service ON
paket_service.kd_paket = saf.kd_paket " & _
"INNER JOIN mekanik ON mekanik.id_mekanik
= saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor
= saf.id_advisor " & _
"INNER JOIN isi ON saf.no_saf = isi.no_saf
" & _
"INNER JOIN service ON service.kd_service
= isi.kd_service " & _
"WHERE saf.no_saf= '" & Txt_NoSAF.Text &
"' "

Adapter = New MySqlDataAdapter(SQL, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

Try

If Connect.State = ConnectionState.Closed Then


Connect.Open()
SQLDetil = "SELECT saf.*, motor.no_rangka,
motor.no_mesin, motor.warna, motor.type_mtr, motor.tahun,
motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
punya.kd_paket, paket_service.nm_paket, paket_service.hrg_paket,
service.nm_service as detil_service, " & _
"mekanik.nm_mekanik, mekanik.tlp as tlp_mekanik,
advisor.nm_advisor, advisor.tlp as tlp_advisor " & _
"FROM(paket_service) " & _
"INNER JOIN saf ON paket_service.kd_paket =
saf.kd_paket " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol "
& _
"INNER JOIN punya ON punya.kd_paket =
paket_service.kd_paket " & _
"INNER JOIN service ON service.kd_service =
punya.kd_service " & _
"INNER JOIN mekanik ON mekanik.id_mekanik =
saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor =
saf.id_advisor " & _
"WHERE saf.no_saf= '" & Txt_NoSAF.Text & "' "

Adapter = New MySqlDataAdapter(SQLDetil, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

SQL = "SELECT saf.*, motor.no_rangka, motor.no_mesin,


motor.warna, motor.type_mtr, motor.tahun, motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
"mekanik.nm_mekanik, mekanik.tlp as tlp_mekanik,
advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
"sparepart.*, dapat.no_saf, dapat.jumlah_sprt,
dapat.jml_harga_sprt FROM(dapat) " & _
"INNER JOIN saf ON dapat.no_saf = saf.no_saf " &
_
"INNER JOIN sparepart ON sparepart.kd_sprt =
dapat.kd_sprt " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol "
& _
"INNER JOIN paket_service ON
paket_service.kd_paket = saf.kd_paket " & _
"INNER JOIN mekanik ON mekanik.id_mekanik =
saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor =
saf.id_advisor " & _
"WHERE saf.no_saf= '" & Txt_NoSAF.Text & "' "

Adapter = New MySqlDataAdapter(SQL, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

'SQLDetil = "select saf.*, motor.no_rangka,


motor.no_mesin, motor.warna, motor.type_mtr, motor.tahun,
motor.pemilik, " & _
' "motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
' "mekanik.nm_mekanik, mekanik.tlp as
tlp_mekanik, advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
' "punya.kd_service, service.nm_service FROM
punya " & _
' "inner join service on service.kd_service =
punya.kd_service " & _
' "inner join paket_service on paket_service.kd_paket
= punya.kd_paket " & _
' "inner join saf on saf.kd_paket =
paket_service.kd_paket"
' "where paket_service.kd_paket = '" &
Cmb_KdPaket.Text & "'"
'Adapter = New MySqlDataAdapter(SQLDetil, Connect)
'Adapter.Fill(DataSet)
'Adapter.Dispose()

'DataSet.WriteXml("Saf.xml", XmlWriteMode.WriteSchema)
DataSet.WriteXml("Saf1.xml", XmlWriteMode.WriteSchema)

Catch ex As Exception
MsgBox(ex.Message.ToString())
Finally
Adapter.Dispose()
DataSet.Clear()
End Try
Connect.Close()
'Form = New Cetak("..\CetakSAF.rpt", "")
'Form.StartPosition = FormStartPosition.CenterScreen
'Form.WindowState = FormWindowState.Maximized
'Form.ShowDialog()

Form = New Cetak("..\CSAF.rpt", "")


Form.StartPosition = FormStartPosition.CenterScreen
Form.WindowState = FormWindowState.Maximized
Form.ShowDialog()

End Function

Function isilist_sprt()

Dim Row As Integer


Row = Val(txt_counter_sprt.Text)
txt_counter_sprt.Text = Str(Val(txt_counter_sprt.Text) + 1)

ListViewSparepart.Items.Add("")
ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")
ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")
ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")
ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")
ListViewSparepart.Items(ListViewSparepart.Items.Count -
1).SubItems.Add("")

'ListViewSparepart.Items(Row).SubItems(0).Text = Row + 1
ListViewSparepart.Items(Row).SubItems(0).Text =
txt_KdSprt.Text
ListViewSparepart.Items(Row).SubItems(1).Text =
Txt_NmSprt.Text
ListViewSparepart.Items(Row).SubItems(2).Text =
Txt_HrgSprt.Text
ListViewSparepart.Items(Row).SubItems(3).Text =
Txt_jumSprt.Text
ListViewSparepart.Items(Row).SubItems(4).Text =
Txt_JumHrgSprt.Text

Call bersih_sprt()
End Function
Function isilist_service()

Dim Row As Integer


Row = Val(txt_counter_service.Text)
txt_counter_service.Text = Str(Val(txt_counter_service.Text)
+ 1)
ListViewService.Items.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")
ListViewService.Items(ListViewService.Items.Count -
1).SubItems.Add("")

ListViewService.Items(Row).SubItems(0).Text =
Txt_KdService.Text
ListViewService.Items(Row).SubItems(1).Text =
txt_NmService.Text
ListViewService.Items(Row).SubItems(2).Text =
txt_hrgService.Text

Call bersih_service()
End Function
Function cekstock()

Dim cek_stock As String


SQL = "select stock from sparepart where kd_sprt='" &
txt_KdSprt.Text & "'"
Try
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then cek_stock =
Reader.GetString(0)
If CInt(Txt_jumSprt.Text) > cek_stock Then
MsgBox("Stock Sparepart Tidak Tercukupi",
MsgBoxStyle.Critical, "Informasi")
Txt_jumSprt.Focus()
Else
Call isilist_sprt()
Call total_sprt()
Btn_TmbhSprt.Enabled = False
Btn_HpusSprt.Enabled = False
Btn_cariSprt.Focus()
End If
Btn_cariSprt.Enabled = True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()

End Function
Function total_sprt()

Dim x As Integer
For x = 0 To Val(txt_counter_sprt.Text) - 1
total_sprt = total_sprt +
CInt(ListViewSparepart.Items(x).SubItems(4).Text)
y = total_sprt
Next
txt_tothrgSprt.Text = Str(y)

End Function
Function total_service()

Dim x As Integer
For x = 0 To Val(txt_counter_service.Text) - 1
total_service = total_service +
CInt(ListViewService.Items(x).SubItems(2).Text)
y = total_service
Next
txt_tothrgService.Text = Str(y)

End Function
Function hapus_list()

For y = 0 To Val(txt_counter_sprt.Text) - 1
If ListViewSparepart.Items(y).SubItems(0).Text =
txt_KdSprt.Text Then
ListViewSparepart.Items(y).Remove()
Exit For
End If
Next
txt_counter_sprt.Text = Val(txt_counter_sprt.Text) - 1
Call bersih_sprt()
Call total_sprt()

End Function
Function hapus_list_service()

For y = 0 To Val(txt_counter_service.Text) - 1
If ListViewService.Items(y).SubItems(0).Text =
Txt_KdService.Text Then
ListViewService.Items(y).Remove()
Exit For
End If
Next
txt_counter_service.Text = Val(txt_counter_service.Text) - 1
Call bersih_service()
Me.total_service()
End Function

Function tot_biaya_seluruh()

Dim tot As Integer


If txt_Paket.Text <> "" And txt_tothrgSprt.Text <> "" And
txt_tothrgService.Text <> "" Then
tot = CInt(txt_Paket.Text) +
CInt(txt_tothrgService.Text) + CInt(txt_tothrgSprt.Text)
ElseIf txt_Paket.Text = "" And txt_tothrgSprt.Text <> "" And
txt_tothrgService.Text <> "" Then
tot = CInt(txt_tothrgService.Text) +
CInt(txt_tothrgSprt.Text)
ElseIf txt_Paket.Text <> "" And txt_tothrgSprt.Text = "" And
txt_tothrgService.Text <> "" Then
tot = CInt(txt_Paket.Text) +
CInt(txt_tothrgService.Text)
ElseIf txt_Paket.Text <> "" And txt_tothrgSprt.Text <> ""
And txt_tothrgService.Text = "" Then
tot = CInt(txt_Paket.Text) + CInt(txt_tothrgSprt.Text)
ElseIf txt_Paket.Text = "" And txt_tothrgSprt.Text = "" And
txt_tothrgService.Text <> "" Then
tot = CInt(txt_tothrgService.Text)
ElseIf txt_Paket.Text <> "" And txt_tothrgSprt.Text = "" And
txt_tothrgService.Text = "" Then
tot = CInt(txt_Paket.Text)
End If
Txt_TotBiayaService.Text = Str(tot)

End Function
Function aktif()

Cmb_KdPaket.Enabled = True
Txt_Keluhan.Enabled = True
txt_Nopol.Enabled = True
Cmb_mekanik.Enabled = True
Cmb_advisor.Enabled = True
Txt_Analisa.Enabled = True
Txt_Saran.Enabled = True

btn_cariSaf.Enabled = True
btn_cariService.Enabled = True
Btn_TmbhService.Enabled = True
Btn_HpusService.Enabled = True
Btn_cariSprt.Enabled = True
Btn_TmbhSprt.Enabled = True
Btn_HpusSprt.Enabled = True
Btn_smpan.Enabled = True
Btn_totalBiayaSeluruh.Enabled = True

End Function

Function reset()
Txt_NoSAF.Enabled = False
Cmb_KdPaket.Enabled = False
txt_NmService.Enabled = False
Txt_Keluhan.Enabled = False
txt_Nopol.Enabled = False
Cmb_mekanik.Enabled = False
Cmb_advisor.Enabled = False
Txt_Analisa.Enabled = False
Txt_Saran.Enabled = False
txt_tgl.Enabled = False
txt_jam.Enabled = False

Call bersih()
Call bersih_service()
Call bersih_listview_service()
Call bersih_sprt()
Call bersih_listview_sprt()

btn_cariSaf.Enabled = False
btncetak.Enabled = False
btn_cariService.Enabled = False
Btn_TmbhService.Enabled = False
Btn_HpusService.Enabled = False
Btn_cariSprt.Enabled = False
Btn_TmbhSprt.Enabled = False
Btn_HpusSprt.Enabled = False
Btn_smpan.Enabled = False
Btn_totalBiayaSeluruh.Enabled = False
Btn_ubh.Enabled = False

End Function

Function bersih()

Txt_NoSAF.Text = ""
Cmb_KdPaket.SelectedIndex = 0
txt_NmService.Text = ""
txt_Paket.Text = ""
Txt_Keluhan.Text = ""
txt_Nopol.Text = ""
Txt_JnsMtr.Text = ""
Cmb_mekanik.SelectedIndex = 0
Txt_mekanik.Text = ""
Cmb_advisor.SelectedIndex = 0
Txt_advisor.Text = ""
Txt_Analisa.Text = ""
Txt_Saran.Text = ""
Txt_TotBiayaService.Text = ""

End Function
Function bersih_sprt()

txt_KdSprt.Text = ""
Txt_NmSprt.Text = ""
Txt_HrgSprt.Text = ""
Txt_jumSprt.Text = ""
Txt_JumHrgSprt.Text = ""
txt_tothrgSprt.Text = CInt("0")

Btn_TmbhSprt.Enabled = True
Btn_HpusSprt.Enabled = False

End Function
Function bersih_service()

Txt_KdService.Text = ""
txt_NmService.Text = ""
txt_hrgService.Text = ""
txt_tothrgService.Text = ""
Btn_TmbhService.Enabled = True
Btn_HpusService.Enabled = False

End Function
Function bersih_listview_service()

While Val(txt_counter_service.Text) > 0


ListViewService.Items(0).Remove()
txt_counter_service.Text = Val(txt_counter_service.Text)
- 1
End While

End Function

Function bersih_listview_sprt()

While Val(txt_counter_sprt.Text) > 0


ListViewSparepart.Items(0).Remove()
txt_counter_sprt.Text = Val(txt_counter_sprt.Text) - 1
End While

End Function

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


System.EventArgs) Handles MyBase.Load
Btn_tmbh.Focus()
Call reset()
Call list_data_paket()
Call list_data_mekanik()
Call list_data_advisor()
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data SAF")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data SAF")
mToolTip.SetToolTip(btn_cariSaf, "Cari Data SAF")
mToolTip.SetToolTip(Btn_ubh, "Mengubah Data SAF")
mToolTip.SetToolTip(btncetak, "Cetak SAF")

txt_tgl.Text = Format(Now.Date, "dddd, dd-MM-yyyy")


Timer1.Start()

End Sub

Private Sub Cmb_KdService_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Cmb_KdPaket.SelectedIndexChanged

If Cmb_KdPaket.SelectedIndex > 0 Then


Call tampil_data_paket()
Txt_Keluhan.Focus()
Else
txt_NmPaket.Text = ""
txt_Paket.Text = ""

End If

End Sub

Private Sub txt_Nopol_KeyPress(ByVal sender As Object, ByVal e


As System.Windows.Forms.KeyPressEventArgs) Handles
txt_Nopol.KeyPress

If e.KeyChar = Chr(13) Then


SQL = "SELECT Jns_mtr FROM motor WHERE No_pol='" &
txt_Nopol.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
Txt_JnsMtr.Text = Reader.GetString(0)
Cmb_KdPaket.Focus()
'Else

End While
Catch ex As Exception
MsgBox("Jenis Motor Tidak Dapat Ditampilkan",
MsgBoxStyle.Information, "Informasi")
Txt_JnsMtr.Text = ""
Finally
Reader.Close()
End Try
Connect.Close()
End If

End Sub

Private Sub Cmb_mekanik_SelectedIndexChanged(ByVal sender As


Object, ByVal e As System.EventArgs) Handles
Cmb_mekanik.SelectedIndexChanged

If Cmb_mekanik.SelectedIndex > 0 Then


Call tampil_data_mekanik()
Else : Txt_mekanik.Text = ""
End If

End Sub

Private Sub Cmb_advisor_SelectedIndexChanged(ByVal sender As


Object, ByVal e As System.EventArgs) Handles
Cmb_advisor.SelectedIndexChanged

If Cmb_advisor.SelectedIndex > 0 Then


Call tampil_data_advisor()
Btn_totalBiayaSeluruh.Enabled = True
Else : Txt_advisor.Text = ""
End If

End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs)
Call simpan()
btncetak.Enabled = True
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
End Sub

Private Sub Btn_tmbh_Click_1(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_tmbh.Click
Call reset()
Call tambah_kdSAF()
Btn_TmbhService.Enabled = False
Btn_HpusService.Enabled = False
Btn_TmbhSprt.Enabled = False
Btn_HpusSprt.Enabled = False
Btn_tmbh.Enabled = False
Btn_smpan.Enabled = False
Btn_btal.Enabled = True
Btn_totalBiayaSeluruh.Enabled = False
End Sub
Private Sub Btn_Keluar_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub

Private Sub btn_cariService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles btn_cariService.Click
Call utkcari_service()

End Sub

Private Sub Btn_cariSprt_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_cariSprt.Click
Call utkcari_sparepart()
Btn_TmbhSprt.Enabled = True
End Sub

Private Sub Txt_jumSprt_TextChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Txt_jumSprt.TextChanged
Txt_JumHrgSprt.Text = CInt(Val(Txt_HrgSprt.Text)) *
CInt(Val(Txt_jumSprt.Text))
End Sub

Private Sub Btn_TmbhSprt_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_TmbhSprt.Click
Dim Cek As Boolean = False
Dim CekItem As Integer
If Txt_jumSprt.Text = "" Then
MsgBox("Jumlah Sparepart Harus Diisi",
MsgBoxStyle.Critical, "Peringatan")
Txt_jumSprt.Focus()
Else
For CekItem = 0 To Val(txt_counter_sprt.Text) - 1

If txt_KdSprt.Text =
ListViewSparepart.Items(CekItem).SubItems(0).Text Then
Cek = True

End If
Next
If Cek = False Then
Call cekstock()
Else
MsgBox("Kode Barang Sudah Ada",
MsgBoxStyle.Critical)
Call bersih_sprt()
Btn_cariSprt.Enabled = True
End If
End If
End Sub
Private Sub ListViewSparepart_DoubleClick(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
ListViewSparepart.DoubleClick
txt_KdSprt.Text =
ListViewSparepart.SelectedItems(0).SubItems(0).Text.ToString
Txt_NmSprt.Text =
ListViewSparepart.SelectedItems(0).SubItems(1).Text.ToString
Txt_HrgSprt.Text =
ListViewSparepart.SelectedItems(0).SubItems(2).Text.ToString
Txt_jumSprt.Text =
ListViewSparepart.SelectedItems(0).SubItems(3).Text.ToString
Txt_JumHrgSprt.Text =
ListViewSparepart.SelectedItems(0).SubItems(4).Text.ToString

Btn_HpusSprt.Enabled = True
Btn_smpan.Enabled = False
End Sub

Private Sub Btn_HpusSprt_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_HpusSprt.Click
Call hapus_list()
Btn_TmbhSprt.Enabled = False
End Sub

Private Sub Btn_totalBiayaSeluruh_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Btn_totalBiayaSeluruh.Click
Call tot_biaya_seluruh()
Btn_smpan.Enabled = True
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
Call reset()
bersih_sprt()
bersih_listview_sprt()
Btn_tmbh.Enabled = True
Btn_btal.Enabled = False
End Sub

Private Sub Btn_TmbhService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_TmbhService.Click
Dim Cek As Boolean = False
Dim CekItem As Integer
For CekItem = 0 To Val(txt_counter_service.Text) - 1
If Txt_KdService.Text =
ListViewService.Items(CekItem).SubItems(0).Text Then

Cek = True
End If
Next
If Cek = False Then
Call isilist_service()
Call total_service()
Else
MsgBox("Kode Service Sudah Ada", MsgBoxStyle.Critical)
End If
btn_cariService.Enabled = True
Btn_TmbhService.Enabled = False

End Sub

Private Sub ListViewService_DoubleClick(ByVal sender As Object,


ByVal e As System.EventArgs) Handles ListViewService.DoubleClick
Txt_KdService.Text =
ListViewService.SelectedItems(0).SubItems(0).Text.ToString
txt_NmService.Text =
ListViewService.SelectedItems(0).SubItems(1).Text.ToString
txt_hrgService.Text =
ListViewService.SelectedItems(0).SubItems(2).Text.ToString
btn_cariService.Enabled = True
Btn_HpusService.Enabled = True
End Sub

Private Sub Btn_HpusService_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_HpusService.Click
Call hapus_list_service()
Btn_TmbhService.Enabled = False
End Sub

Private Sub Btn_smpan_Click_1(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_smpan.Click
Call simpan()
btncetak.Enabled = True
End Sub

Private Sub btncetak_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btncetak.Click
Call cetak()
End Sub

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


As System.EventArgs) Handles Timer1.Tick
txt_jam.Text = Format(Now, "HH : mm : ss")
End Sub

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


As System.EventArgs) Handles Btn_ubh.Click
Me.ubah()
'Me.reset()
Btn_tmbh.Enabled = True
Btn_tmbh.Focus()
btncetak.Enabled = True
End Sub
Private Sub btn_cariSaf_Click1(ByVal sender As Object, ByVal e
As System.EventArgs) Handles btn_cariSaf.Click
Me.utkcari_SAF()

btn_cariService.Enabled = True
Btn_TmbhService.Enabled = False
Btn_cariSprt.Enabled = True
Btn_TmbhSprt.Enabled = False
Btn_ubh.Enabled = True
Btn_smpan.Enabled = False
End Sub
End Class

TRANSAKSI WO
Imports MySql.Data.MySqlClient
Public Class Wo
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label15 As System.Windows.Forms.Label
Friend WithEvents Label16 As System.Windows.Forms.Label
Friend WithEvents Txt_NoSAF As System.Windows.Forms.TextBox
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents txt_NmPaket As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents txt_NoWo As System.Windows.Forms.TextBox
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents Label23 As System.Windows.Forms.Label
Friend WithEvents Label24 As System.Windows.Forms.Label
Friend WithEvents Txt_advisor As System.Windows.Forms.TextBox
Friend WithEvents Txt_mekanik As System.Windows.Forms.TextBox
Friend WithEvents Label18 As System.Windows.Forms.Label
Friend WithEvents Label19 As System.Windows.Forms.Label
Friend WithEvents Label34 As System.Windows.Forms.Label
Friend WithEvents txt_jam As System.Windows.Forms.TextBox
Friend WithEvents Label20 As System.Windows.Forms.Label
Friend WithEvents Btn_CariSaf As System.Windows.Forms.Button
Friend WithEvents txt_kdpaket As System.Windows.Forms.TextBox
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents dtpicker1 As
System.Windows.Forms.DateTimePicker
Friend WithEvents txt_tglsaf As System.Windows.Forms.TextBox
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents Label17 As System.Windows.Forms.Label
Friend WithEvents Label21 As System.Windows.Forms.Label
Friend WithEvents Label22 As System.Windows.Forms.Label
Friend WithEvents txt_Nopol As System.Windows.Forms.TextBox
Friend WithEvents Txt_JnsMtr As System.Windows.Forms.TextBox
Friend WithEvents Label13 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents txt_jam_masuk As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.GroupBox5 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.txt_kdpaket = New System.Windows.Forms.TextBox
Me.Label19 = New System.Windows.Forms.Label
Me.Label18 = New System.Windows.Forms.Label
Me.Label15 = New System.Windows.Forms.Label
Me.Label16 = New System.Windows.Forms.Label
Me.Txt_NoSAF = New System.Windows.Forms.TextBox
Me.Label9 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.txt_NmPaket = New System.Windows.Forms.TextBox
Me.Txt_mekanik = New System.Windows.Forms.TextBox
Me.Label23 = New System.Windows.Forms.Label
Me.Label24 = New System.Windows.Forms.Label
Me.Txt_advisor = New System.Windows.Forms.TextBox
Me.Btn_CariSaf = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.txt_NoWo = New System.Windows.Forms.TextBox
Me.Label14 = New System.Windows.Forms.Label
Me.Label34 = New System.Windows.Forms.Label
Me.txt_jam = New System.Windows.Forms.TextBox
Me.Label20 = New System.Windows.Forms.Label
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.dtpicker1 = New System.Windows.Forms.DateTimePicker
Me.Label6 = New System.Windows.Forms.Label
Me.Label10 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.txt_tglsaf = New System.Windows.Forms.TextBox
Me.Label12 = New System.Windows.Forms.Label
Me.Label17 = New System.Windows.Forms.Label
Me.Label21 = New System.Windows.Forms.Label
Me.txt_jam_masuk = New System.Windows.Forms.TextBox
Me.Label22 = New System.Windows.Forms.Label
Me.txt_Nopol = New System.Windows.Forms.TextBox
Me.Txt_JnsMtr = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox5.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.Btn_Keluar)
Me.GroupBox5.Controls.Add(Me.Btn_smpan)
Me.GroupBox5.Controls.Add(Me.Btn_btal)
Me.GroupBox5.Controls.Add(Me.Btn_tmbh)
Me.GroupBox5.Font = New System.Drawing.Font("Microsoft Sans
Serif", 14.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox5.Location = New System.Drawing.Point(152, 314)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(424, 64)
Me.GroupBox5.TabIndex = 51
Me.GroupBox5.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(320, 24)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(88, 32)
Me.Btn_Keluar.TabIndex = 18
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(112, 24)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(88, 32)
Me.Btn_smpan.TabIndex = 16
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(216, 24)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(88, 32)
Me.Btn_btal.TabIndex = 17
Me.Btn_btal.Text = "&Batal"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(8, 24)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(88, 32)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "&Tambah"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.txt_Nopol)
Me.GroupBox1.Controls.Add(Me.Txt_JnsMtr)
Me.GroupBox1.Controls.Add(Me.Label13)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label11)
Me.GroupBox1.Controls.Add(Me.Label21)
Me.GroupBox1.Controls.Add(Me.Label22)
Me.GroupBox1.Controls.Add(Me.txt_jam_masuk)
Me.GroupBox1.Controls.Add(Me.txt_tglsaf)
Me.GroupBox1.Controls.Add(Me.Label12)
Me.GroupBox1.Controls.Add(Me.Label17)
Me.GroupBox1.Controls.Add(Me.txt_kdpaket)
Me.GroupBox1.Controls.Add(Me.Label19)
Me.GroupBox1.Controls.Add(Me.Label18)
Me.GroupBox1.Controls.Add(Me.Label15)
Me.GroupBox1.Controls.Add(Me.Label16)
Me.GroupBox1.Controls.Add(Me.Txt_NoSAF)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.txt_NmPaket)
Me.GroupBox1.Controls.Add(Me.Txt_mekanik)
Me.GroupBox1.Controls.Add(Me.Label23)
Me.GroupBox1.Controls.Add(Me.Label24)
Me.GroupBox1.Controls.Add(Me.Txt_advisor)
Me.GroupBox1.Controls.Add(Me.Btn_CariSaf)
Me.GroupBox1.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(16, 144)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(736, 160)
Me.GroupBox1.TabIndex = 48
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "DATA SAF"
'
'txt_kdpaket
'
Me.txt_kdpaket.BackColor = System.Drawing.Color.White
Me.txt_kdpaket.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_kdpaket.Enabled = False
Me.txt_kdpaket.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_kdpaket.Location = New System.Drawing.Point(616, 24)
Me.txt_kdpaket.MaxLength = 25
Me.txt_kdpaket.Name = "txt_kdpaket"
Me.txt_kdpaket.Size = New System.Drawing.Size(80, 20)
Me.txt_kdpaket.TabIndex = 56
Me.txt_kdpaket.Text = ""
'
'Label19
'
Me.Label19.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label19.Location = New System.Drawing.Point(336, 88)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(16, 23)
Me.Label19.TabIndex = 41
Me.Label19.Text = ":"
'
'Label18
'
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(592, 88)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(16, 23)
Me.Label18.TabIndex = 40
Me.Label18.Text = ":"
'
'Label15
'
Me.Label15.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label15.Location = New System.Drawing.Point(480, 56)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(112, 23)
Me.Label15.TabIndex = 18
Me.Label15.Text = "Nama Paket Service"
'
'Label16
'
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label16.Location = New System.Drawing.Point(592, 56)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(16, 23)
Me.Label16.TabIndex = 19
Me.Label16.Text = ":"
'
'Txt_NoSAF
'
Me.Txt_NoSAF.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_NoSAF.Enabled = False
Me.Txt_NoSAF.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Txt_NoSAF.Location = New System.Drawing.Point(120, 24)
Me.Txt_NoSAF.MaxLength = 7
Me.Txt_NoSAF.Name = "Txt_NoSAF"
Me.Txt_NoSAF.Size = New System.Drawing.Size(64, 20)
Me.Txt_NoSAF.TabIndex = 1
Me.Txt_NoSAF.Text = ""
'
'Label9
'
Me.Label9.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label9.Location = New System.Drawing.Point(592, 24)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(16, 23)
Me.Label9.TabIndex = 12
Me.Label9.Text = ":"
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(480, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(112, 23)
Me.Label3.TabIndex = 1
Me.Label3.Text = "Kode Paket Service"
'
'Label2
'
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(16, 24)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(80, 23)
Me.Label2.TabIndex = 0
Me.Label2.Text = "No. SAF"
'
'Label8
'
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label8.Location = New System.Drawing.Point(104, 24)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 11
Me.Label8.Text = ":"
'
'txt_NmPaket
'
Me.txt_NmPaket.BackColor = System.Drawing.Color.White
Me.txt_NmPaket.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_NmPaket.Enabled = False
Me.txt_NmPaket.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_NmPaket.Location = New System.Drawing.Point(616, 56)
Me.txt_NmPaket.MaxLength = 25
Me.txt_NmPaket.Name = "txt_NmPaket"
Me.txt_NmPaket.Size = New System.Drawing.Size(112, 20)
Me.txt_NmPaket.TabIndex = 39
Me.txt_NmPaket.Text = ""
'
'Txt_mekanik
'
Me.Txt_mekanik.BackColor = System.Drawing.Color.White
Me.Txt_mekanik.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_mekanik.Enabled = False
Me.Txt_mekanik.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Txt_mekanik.Location = New System.Drawing.Point(352, 88)
Me.Txt_mekanik.Name = "Txt_mekanik"
Me.Txt_mekanik.Size = New System.Drawing.Size(80, 20)
Me.Txt_mekanik.TabIndex = 25
Me.Txt_mekanik.Text = ""
'
'Label23
'
Me.Label23.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label23.Location = New System.Drawing.Point(480, 88)
Me.Label23.Name = "Label23"
Me.Label23.Size = New System.Drawing.Size(112, 23)
Me.Label23.TabIndex = 3
Me.Label23.Text = "Advisor"
'
'Label24
'
Me.Label24.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label24.Location = New System.Drawing.Point(248, 88)
Me.Label24.Name = "Label24"
Me.Label24.Size = New System.Drawing.Size(80, 23)
Me.Label24.TabIndex = 19
Me.Label24.Text = "Mekanik"
'
'Txt_advisor
'
Me.Txt_advisor.BackColor = System.Drawing.Color.White
Me.Txt_advisor.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_advisor.Enabled = False
Me.Txt_advisor.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Txt_advisor.Location = New System.Drawing.Point(616, 88)
Me.Txt_advisor.Name = "Txt_advisor"
Me.Txt_advisor.Size = New System.Drawing.Size(80, 20)
Me.Txt_advisor.TabIndex = 27
Me.Txt_advisor.Text = ""
'
'Btn_CariSaf
'
Me.Btn_CariSaf.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_CariSaf.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_CariSaf.Location = New System.Drawing.Point(352, 120)
Me.Btn_CariSaf.Name = "Btn_CariSaf"
Me.Btn_CariSaf.Size = New System.Drawing.Size(88, 32)
Me.Btn_CariSaf.TabIndex = 55
Me.Btn_CariSaf.Text = "&Cari SAF"
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(240, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(312, 34)
Me.Label1.TabIndex = 47
Me.Label1.Text = "Entry Data Work Order"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'txt_NoWo
'
Me.txt_NoWo.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_NoWo.Enabled = False
Me.txt_NoWo.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_NoWo.Location = New System.Drawing.Point(120, 24)
Me.txt_NoWo.MaxLength = 7
Me.txt_NoWo.Name = "txt_NoWo"
Me.txt_NoWo.Size = New System.Drawing.Size(56, 20)
Me.txt_NoWo.TabIndex = 41
Me.txt_NoWo.Text = ""
'
'Label14
'
Me.Label14.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label14.Location = New System.Drawing.Point(16, 24)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(88, 23)
Me.Label14.TabIndex = 40
Me.Label14.Text = "No. WO"
'
'Label34
'
Me.Label34.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label34.Location = New System.Drawing.Point(600, 24)
Me.Label34.Name = "Label34"
Me.Label34.Size = New System.Drawing.Size(16, 23)
Me.Label34.TabIndex = 54
Me.Label34.Text = ":"
'
'txt_jam
'
Me.txt_jam.BackColor = System.Drawing.Color.White
Me.txt_jam.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_jam.Enabled = False
Me.txt_jam.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_jam.Location = New System.Drawing.Point(616, 24)
Me.txt_jam.MaxLength = 10
Me.txt_jam.Name = "txt_jam"
Me.txt_jam.TabIndex = 53
Me.txt_jam.Text = ""
'
'Label20
'
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.Location = New System.Drawing.Point(528, 24)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(72, 23)
Me.Label20.TabIndex = 52
Me.Label20.Text = "Jam Keluar"
'
'Timer1
'
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.dtpicker1)
Me.GroupBox2.Controls.Add(Me.Label6)
Me.GroupBox2.Controls.Add(Me.Label10)
Me.GroupBox2.Controls.Add(Me.Label4)
Me.GroupBox2.Controls.Add(Me.txt_NoWo)
Me.GroupBox2.Controls.Add(Me.Label14)
Me.GroupBox2.Controls.Add(Me.Label20)
Me.GroupBox2.Controls.Add(Me.Label34)
Me.GroupBox2.Controls.Add(Me.txt_jam)
Me.GroupBox2.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox2.Location = New System.Drawing.Point(16, 64)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(736, 64)
Me.GroupBox2.TabIndex = 55
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "DATA WO"
'
'dtpicker1
'
Me.dtpicker1.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker1.Format =
System.Windows.Forms.DateTimePickerFormat.Custom
Me.dtpicker1.Location = New System.Drawing.Point(360, 24)
Me.dtpicker1.Name = "dtpicker1"
Me.dtpicker1.Size = New System.Drawing.Size(96, 20)
Me.dtpicker1.TabIndex = 45
'
'Label6
'
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(344, 24)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 44
Me.Label6.Text = ":"
'
'Label10
'
Me.Label10.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label10.Location = New System.Drawing.Point(264, 24)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(88, 23)
Me.Label10.TabIndex = 43
Me.Label10.Text = "Tanggal WO"
'
'Label4
'
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(96, 24)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(16, 23)
Me.Label4.TabIndex = 42
Me.Label4.Text = ":"
'
'txt_tglsaf
'
Me.txt_tglsaf.BackColor = System.Drawing.Color.White
Me.txt_tglsaf.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_tglsaf.Enabled = False
Me.txt_tglsaf.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_tglsaf.Location = New System.Drawing.Point(120, 56)
Me.txt_tglsaf.MaxLength = 10
Me.txt_tglsaf.Name = "txt_tglsaf"
Me.txt_tglsaf.TabIndex = 58
Me.txt_tglsaf.Text = ""
'
'Label12
'
Me.Label12.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label12.Location = New System.Drawing.Point(16, 56)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(80, 23)
Me.Label12.TabIndex = 57
Me.Label12.Text = "Tgl SAF"
'
'Label17
'
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label17.Location = New System.Drawing.Point(104, 56)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(16, 23)
Me.Label17.TabIndex = 59
Me.Label17.Text = ":"
'
'Label21
'
Me.Label21.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label21.Location = New System.Drawing.Point(16, 88)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(80, 23)
Me.Label21.TabIndex = 60
Me.Label21.Text = "Jam Masuk"
'
'txt_jam_masuk
'
Me.txt_jam_masuk.BackColor = System.Drawing.Color.White
Me.txt_jam_masuk.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_jam_masuk.Enabled = False
Me.txt_jam_masuk.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_jam_masuk.Location = New System.Drawing.Point(120,
88)
Me.txt_jam_masuk.MaxLength = 10
Me.txt_jam_masuk.Name = "txt_jam_masuk"
Me.txt_jam_masuk.TabIndex = 61
Me.txt_jam_masuk.Text = ""
'
'Label22
'
Me.Label22.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label22.Location = New System.Drawing.Point(104, 88)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(8, 16)
Me.Label22.TabIndex = 62
Me.Label22.Text = ":"
'
'txt_Nopol
'
Me.txt_Nopol.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_Nopol.Enabled = False
Me.txt_Nopol.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txt_Nopol.Location = New System.Drawing.Point(352, 24)
Me.txt_Nopol.MaxLength = 10
Me.txt_Nopol.Name = "txt_Nopol"
Me.txt_Nopol.Size = New System.Drawing.Size(88, 20)
Me.txt_Nopol.TabIndex = 69
Me.txt_Nopol.Text = ""
'
'Txt_JnsMtr
'
Me.Txt_JnsMtr.BackColor = System.Drawing.Color.White
Me.Txt_JnsMtr.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_JnsMtr.Enabled = False
Me.Txt_JnsMtr.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Txt_JnsMtr.Location = New System.Drawing.Point(352, 56)
Me.Txt_JnsMtr.MaxLength = 10
Me.Txt_JnsMtr.Name = "Txt_JnsMtr"
Me.Txt_JnsMtr.TabIndex = 71
Me.Txt_JnsMtr.Text = ""
'
'Label13
'
Me.Label13.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label13.Location = New System.Drawing.Point(336, 24)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(16, 23)
Me.Label13.TabIndex = 74
Me.Label13.Text = ":"
'
'Label7
'
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.Location = New System.Drawing.Point(248, 24)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(80, 23)
Me.Label7.TabIndex = 72
Me.Label7.Text = "No. Polisi"
'
'Label5
'
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(248, 56)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(80, 23)
Me.Label5.TabIndex = 70
Me.Label5.Text = "Jenis Motor"
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.Location = New System.Drawing.Point(336, 56)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(16, 23)
Me.Label11.TabIndex = 73
Me.Label11.Text = ":"
'
'Wo
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(768, 398)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox5)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label1)
Me.Name = "Wo"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region
Function bersih()
txt_NoWo.Text = ""
Txt_NoSAF.Text = ""
Txt_advisor.Text = ""
txt_jam.Text = ""
Txt_JnsMtr.Text = ""
txt_kdpaket.Text = ""
Txt_mekanik.Text = ""
txt_NmPaket.Text = ""
txt_Nopol.Text = ""
dtpicker1.Value = Now()
End Function
Function tambah_kdWo()

Dim No As String
SQL = "SELECT MAX(RIGHT(No_Wo,5)) FROM wo"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Not Reader.Read Then
txt_NoWo.Text = "00001"
Else
No = CInt(Reader.GetString(0)) + 1
If No.Trim.Length = 1 Then txt_NoWo.Text = "0000" &
No
If No.Trim.Length = 2 Then txt_NoWo.Text = "000" &
No
If No.Trim.Length = 3 Then txt_NoWo.Text = "00" & No
If No.Trim.Length = 4 Then txt_NoWo.Text = "0" & No
If No.Trim.Length = 5 Then txt_NoWo.Text = No

End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal menambah
data")
Finally
Reader.Close()
End Try
Connect.Close()

txt_NoWo.Enabled = False
Btn_CariSaf.Focus()

End Function

Function simpan()
SQL = "INSERT INTO WO VALUES('" & txt_NoWo.Text & "','" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "','" & txt_jam.Text &
"','" & Txt_NoSAF.Text & "')"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data Berhasil Disimpan",
MsgBoxStyle.Information, "Informasi")
End If
Me.bersih()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
Connect.Close()
End Function
Function utkcari_SAF()

Dim form As New CariSAF2


form.ShowDialog()
Txt_NoSAF.Text = form.kode
If Txt_NoSAF.Text <> "" Then
Me.tampilkan_SAF()
Btn_CariSaf.Enabled = False
Else
Me.tambah_kdWo()
End If
End Function
Function tampilkan_SAF()
Dim index1 As String
SQL = "select saf.no_saf, saf.tgl_saf, saf.jam_masuk,
saf.no_pol, motor.jns_mtr, mekanik.nm_mekanik,
paket_service.nm_paket, paket_service.hrg_paket, advisor.nm_advisor
" & _
"from(SAF) inner join motor on motor.no_pol =
saf.no_pol " & _
"inner join mekanik on mekanik.id_mekanik =
saf.id_mekanik " & _
"inner join paket_service on paket_service.kd_paket
= saf.kd_paket " & _
"inner join advisor on advisor.id_advisor =
saf.id_advisor " & _
"where saf.no_saf not in(select wo.no_saf from wo)
&& saf.tgl_saf = now() && saf.no_saf = '" & Txt_NoSAF.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
Txt_NoSAF.Text = Reader.GetString(0)
txt_tglsaf.Text = Reader.GetString(1)
txt_jam_masuk.Text = Reader.GetString(2)
txt_Nopol.Text = Reader.GetString(3)
Txt_JnsMtr.Text = Reader.GetString(4)
Txt_mekanik.Text = Reader.GetString(5)
txt_kdpaket.Text = Reader.GetString(6)
txt_NmPaket.Text = Reader.GetString(7)
Txt_advisor.Text = Reader.GetString(8)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
txt_NoWo.Enabled = False
End Function
Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Btn_tmbh.Click
Me.tambah_kdWo()
Btn_tmbh.Enabled = False
Btn_CariSaf.Enabled = True
Btn_btal.Enabled = True

End Sub

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click
txt_NoWo.Text = ""
txt_Nopol.Text = ""
Txt_NoSAF.Text = ""
Txt_advisor.Text = ""
txt_jam_masuk.Text = ""
Txt_JnsMtr.Text = ""
txt_kdpaket.Text = ""
Txt_mekanik.Text = ""
txt_NmPaket.Text = ""
txt_tglsaf.Text = ""
Btn_smpan.Enabled = False
Btn_tmbh.Enabled = True
Btn_btal.Enabled = False
End Sub

Private Sub Btn_CariSaf_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_CariSaf.Click
Me.utkcari_SAF()
Btn_smpan.Enabled = True
End Sub

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


System.EventArgs) Handles MyBase.Load
Btn_smpan.Enabled = False
Btn_CariSaf.Enabled = False
Timer1.Start()
End Sub

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


As System.EventArgs) Handles Timer1.Tick
txt_jam.Text = Format(Now, "HH : mm : ss")
End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Me.simpan()
Btn_tmbh.Enabled = True
Btn_smpan.Enabled = False
End Sub
End Class

TRANSAKSI KWITANSI
Imports MySql.Data.MySqlClient
Public Class CetakKW
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents txt_Nopol As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents tglKwt As System.Windows.Forms.DateTimePicker
Friend WithEvents Btn_Cari As System.Windows.Forms.Button
Friend WithEvents btncetak As System.Windows.Forms.Button
Friend WithEvents Label12 As System.Windows.Forms.Label
Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents Btn_smpan As System.Windows.Forms.Button
Friend WithEvents Btn_btal As System.Windows.Forms.Button
Friend WithEvents Btn_tmbh As System.Windows.Forms.Button
Friend WithEvents txt_NoSAF As System.Windows.Forms.TextBox
Friend WithEvents Txt_NoKW As System.Windows.Forms.TextBox
Friend WithEvents btn_cari_sprt As System.Windows.Forms.Button
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents txt_biayaservice As
System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(CetakKW))
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Btn_Cari = New System.Windows.Forms.Button
Me.tglKwt = New System.Windows.Forms.DateTimePicker
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.txt_biayaservice = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.txt_Nopol = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.txt_NoSAF = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Txt_NoKW = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.Label12 = New System.Windows.Forms.Label
Me.btncetak = New System.Windows.Forms.Button
Me.GroupBox5 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.Btn_smpan = New System.Windows.Forms.Button
Me.Btn_btal = New System.Windows.Forms.Button
Me.Btn_tmbh = New System.Windows.Forms.Button
Me.btn_cari_sprt = New System.Windows.Forms.Button
Me.txt_counter = New System.Windows.Forms.TextBox
Me.GroupBox1.SuspendLayout()
Me.GroupBox5.SuspendLayout()
Me.SuspendLayout()
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(144, 16)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(312, 32)
Me.Label11.TabIndex = 11
Me.Label11.Text = "Entry Kwitansi"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Btn_Cari)
Me.GroupBox1.Controls.Add(Me.tglKwt)
Me.GroupBox1.Controls.Add(Me.Label10)
Me.GroupBox1.Controls.Add(Me.Label9)
Me.GroupBox1.Controls.Add(Me.txt_biayaservice)
Me.GroupBox1.Controls.Add(Me.Label5)
Me.GroupBox1.Controls.Add(Me.Label6)
Me.GroupBox1.Controls.Add(Me.txt_Nopol)
Me.GroupBox1.Controls.Add(Me.Label7)
Me.GroupBox1.Controls.Add(Me.txt_NoSAF)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.Label8)
Me.GroupBox1.Controls.Add(Me.Txt_NoKW)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.FlatStyle =
System.Windows.Forms.FlatStyle.Popup
Me.GroupBox1.Location = New System.Drawing.Point(16, 64)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(576, 120)
Me.GroupBox1.TabIndex = 12
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Data Kwitansi"
'
'Btn_Cari
'
Me.Btn_Cari.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Cari.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Cari.Location = New System.Drawing.Point(504, 32)
Me.Btn_Cari.Name = "Btn_Cari"
Me.Btn_Cari.Size = New System.Drawing.Size(56, 32)
Me.Btn_Cari.TabIndex = 1
Me.Btn_Cari.Text = "Cari"
'
'tglKwt
'
Me.tglKwt.Font = New System.Drawing.Font("Arial Unicode MS",
8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.tglKwt.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.tglKwt.Location = New System.Drawing.Point(128, 56)
Me.tglKwt.Name = "tglKwt"
Me.tglKwt.Size = New System.Drawing.Size(88, 22)
Me.tglKwt.TabIndex = 2
Me.tglKwt.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'Label10
'
Me.Label10.Location = New System.Drawing.Point(112, 56)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(16, 23)
Me.Label10.TabIndex = 23
Me.Label10.Text = ":"
'
'Label9
'
Me.Label9.Location = New System.Drawing.Point(16, 56)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(96, 23)
Me.Label9.TabIndex = 22
Me.Label9.Text = "Tanggal Kwitansi"
'
'txt_biayaservice
'
Me.txt_biayaservice.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_biayaservice.Enabled = False
Me.txt_biayaservice.Location = New System.Drawing.Point(392,
88)
Me.txt_biayaservice.MaxLength = 6
Me.txt_biayaservice.Name = "txt_biayaservice"
Me.txt_biayaservice.Size = New System.Drawing.Size(120, 20)
Me.txt_biayaservice.TabIndex = 6
Me.txt_biayaservice.Text = ""
'
'Label5
'
Me.Label5.Location = New System.Drawing.Point(264, 88)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(104, 23)
Me.Label5.TabIndex = 19
Me.Label5.Text = "Total Biayar"
'
'Label6
'
Me.Label6.Location = New System.Drawing.Point(376, 88)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(16, 23)
Me.Label6.TabIndex = 21
Me.Label6.Text = ":"
'
'txt_Nopol
'
Me.txt_Nopol.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_Nopol.Enabled = False
Me.txt_Nopol.Location = New System.Drawing.Point(392, 56)
Me.txt_Nopol.MaxLength = 10
Me.txt_Nopol.Name = "txt_Nopol"
Me.txt_Nopol.Size = New System.Drawing.Size(88, 20)
Me.txt_Nopol.TabIndex = 17
Me.txt_Nopol.Text = ""
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(264, 56)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(104, 23)
Me.Label7.TabIndex = 18
Me.Label7.Text = "No. Polisi"
'
'txt_NoSAF
'
Me.txt_NoSAF.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_NoSAF.Enabled = False
Me.txt_NoSAF.Location = New System.Drawing.Point(392, 24)
Me.txt_NoSAF.MaxLength = 7
Me.txt_NoSAF.Name = "txt_NoSAF"
Me.txt_NoSAF.Size = New System.Drawing.Size(64, 20)
Me.txt_NoSAF.TabIndex = 15
Me.txt_NoSAF.Text = ""
'
'Label3
'
Me.Label3.Location = New System.Drawing.Point(264, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(104, 23)
Me.Label3.TabIndex = 14
Me.Label3.Text = "No. SAF"
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(376, 24)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(16, 23)
Me.Label4.TabIndex = 16
Me.Label4.Text = ":"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(376, 56)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(16, 23)
Me.Label1.TabIndex = 13
Me.Label1.Text = ":"
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(112, 24)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(16, 23)
Me.Label8.TabIndex = 12
Me.Label8.Text = ":"
'
'Txt_NoKW
'
Me.Txt_NoKW.Enabled = False
Me.Txt_NoKW.Location = New System.Drawing.Point(128, 24)
Me.Txt_NoKW.MaxLength = 5
Me.Txt_NoKW.Name = "Txt_NoKW"
Me.Txt_NoKW.Size = New System.Drawing.Size(64, 20)
Me.Txt_NoKW.TabIndex = 3
Me.Txt_NoKW.Text = ""
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(16, 24)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(88, 23)
Me.Label2.TabIndex = 2
Me.Label2.Text = "No. Kwitansi"
'
'Label12
'
Me.Label12.Font = New System.Drawing.Font("Microsoft Sans
Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label12.ImageAlign =
System.Drawing.ContentAlignment.MiddleLeft
Me.Label12.Location = New System.Drawing.Point(216, 16)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(48, 23)
Me.Label12.TabIndex = 42
Me.Label12.Text = "CETAK"
Me.Label12.TextAlign =
System.Drawing.ContentAlignment.MiddleLeft
'
'btncetak
'
Me.btncetak.Font = New System.Drawing.Font("Arial", 12.0!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point,
CType(0, Byte))
Me.btncetak.Image =
CType(resources.GetObject("btncetak.Image"), System.Drawing.Image)
Me.btncetak.ImageAlign =
System.Drawing.ContentAlignment.TopCenter
Me.btncetak.Location = New System.Drawing.Point(216, 40)
Me.btncetak.Name = "btncetak"
Me.btncetak.Size = New System.Drawing.Size(48, 56)
Me.btncetak.TabIndex = 3
Me.btncetak.TextAlign =
System.Drawing.ContentAlignment.BottomCenter
'
'GroupBox5
'
Me.GroupBox5.Controls.Add(Me.Btn_Keluar)
Me.GroupBox5.Controls.Add(Me.Btn_smpan)
Me.GroupBox5.Controls.Add(Me.Btn_btal)
Me.GroupBox5.Controls.Add(Me.Btn_tmbh)
Me.GroupBox5.Controls.Add(Me.Label12)
Me.GroupBox5.Controls.Add(Me.btncetak)
Me.GroupBox5.Location = New System.Drawing.Point(144, 192)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(280, 112)
Me.GroupBox5.TabIndex = 15
Me.GroupBox5.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(112, 64)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(80, 32)
Me.Btn_Keluar.TabIndex = 6
Me.Btn_Keluar.Text = "&Keluar"
'
'Btn_smpan
'
Me.Btn_smpan.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_smpan.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_smpan.Location = New System.Drawing.Point(112, 16)
Me.Btn_smpan.Name = "Btn_smpan"
Me.Btn_smpan.Size = New System.Drawing.Size(80, 32)
Me.Btn_smpan.TabIndex = 4
Me.Btn_smpan.Text = "&Simpan"
'
'Btn_btal
'
Me.Btn_btal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_btal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_btal.Location = New System.Drawing.Point(16, 64)
Me.Btn_btal.Name = "Btn_btal"
Me.Btn_btal.Size = New System.Drawing.Size(80, 32)
Me.Btn_btal.TabIndex = 5
Me.Btn_btal.Text = "&Batal"
'
'Btn_tmbh
'
Me.Btn_tmbh.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_tmbh.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_tmbh.Location = New System.Drawing.Point(16, 16)
Me.Btn_tmbh.Name = "Btn_tmbh"
Me.Btn_tmbh.Size = New System.Drawing.Size(80, 32)
Me.Btn_tmbh.TabIndex = 0
Me.Btn_tmbh.Text = "&Tambah"
'
'btn_cari_sprt
'
Me.btn_cari_sprt.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_cari_sprt.Font = New System.Drawing.Font("Microsoft
Sans Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_cari_sprt.Location = New System.Drawing.Point(16,
184)
Me.btn_cari_sprt.Name = "btn_cari_sprt"
Me.btn_cari_sprt.Size = New System.Drawing.Size(56, 32)
Me.btn_cari_sprt.TabIndex = 6
Me.btn_cari_sprt.Text = "Cari"
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(80, 16)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(24, 20)
Me.txt_counter.TabIndex = 24
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'CetakKW
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(610, 320)
Me.Controls.Add(Me.GroupBox5)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.txt_counter)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CetakKW"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox5.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Function simpan()

SQL = "INSERT INTO kwitansi VALUES('" & Txt_NoKW.Text &


"','" & txt_NoSAF.Text & "','" & Format(tglKwt.Value.Date, "yyyy-MM-
dd") & "')"
Try
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Command = New MySqlCommand(SQL, Connect)
ResultSet = Command.ExecuteNonQuery
If ResultSet > 0 Then
MsgBox("Data berhasil disimpan",
MsgBoxStyle.Information, "Informasi")
End If
MsgBox("Silakan Cetak Kwitansi...!",
MsgBoxStyle.Exclamation, "Informasi")
btncetak.Focus()
btncetak.Enabled = True
Btn_Cari.Enabled = False
Btn_tmbh.Enabled = True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal")
End Try
Connect.Close()

End Function

Function utkcari_saf()

Dim form As New CariSAF


form.ShowDialog()
txt_NoSAF.Text = form.kode
If txt_NoSAF.Text <> "" Then
Me.tampilkan_saf()
Btn_Cari.Enabled = False

End If

End Function
Function tampilkan_saf()

SQL = "SELECT no_saf, no_pol, tot_biaya_service FROM saf


WHERE no_saf= '" & txt_NoSAF.Text & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Reader.Read = True Then
txt_NoSAF.Text = Reader.GetString(0)
txt_Nopol.Text = Reader.GetString(1)
txt_biayaservice.Text = Reader.GetString(2)

Btn_smpan.Enabled = True
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()

End Function

Private Sub Btn_tmbh_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_tmbh.Click

Dim No As String
SQL = "SELECT MAX(RIGHT(No_kwitansi,3)) FROM kwitansi"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
If Not Reader.Read Then
Txt_NoKW.Text = "KW001"
Else
No = CInt(Reader.GetString(0)) + 1
If No.Trim.Length = 1 Then Txt_NoKW.Text = "KW00" &
No
If No.Trim.Length = 2 Then Txt_NoKW.Text = "KW0" &
No
If No.Trim.Length = 3 Then Txt_NoKW.Text = No
tglKwt.Enabled = True
Btn_Cari.Focus()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Gagal menambah
data")
Finally
Reader.Close()
End Try
Connect.Close()
tglKwt.Value = Now()
Btn_Cari.Enabled = True
Btn_smpan.Enabled = False
Btn_tmbh.Enabled = False
Btn_btal.Enabled = True

End Sub

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub

Private Sub Btn_btal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_btal.Click

Call bersih()
tglKwt.Enabled = False
Btn_tmbh.Enabled = True
Btn_Cari.Enabled = False
Btn_smpan.Enabled = False
Btn_btal.Enabled = False
End Sub

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


As System.EventArgs) Handles MyBase.Load

tglKwt.Enabled = False
Btn_tmbh.Enabled = True
Btn_Cari.Enabled = False
Btn_smpan.Enabled = False
Btn_btal.Enabled = False
btncetak.Enabled = False
mToolTip.SetToolTip(Btn_btal, "Batal Input Data")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
mToolTip.SetToolTip(Btn_smpan, "Simpan Data Kwitansi")
mToolTip.SetToolTip(Btn_tmbh, "Menambah Data Kwitansi")
mToolTip.SetToolTip(Btn_Cari, "Cari Data SAF")
mToolTip.SetToolTip(btncetak, "Cetak Kwitansi")
End Sub

Function bersih()

Txt_NoKW.Text = ""
tglKwt.Value = Now()
txt_NoSAF.Text = ""
txt_Nopol.Text = ""
txt_biayaservice.Text = ""
txt_NoSAF.Text = ""
txt_Nopol.Text = ""

End Function
Private Sub Btn_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Btn_Cari.Click
Me.utkcari_saf()
Me.tampilkan_saf()
Btn_Cari.Enabled = False

End Sub

Private Sub Btn_smpan_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles Btn_smpan.Click
Call simpan()
'Call bersih()
Btn_smpan.Enabled = False
Btn_btal.Enabled = False

End Sub
Function cetak()
SQL = "SELECT saf.*, motor.no_rangka, motor.no_mesin,
motor.warna, motor.type_mtr, motor.tahun, motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
"mekanik.nm_mekanik, mekanik.tlp as tlp_mekanik,
advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
"service.*, isi.biaya_service,
kwitansi.no_kwitansi, kwitansi.tgl_kwitansi FROM(saf) " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol "
& _
"INNER JOIN paket_service ON
paket_service.kd_paket = saf.kd_paket " & _
"INNER JOIN mekanik ON mekanik.id_mekanik =
saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor =
saf.id_advisor " & _
"INNER JOIN isi ON saf.no_saf = isi.no_saf " & _
"INNER JOIN service ON service.kd_service =
isi.kd_service " & _
"INNER JOIN kwitansi ON kwitansi.no_saf =
saf.no_saf " & _
"WHERE kwitansi.no_kwitansi = '" & Txt_NoKW.Text
& "' && saf.no_saf= '" & txt_NoSAF.Text & "' "

Adapter = New MySqlDataAdapter(SQL, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

Try

If Connect.State = ConnectionState.Closed Then


Connect.Open()
SQLDetil = "SELECT saf.*, motor.no_rangka,
motor.no_mesin, motor.warna, motor.type_mtr, motor.tahun,
motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
"mekanik.nm_mekanik, mekanik.tlp as tlp_mekanik,
advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
"kwitansi.no_kwitansi, kwitansi.tgl_kwitansi
FROM(paket_service) " & _
"INNER JOIN saf ON paket_service.kd_paket =
saf.kd_paket " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol "
& _
"INNER JOIN mekanik ON mekanik.id_mekanik =
saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor =
saf.id_advisor " & _
"INNER JOIN kwitansi ON kwitansi.no_saf =
saf.no_saf " & _
"WHERE kwitansi.no_kwitansi = '" & Txt_NoKW.Text
& "' && saf.no_saf= '" & txt_NoSAF.Text & "' "

Adapter = New MySqlDataAdapter(SQLDetil, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

SQL = "SELECT saf.*, motor.no_rangka, motor.no_mesin,


motor.warna, motor.type_mtr, motor.tahun, motor.pemilik, " & _
"motor.alamat, motor.telp, motor.jns_mtr,
paket_service.nm_paket, paket_service.hrg_paket, " & _
"mekanik.nm_mekanik, mekanik.tlp as tlp_mekanik,
advisor.nm_advisor, advisor.tlp as tlp_advisor, " & _
"sparepart.*, dapat.no_saf, dapat.jumlah_sprt,
dapat.jml_harga_sprt, kwitansi.no_kwitansi, kwitansi.tgl_kwitansi
FROM(dapat) " & _
"INNER JOIN saf ON dapat.no_saf = saf.no_saf " &
_
"INNER JOIN sparepart ON sparepart.kd_sprt =
dapat.kd_sprt " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol "
& _
"INNER JOIN paket_service ON
paket_service.kd_paket = saf.kd_paket " & _
"INNER JOIN mekanik ON mekanik.id_mekanik =
saf.id_mekanik " & _
"INNER JOIN advisor ON advisor.id_advisor =
saf.id_advisor " & _
"INNER JOIN kwitansi ON kwitansi.no_saf =
saf.no_saf " & _
"WHERE kwitansi.no_kwitansi = '" & Txt_NoKW.Text
& "' && saf.no_saf= '" & txt_NoSAF.Text & "' "

Adapter = New MySqlDataAdapter(SQL, Connect)


Adapter.Fill(DataSet)
Adapter.Dispose()

DataSet.WriteXml("Kwitansi1.xml",
XmlWriteMode.WriteSchema)

Catch ex As Exception
MsgBox(ex.Message.ToString())
Finally
Adapter.Dispose()
DataSet.Clear()
End Try
Connect.Close()

Form = New Cetak("..\CKwitansi.rpt", "")


Form.StartPosition = FormStartPosition.CenterScreen
Form.WindowState = FormWindowState.Maximized
Form.ShowDialog()
End Function

Private Sub btncetak_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btncetak.Click
Me.cetak()
Call bersih()
tglKwt.Enabled = False
Btn_tmbh.Enabled = True
Btn_Cari.Enabled = False
Btn_smpan.Enabled = False
Btn_btal.Enabled = False
End Sub

'Private Sub Button1_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs)

' Call tot_bayar()


' Btn_smpan.Enabled = True

'End Sub

End Class

CETAK LAPORAN PAKET SERVICE


Imports MySql.Data.MySqlClient
Public Class CLapPaketService
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents btn_batal As System.Windows.Forms.Button
Friend WithEvents Btn_Ctk As System.Windows.Forms.Button
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents dtpicker2 As
System.Windows.Forms.DateTimePicker
Friend WithEvents dtpicker1 As
System.Windows.Forms.DateTimePicker
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.btn_batal = New System.Windows.Forms.Button
Me.Btn_Ctk = New System.Windows.Forms.Button
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.dtpicker2 = New System.Windows.Forms.DateTimePicker
Me.dtpicker1 = New System.Windows.Forms.DateTimePicker
Me.Label1 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox2.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.btn_batal)
Me.GroupBox2.Controls.Add(Me.Btn_Ctk)
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Location = New System.Drawing.Point(40, 128)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(291, 72)
Me.GroupBox2.TabIndex = 23
Me.GroupBox2.TabStop = False
'
'btn_batal
'
Me.btn_batal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_batal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_batal.Location = New System.Drawing.Point(104, 23)
Me.btn_batal.Name = "btn_batal"
Me.btn_batal.Size = New System.Drawing.Size(75, 32)
Me.btn_batal.TabIndex = 21
Me.btn_batal.Text = "&Batal"
'
'Btn_Ctk
'
Me.Btn_Ctk.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_Ctk.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Ctk.Location = New System.Drawing.Point(16, 23)
Me.Btn_Ctk.Name = "Btn_Ctk"
Me.Btn_Ctk.Size = New System.Drawing.Size(75, 32)
Me.Btn_Ctk.TabIndex = 20
Me.Btn_Ctk.Text = "&Cetak"
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(200, 24)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 14
Me.Btn_Keluar.Text = "&Keluar"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.dtpicker2)
Me.GroupBox1.Controls.Add(Me.dtpicker1)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(48, 64)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(272, 56)
Me.GroupBox1.TabIndex = 22
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Periode"
'
'dtpicker2
'
Me.dtpicker2.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker2.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker2.Location = New System.Drawing.Point(160, 24)
Me.dtpicker2.Name = "dtpicker2"
Me.dtpicker2.Size = New System.Drawing.Size(88, 22)
Me.dtpicker2.TabIndex = 15
Me.dtpicker2.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'dtpicker1
'
Me.dtpicker1.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker1.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker1.Location = New System.Drawing.Point(24, 24)
Me.dtpicker1.Name = "dtpicker1"
Me.dtpicker1.Size = New System.Drawing.Size(88, 22)
Me.dtpicker1.TabIndex = 14
Me.dtpicker1.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(120, 29)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(32, 16)
Me.Label1.TabIndex = 12
Me.Label1.Text = "[s/d]"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(24, 16)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(328, 32)
Me.Label11.TabIndex = 21
Me.Label11.Text = "Laporan Paket Service"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'CLapPaketService
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(376, 222)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CLapPaketService"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub
#End Region

Private Sub CLapPaketService_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
dtpicker1.Focus()
dtpicker1.Value = Now()
dtpicker2.Value = Now
mToolTip.SetToolTip(Btn_Ctk, "Cetak Laporan Service Lain")
mToolTip.SetToolTip(btn_batal, "Batal Cetak Laporan")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
End Sub
Private Sub btn_batal_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btn_batal.Click
dtpicker1.Value = Now()
dtpicker2.Value = Now()
dtpicker1.Focus()
End Sub

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


As System.EventArgs) Handles Btn_Ctk.Click
SQL = "SELECT distinct saf.*, kwitansi.no_kwitansi,
kwitansi.tgl_kwitansi, paket_service.nm_paket,
paket_service.hrg_paket, " & _
"motor.* FROM saf INNER JOIN kwitansi ON
kwitansi.no_saf = saf.no_saf " & _
"INNER JOIN paket_service ON paket_service.kd_paket
= saf.kd_paket " & _
"INNER JOIN motor ON motor.no_pol = saf.no_pol " & _
"WHERE kwitansi.tgl_kwitansi BETWEEN '" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "' && '" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Adapter = New MySqlDataAdapter(SQL, Connect)
Adapter.Fill(DataSet)
DataSet.WriteXml("LapPaketService.xml",
XmlWriteMode.WriteSchema)
Catch ex As Exception
MsgBox(ex.Message.ToString())
Finally
Adapter.Dispose()
DataSet.Clear()
End Try
Connect.Close()
Dim Frm As New Form
Frm = New CLaporan(New LapPaketService,
dtpicker1.Value.Date, dtpicker2.Value.Date, "{table.tgl_kwitansi} in
#" & Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "# to #" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "#")
Frm.StartPosition = FormStartPosition.CenterScreen
Frm.WindowState = FormWindowState.Maximized
Frm.Show()

End Sub

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub
End Class

CETAK LAPORAN SERVICE LAIN


Imports MySql.Data.MySqlClient
Public Class CLapServiceLain
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents dtpicker2 As
System.Windows.Forms.DateTimePicker
Friend WithEvents dtpicker1 As
System.Windows.Forms.DateTimePicker
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents btn_batal As System.Windows.Forms.Button
Friend WithEvents Btn_Ctk As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.btn_batal = New System.Windows.Forms.Button
Me.Btn_Ctk = New System.Windows.Forms.Button
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.dtpicker2 = New System.Windows.Forms.DateTimePicker
Me.dtpicker1 = New System.Windows.Forms.DateTimePicker
Me.Label1 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox2.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.btn_batal)
Me.GroupBox2.Controls.Add(Me.Btn_Ctk)
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Location = New System.Drawing.Point(32, 136)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(291, 72)
Me.GroupBox2.TabIndex = 20
Me.GroupBox2.TabStop = False
'
'btn_batal
'
Me.btn_batal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_batal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_batal.Location = New System.Drawing.Point(104, 23)
Me.btn_batal.Name = "btn_batal"
Me.btn_batal.Size = New System.Drawing.Size(75, 32)
Me.btn_batal.TabIndex = 21
Me.btn_batal.Text = "&Batal"
'
'Btn_Ctk
'
Me.Btn_Ctk.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_Ctk.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Ctk.Location = New System.Drawing.Point(16, 23)
Me.Btn_Ctk.Name = "Btn_Ctk"
Me.Btn_Ctk.Size = New System.Drawing.Size(75, 32)
Me.Btn_Ctk.TabIndex = 20
Me.Btn_Ctk.Text = "&Cetak"
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(200, 24)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 14
Me.Btn_Keluar.Text = "&Keluar"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.dtpicker2)
Me.GroupBox1.Controls.Add(Me.dtpicker1)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(40, 72)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(272, 56)
Me.GroupBox1.TabIndex = 19
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Periode"
'
'dtpicker2
'
Me.dtpicker2.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker2.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker2.Location = New System.Drawing.Point(160, 24)
Me.dtpicker2.Name = "dtpicker2"
Me.dtpicker2.Size = New System.Drawing.Size(88, 22)
Me.dtpicker2.TabIndex = 15
Me.dtpicker2.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'dtpicker1
'
Me.dtpicker1.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker1.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker1.Location = New System.Drawing.Point(24, 24)
Me.dtpicker1.Name = "dtpicker1"
Me.dtpicker1.Size = New System.Drawing.Size(88, 22)
Me.dtpicker1.TabIndex = 14
Me.dtpicker1.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(120, 29)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(32, 16)
Me.Label1.TabIndex = 12
Me.Label1.Text = "[s/d]"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(16, 24)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(328, 32)
Me.Label11.TabIndex = 18
Me.Label11.Text = "Laporan Service Lain"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'CLapServiceLain
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(368, 230)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CLapServiceLain"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub btn_batal_Click(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles btn_batal.Click
dtpicker1.Value = Now()
dtpicker2.Value = Now()
dtpicker1.Focus()
End Sub

Private Sub CLapServiceLain_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
dtpicker1.Focus()
dtpicker1.Value = Now()
dtpicker2.Value = Now
mToolTip.SetToolTip(Btn_Ctk, "Cetak Laporan Service Lain")
mToolTip.SetToolTip(btn_batal, "Batal Cetak Laporan")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
End Sub

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


As System.EventArgs) Handles Btn_Ctk.Click
SQL = "SELECT distinct saf.*, kwitansi.no_kwitansi,
kwitansi.tgl_kwitansi, isi.biaya_service, service.*, motor.* " & _
"FROM saf INNER JOIN kwitansi ON kwitansi.no_saf =
saf.no_saf INNER JOIN isi ON isi.no_saf = saf.no_saf " & _
"INNER JOIN service ON isi.kd_service =
service.kd_service INNER JOIN motor ON motor.no_pol = saf.no_pol " &
_
"WHERE kwitansi.tgl_kwitansi BETWEEN '" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "' && '" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Adapter = New MySqlDataAdapter(SQL, Connect)
Adapter.Fill(DataSet)
DataSet.WriteXml("LapServiceLain.xml",
XmlWriteMode.WriteSchema)
Catch ex As Exception
MsgBox(ex.Message.ToString())
Finally
Adapter.Dispose()
DataSet.Clear()
End Try
Connect.Close()
Dim Frm As New Form
Frm = New CLaporan(New LapServiceLain, dtpicker1.Value.Date,
dtpicker2.Value.Date, "{table.tgl_kwitansi} in #" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "# to #" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "#")
Frm.StartPosition = FormStartPosition.CenterScreen
Frm.WindowState = FormWindowState.Maximized
Frm.Show()

End Sub

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub
End Class

CETAK LAPORAN PENJUALAN SPAREPART


Imports MySql.Data.MySqlClient
Public Class CLapPenjSprt
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents dtpicker2 As
System.Windows.Forms.DateTimePicker
Friend WithEvents dtpicker1 As
System.Windows.Forms.DateTimePicker
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents btn_batal As System.Windows.Forms.Button
Friend WithEvents Btn_Ctk As System.Windows.Forms.Button
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents Btn_Keluar As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Label11 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.dtpicker2 = New System.Windows.Forms.DateTimePicker
Me.dtpicker1 = New System.Windows.Forms.DateTimePicker
Me.Label1 = New System.Windows.Forms.Label
Me.btn_batal = New System.Windows.Forms.Button
Me.Btn_Ctk = New System.Windows.Forms.Button
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.Btn_Keluar = New System.Windows.Forms.Button
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'Label11
'
Me.Label11.Font = New System.Drawing.Font("Monotype
Corsiva", 21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.ForeColor = System.Drawing.Color.DarkRed
Me.Label11.Location = New System.Drawing.Point(16, 8)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(328, 32)
Me.Label11.TabIndex = 13
Me.Label11.Text = "Laporan Penjualan Sparepart"
Me.Label11.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.dtpicker2)
Me.GroupBox1.Controls.Add(Me.dtpicker1)
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Location = New System.Drawing.Point(40, 56)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(272, 56)
Me.GroupBox1.TabIndex = 16
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Periode"
'
'dtpicker2
'
Me.dtpicker2.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker2.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker2.Location = New System.Drawing.Point(160, 24)
Me.dtpicker2.Name = "dtpicker2"
Me.dtpicker2.Size = New System.Drawing.Size(88, 22)
Me.dtpicker2.TabIndex = 15
Me.dtpicker2.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'dtpicker1
'
Me.dtpicker1.Font = New System.Drawing.Font("Arial Unicode
MS", 8.25!, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtpicker1.Format =
System.Windows.Forms.DateTimePickerFormat.Short
Me.dtpicker1.Location = New System.Drawing.Point(24, 24)
Me.dtpicker1.Name = "dtpicker1"
Me.dtpicker1.Size = New System.Drawing.Size(88, 22)
Me.dtpicker1.TabIndex = 14
Me.dtpicker1.Value = New Date(2008, 6, 9, 0, 0, 0, 0)
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(120, 29)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(32, 16)
Me.Label1.TabIndex = 12
Me.Label1.Text = "[s/d]"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'btn_batal
'
Me.btn_batal.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.btn_batal.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_batal.Location = New System.Drawing.Point(136, 144)
Me.btn_batal.Name = "btn_batal"
Me.btn_batal.Size = New System.Drawing.Size(75, 32)
Me.btn_batal.TabIndex = 19
Me.btn_batal.Text = "&Batal"
'
'Btn_Ctk
'
Me.Btn_Ctk.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.Btn_Ctk.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Ctk.Location = New System.Drawing.Point(48, 144)
Me.Btn_Ctk.Name = "Btn_Ctk"
Me.Btn_Ctk.Size = New System.Drawing.Size(75, 32)
Me.Btn_Ctk.TabIndex = 18
Me.Btn_Ctk.Text = "&Cetak"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Btn_Keluar)
Me.GroupBox2.Location = New System.Drawing.Point(30, 120)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(291, 72)
Me.GroupBox2.TabIndex = 17
Me.GroupBox2.TabStop = False
'
'Btn_Keluar
'
Me.Btn_Keluar.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Btn_Keluar.Font = New System.Drawing.Font("Microsoft Sans
Serif", 9.75!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Btn_Keluar.Location = New System.Drawing.Point(200, 24)
Me.Btn_Keluar.Name = "Btn_Keluar"
Me.Btn_Keluar.Size = New System.Drawing.Size(75, 32)
Me.Btn_Keluar.TabIndex = 14
Me.Btn_Keluar.Text = "&Keluar"
'
'LapPenjSprt
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(360, 211)
Me.Controls.Add(Me.btn_batal)
Me.Controls.Add(Me.Btn_Ctk)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label11)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "LapPenjSprt"
Me.Text = "AHASS TUGU PERMAI"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

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


As System.EventArgs) Handles Btn_Ctk.Click
SQL = "SELECT distinct saf.*, kwitansi.no_kwitansi,
kwitansi.tgl_kwitansi, dapat.jumlah_sprt, dapat.jml_harga_sprt, " &
_
"motor.*, sparepart.* FROM saf INNER JOIN kwitansi
ON kwitansi.no_saf = saf.no_saf " & _
"INNER JOIN dapat ON dapat.no_saf = saf.no_saf INNER
JOIN motor ON motor.no_pol = saf.no_pol " & _
"INNER JOIN sparepart ON sparepart.kd_sprt =
dapat.kd_sprt " & _
"WHERE kwitansi.tgl_kwitansi BETWEEN '" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "' && '" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "'"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Adapter = New MySqlDataAdapter(SQL, Connect)
Adapter.Fill(DataSet)
DataSet.WriteXml("LapPenjSprt.xml",
XmlWriteMode.WriteSchema)
Catch ex As Exception
MsgBox(ex.Message.ToString())
Finally
Adapter.Dispose()
DataSet.Clear()
End Try
Connect.Close()
Dim Frm As New Form
Frm = New CLaporan(New LapSparepart, dtpicker1.Value.Date,
dtpicker2.Value.Date, "{table.tgl_kwitansi} in #" &
Format(dtpicker1.Value.Date, "yyyy-MM-dd") & "# to #" &
Format(dtpicker2.Value.Date, "yyyy-MM-dd") & "#")
Frm.StartPosition = FormStartPosition.CenterScreen
Frm.WindowState = FormWindowState.Maximized
Frm.Show()
End Sub

Private Sub btn_batal_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles btn_batal.Click
dtpicker1.Value = Now()
dtpicker2.Value = Now()
dtpicker1.Focus()
End Sub

Private Sub LapPenjSprt_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles MyBase.Load
dtpicker1.Focus()
dtpicker1.Value = Now()
dtpicker2.Value = Now
mToolTip.SetToolTip(Btn_Ctk, "Cetak Laporan Penjualan
Sparepart")
mToolTip.SetToolTip(btn_batal, "Batal Cetak Laporan")
mToolTip.SetToolTip(Btn_Keluar, "Keluar Dari Form")
End Sub

Private Sub Btn_Keluar_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Btn_Keluar.Click
Me.Close()
End Sub
End Class
CARI PAKET SERVICE
Imports MySql.Data.MySqlClient
Public Class CariPaketService
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader7 As
System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader7 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(24, 40)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 24
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(214, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 32)
Me.Label1.TabIndex = 23
Me.Label1.Text = "Data Paket Service"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader5, Me.ColumnHeader7,
Me.ColumnHeader3, Me.ColumnHeader4})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(32, 72)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(592, 392)
Me.ListView1.TabIndex = 22
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Kd Paket Service"
Me.ColumnHeader1.Width = 103
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Nm Paket Service"
Me.ColumnHeader2.Width = 153
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Hrg Paket"
Me.ColumnHeader5.Width = 71
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Kd Service"
Me.ColumnHeader3.Width = 79
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Nama Service"
Me.ColumnHeader4.Width = 96
'
'ColumnHeader7
'
Me.ColumnHeader7.Text = "Keterangan"
Me.ColumnHeader7.Width = 91
'
'CariPaketService
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(648, 539)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ListView1)
Me.Name = "CariPaketService"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region

Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT paket_service.* ,punya.keterangan,
punya.kd_service, service.nm_service FROM punya INNER JOIN
paket_service ON paket_service.kd_paket = punya.kd_paket INNER JOIN
service ON service.kd_service = punya.kd_service"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListView1.Items(y).SubItems(3).Text =
Reader.GetString(3)
ListView1.Items(y).SubItems(4).Text =
Reader.GetString(4)
ListView1.Items(y).SubItems(5).Text =
Reader.GetString(5)

End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function

Private Sub CariPaketService_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
tampil_listview()
End Sub
Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ListView1.DoubleClick
klik()
End Sub
End Class

CARI SAF
Imports MySql.Data.MySqlClient
Public Class CariSAF
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents Label1 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.txt_counter = New System.Windows.Forms.TextBox
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.Label1 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(8, 40)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 17
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader2,
Me.ColumnHeader3, Me.ColumnHeader4})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(32, 73)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(288, 280)
Me.ListView1.TabIndex = 16
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "No SAF"
Me.ColumnHeader2.Width = 70
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "No Polisi"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 107
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Total Biaya Service"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 112
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(56, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 32)
Me.Label1.TabIndex = 18
Me.Label1.Text = "DATA SAF"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'CariSAF
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(344, 371)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.ListView1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CariSAF"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT no_saf, no_pol, tot_biaya_service FROM saf
where tgl_saf = now()"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Connect.Close()
End Function

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
Call klik()
End Sub

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


As System.EventArgs) Handles MyBase.Load
Call tampil_listview()
End Sub
End Class

CARI SAF1
Imports MySql.Data.MySqlClient
Public Class CariSAF1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader6 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader7 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader8 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader9 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader10 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader11 As
System.Windows.Forms.ColumnHeader
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents ColumnHeader12 As
System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader6 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader7 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader8 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader9 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader10 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader11 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.Label1 = New System.Windows.Forms.Label
Me.txt_counter = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader2, Me.ColumnHeader3, Me.ColumnHeader4,
Me.ColumnHeader5, Me.ColumnHeader6, Me.ColumnHeader7,
Me.ColumnHeader8, Me.ColumnHeader9, Me.ColumnHeader10,
Me.ColumnHeader11, Me.ColumnHeader12})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(16, 64)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(944, 352)
Me.ListView1.TabIndex = 0
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "No SAF"
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Keluhan"
Me.ColumnHeader2.Width = 105
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Tgl SAF"
Me.ColumnHeader3.Width = 64
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Jam Masuk"
Me.ColumnHeader4.Width = 68
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Analisa"
Me.ColumnHeader5.Width = 81
'
'ColumnHeader6
'
Me.ColumnHeader6.Text = "Saran"
Me.ColumnHeader6.Width = 84
'
'ColumnHeader7
'
Me.ColumnHeader7.Text = "Tot Biaya Service"
Me.ColumnHeader7.Width = 96
'
'ColumnHeader8
'
Me.ColumnHeader8.Text = "No Polisi"
Me.ColumnHeader8.Width = 72
'
'ColumnHeader9
'
Me.ColumnHeader9.Text = "ID Mekanik"
Me.ColumnHeader9.Width = 72
'
'ColumnHeader10
'
Me.ColumnHeader10.Text = "ID Advisor"
Me.ColumnHeader10.Width = 68
'
'ColumnHeader11
'
Me.ColumnHeader11.Text = "Kd Paket Service"
Me.ColumnHeader11.Width = 99
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "Jns Motor"
Me.ColumnHeader12.Width = 70
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(352, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 32)
Me.Label1.TabIndex = 19
Me.Label1.Text = "DATA SAF"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(632, 24)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 20
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'CariSAF1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(970, 440)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ListView1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CariSAF1"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try

End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT SAF.*, motor.jns_mtr FROM SAF INNER JOIN motor
ON saf.no_pol = motor.no_pol WHERE saf.tgl_saf = now()"
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListView1.Items(y).SubItems(3).Text =
Reader.GetString(3)
ListView1.Items(y).SubItems(4).Text =
Reader.GetString(4)
ListView1.Items(y).SubItems(5).Text =
Reader.GetString(5)
ListView1.Items(y).SubItems(6).Text =
Reader.GetString(6)
ListView1.Items(y).SubItems(7).Text =
Reader.GetString(7)
ListView1.Items(y).SubItems(8).Text =
Reader.GetString(8)
ListView1.Items(y).SubItems(9).Text =
Reader.GetString(9)
ListView1.Items(y).SubItems(10).Text =
Reader.GetString(10)
ListView1.Items(y).SubItems(11).Text =
Reader.GetString(11)

End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
Call klik()
End Sub
Private Sub CariSAF_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
Call tampil_listview()
End Sub

End Class

CARI SAF2
Imports MySql.Data.MySqlClient
Public Class CariSAF2
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader8 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader9 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader10 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader11 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader12 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader8 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader9 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader11 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader10 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(576, 16)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 23
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(296, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 32)
Me.Label1.TabIndex = 22
Me.Label1.Text = "DATA SAF"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1,
Me.ColumnHeader3, Me.ColumnHeader4, Me.ColumnHeader8,
Me.ColumnHeader12, Me.ColumnHeader9, Me.ColumnHeader11,
Me.ColumnHeader2, Me.ColumnHeader10})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(24, 56)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(752, 424)
Me.ListView1.TabIndex = 21
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "No SAF"
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Tgl SAF"
Me.ColumnHeader3.Width = 64
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Jam Masuk"
Me.ColumnHeader4.Width = 75
'
'ColumnHeader8
'
Me.ColumnHeader8.Text = "No Polisi"
Me.ColumnHeader8.Width = 72
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "Jns Motor"
Me.ColumnHeader12.Width = 70
'
'ColumnHeader9
'
Me.ColumnHeader9.Text = "Nama Mekanik"
Me.ColumnHeader9.Width = 94
'
'ColumnHeader11
'
Me.ColumnHeader11.Text = "Kd Paket Service"
Me.ColumnHeader11.Width = 99
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Nama Paket Service"
Me.ColumnHeader2.Width = 123
'
'ColumnHeader10
'
Me.ColumnHeader10.Text = "Nama Advisor"
Me.ColumnHeader10.Width = 100
'
'CariSAF2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(794, 504)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ListView1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CariSAF2"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try

End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "select saf.no_saf, saf.tgl_saf, saf.jam_masuk,
saf.no_pol, motor.jns_mtr, mekanik.nm_mekanik,
paket_service.nm_paket, paket_service.hrg_paket, advisor.nm_advisor
" & _
"from(SAF) inner join motor on motor.no_pol =
saf.no_pol " & _
"inner join mekanik on mekanik.id_mekanik =
saf.id_mekanik " & _
"inner join paket_service on paket_service.kd_paket
= saf.kd_paket " & _
"inner join advisor on advisor.id_advisor =
saf.id_advisor " & _
"where saf.no_saf not in(select wo.no_saf from wo)
&& saf.tgl_saf = now() "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListView1.Items(y).SubItems(3).Text =
Reader.GetString(3)
ListView1.Items(y).SubItems(4).Text =
Reader.GetString(4)
ListView1.Items(y).SubItems(5).Text =
Reader.GetString(5)
ListView1.Items(y).SubItems(6).Text =
Reader.GetString(6)
ListView1.Items(y).SubItems(7).Text =
Reader.GetString(7)
ListView1.Items(y).SubItems(8).Text =
Reader.GetString(8)

End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function
Private Sub CariSAF2_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
Me.tampil_listview()
End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
klik()
End Sub
End Class

CARI SERVICE
Imports MySql.Data.MySqlClient
Public Class CariService
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents ColumnHeader1 As
System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.txt_counter = New System.Windows.Forms.TextBox
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(88, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(240, 32)
Me.Label1.TabIndex = 20
Me.Label1.Text = "Data Service"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader3,
Me.ColumnHeader4, Me.ColumnHeader1})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(24, 72)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(360, 392)
Me.ListView1.TabIndex = 19
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Kd Service"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 79
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Nama Service"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 172
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(32, 40)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 21
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "Hrg Service"
Me.ColumnHeader1.Width = 104
'
'CariService
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(400, 483)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ListView1)
Me.Name = "CariService"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM service "
If Connect.State = ConnectionState.Closed Then
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")

ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function

Private Sub CariService_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
tampil_listview()
End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
klik()
End Sub
End Class

CARI SPAREPART
Imports MySql.Data.MySqlClient
Public Class CariSparePart
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()
'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader2 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader3 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader4 As
System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader5 As
System.Windows.Forms.ColumnHeader
Friend WithEvents txt_counter As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader
Me.txt_counter = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'ListView1
'
Me.ListView1.Columns.AddRange(New
System.Windows.Forms.ColumnHeader() {Me.ColumnHeader2,
Me.ColumnHeader3, Me.ColumnHeader4, Me.ColumnHeader5})
Me.ListView1.GridLines = True
Me.ListView1.Location = New System.Drawing.Point(32, 64)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(400, 280)
Me.ListView1.TabIndex = 11
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader2
'
Me.ColumnHeader2.Text = "Kode Sparepart"
Me.ColumnHeader2.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader2.Width = 95
'
'ColumnHeader3
'
Me.ColumnHeader3.Text = "Nama Sparepart"
Me.ColumnHeader3.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader3.Width = 156
'
'ColumnHeader4
'
Me.ColumnHeader4.Text = "Harga"
Me.ColumnHeader4.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader4.Width = 95
'
'ColumnHeader5
'
Me.ColumnHeader5.Text = "Stock"
Me.ColumnHeader5.TextAlign =
System.Windows.Forms.HorizontalAlignment.Center
Me.ColumnHeader5.Width = 56
'
'txt_counter
'
Me.txt_counter.Location = New System.Drawing.Point(8, 288)
Me.txt_counter.Name = "txt_counter"
Me.txt_counter.Size = New System.Drawing.Size(16, 20)
Me.txt_counter.TabIndex = 15
Me.txt_counter.Text = ""
Me.txt_counter.Visible = False
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("Monotype Corsiva",
21.75!, System.Drawing.FontStyle.Italic,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.Color.DarkRed
Me.Label1.Location = New System.Drawing.Point(72, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(312, 32)
Me.Label1.TabIndex = 14
Me.Label1.Text = "Data Sparepart"
Me.Label1.TextAlign =
System.Drawing.ContentAlignment.MiddleCenter
'
'CariSparePart
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(456, 355)
Me.Controls.Add(Me.txt_counter)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.ListView1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CariSparePart"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Dim i As Integer
Public kode As String
Function klik()
Try
kode =
ListView1.SelectedItems(0).SubItems(0).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox(ex.Message.ToString())
End Try
End Function
Function tampil_listview()
Dim x, y As Integer
SQL = "SELECT * FROM sparepart"
Connect.Open()
Try
Command = New MySqlCommand(SQL, Connect)
Reader = Command.ExecuteReader
While Reader.Read = True
y = Val(txt_counter.Text)
txt_counter.Text = Str(Val(txt_counter.Text) + 1)

ListView1.Items.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
ListView1.Items(ListView1.Items.Count -
1).SubItems.Add("")
'ListView1.Items(y).SubItems(0).Text = (y +
1).ToString(0)
ListView1.Items(y).SubItems(0).Text =
Reader.GetString(0)
ListView1.Items(y).SubItems(1).Text =
Reader.GetString(1)
ListView1.Items(y).SubItems(2).Text =
Reader.GetString(2)
ListView1.Items(y).SubItems(3).Text =
Reader.GetString(3)
End While
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
End Try
Reader.Close()
Connect.Close()
End Function

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal


e As System.EventArgs) Handles ListView1.DoubleClick
Call klik()
End Sub

Private Sub CariSparePart_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
Call tampil_listview()
End Sub
End Class

CETAK
Imports MySql.Data.MySqlClient
Public Class Cetak
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New(ByVal Cetak As String, ByVal Source As String)


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

CrystalReportViewer1.ReportSource = Application.StartupPath
& "\" & Cetak
CrystalReportViewer1.SelectionFormula = Source

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form


Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents CrystalReportViewer1 As
CrystalDecisions.Windows.Forms.CrystalReportViewer
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.CrystalReportViewer1 = New
CrystalDecisions.Windows.Forms.CrystalReportViewer
Me.SuspendLayout()
'
'CrystalReportViewer1
'
Me.CrystalReportViewer1.ActiveViewIndex = -1
Me.CrystalReportViewer1.Dock =
System.Windows.Forms.DockStyle.Fill
Me.CrystalReportViewer1.Location = New
System.Drawing.Point(0, 0)
Me.CrystalReportViewer1.Name = "CrystalReportViewer1"
Me.CrystalReportViewer1.ReportSource = Nothing
Me.CrystalReportViewer1.Size = New System.Drawing.Size(784,
467)
Me.CrystalReportViewer1.TabIndex = 0
'
'Cetak
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(784, 467)
Me.Controls.Add(Me.CrystalReportViewer1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Cetak"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub
#End Region

Private Sub CrystalReportViewer1_Load(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
CrystalReportViewer1.Load

End Sub
End Class

CLAPORAN
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Public Class CLaporan


Inherits System.Windows.Forms.Form
Public tglAwal, tglAkhir As Date
Public formula As String
Public ReportS As ReportClass

#Region " Windows Form Designer generated code "

Public Sub New(ByVal Report As ReportClass, ByVal tAwal As Date,


ByVal tAkhir As Date, ByVal sformula As String)
MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call


tglAwal = tAwal
tglAkhir = tAkhir
formula = sformula
ReportS = Report

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents CrystalReportViewer1 As
CrystalDecisions.Windows.Forms.CrystalReportViewer
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.CrystalReportViewer1 = New
CrystalDecisions.Windows.Forms.CrystalReportViewer
Me.SuspendLayout()
'
'CrystalReportViewer1
'
Me.CrystalReportViewer1.ActiveViewIndex = -1
Me.CrystalReportViewer1.Dock =
System.Windows.Forms.DockStyle.Fill
Me.CrystalReportViewer1.Location = New
System.Drawing.Point(0, 0)
Me.CrystalReportViewer1.Name = "CrystalReportViewer1"
Me.CrystalReportViewer1.ReportSource = Nothing
Me.CrystalReportViewer1.Size = New System.Drawing.Size(720,
507)
Me.CrystalReportViewer1.TabIndex = 1
'
'CLaporan
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(720, 507)
Me.Controls.Add(Me.CrystalReportViewer1)
Me.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.Name = "CLaporan"
Me.Text = "AHASS TUGU PERMAI"
Me.ResumeLayout(False)

End Sub

#End Region
Private Sub view_cetak(ByVal Rpt As ReportClass)
Try
'fields definition
Dim crParameterFieldDefinitions As
ParameterFieldDefinitions
'definisi nama parameter
Dim crParameterFieldDefinitionParam1 As
ParameterFieldDefinition
Dim crParameterFieldDefinitionParam2 As
ParameterFieldDefinition
'definisi value parameter
Dim crParameterValuesParam1 As New ParameterValues
Dim crParameterValuesParam2 As New ParameterValues
'definisi nilai diskrit tiap parameter
Dim crParameterDiscreteValueparam1 As New
ParameterDiscreteValue
Dim crParameterDiscreteValueparam2 As New
ParameterDiscreteValue

'akses parameter field definition


crParameterFieldDefinitions =
Rpt.DataDefinition.ParameterFields

'tentukan nama parameter


crParameterFieldDefinitionParam1 =
crParameterFieldDefinitions.Item("tgl_awal")
crParameterFieldDefinitionParam2 =
crParameterFieldDefinitions.Item("tgl_akhir")

'isi valuenya
crParameterDiscreteValueparam1.Value = tglAwal.Date
crParameterDiscreteValueparam2.Value = tglAkhir.Date

'apply untuk param1


crParameterValuesParam1 =
crParameterFieldDefinitionParam1.CurrentValues

crParameterValuesParam1.Add(crParameterDiscreteValueparam1)

crParameterFieldDefinitionParam1.ApplyCurrentValues(crParameterValue
sParam1)

'apply untuk param2


crParameterValuesParam2 =
crParameterFieldDefinitionParam2.CurrentValues

crParameterValuesParam2.Add(crParameterDiscreteValueparam2)

crParameterFieldDefinitionParam2.ApplyCurrentValues(crParameterValue
sParam2)

'set source
CrystalReportViewer1.ReportSource = Rpt
CrystalReportViewer1.SelectionFormula = formula
CrystalReportViewer1.RefreshReport()
Catch ex As Exception
MsgBox(ex.Source & " : " & ex.Message)
End Try
End Sub

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


As System.EventArgs) Handles MyBase.Load
Call view_cetak(ReportS)
End Sub
End Class

FUNGSI
Module Fungsi
Public Function angka(ByVal e As KeyPressEventArgs)
Dim keyascii As Integer
keyascii = Asc(e.KeyChar)
Select Case keyascii
Case 48 To 57, 8, 13
Case Else
keyascii = 0
End Select
If keyascii = 0 Then
e.Handled = True
Else
e.Handled = False
End If
End Function
Public Function huruf(ByVal e As KeyPressEventArgs)
Dim keyascii As Integer
keyascii = Asc(e.KeyChar)
Select Case keyascii
Case 65 To 90, 97 To 122, 32, 8, 32, 13
Case Else
keyascii = 0
End Select
If keyascii = 0 Then
e.Handled = True
Else
e.Handled = False
End If
End Function
End Module

KONEKSI
Imports MySql.Data.MySqlClient
Module koneksi
Public Form As New Form
Public ConnectionString As String = "server=localhost;
userid=root; password=; database=bengkel1;"
Public Connect As New MySqlConnection(ConnectionString)
Public Command As New MySqlCommand
Public DataAdapter As New MySqlDataAdapter
Public Reader As MySqlDataReader
Public ResultSet As String
Public No As String
Public Adapter As MySqlDataAdapter
Public DataSet As New DataSet
Public DataTbl As New DataTable
Public CM As CurrencyManager
Public SQL As String
Public mToolTip As New ToolTip
Public SQL1 As String
Public SQLDetil As String
Public y As Integer
End Module

Anda mungkin juga menyukai