140
4.5.7 Tampilan Kwitansi Pembayaran Uang Muka
Gambar 4.47 Tampilan Kwitansi Uang Muka
Gambar 4.48 Tampilan Kwitansi Pembayaran Uang Muka
141 Tabel 4.26 Listing Program Pembayaran Uang Muka
Listing Program Keterangan
Imports System.Data.SqlClient
Public Class
Form_Penerimaan_Kas Dim
strCon = server=localhost\
SQLEXPRESS;Database=pt_kyalapratamasc; Integrated Security=True
Dim con
As SqlConnection
Sub connect
con = New
SqlConnectionstrCon Try
con.Open con.Close
Catch ex
As Exception
MsgBox Connection Error
+ ex.Message End
Try End
Sub Sub
tampil Dim
strSQL As
String =
SELECT FROM tabel_kwitansidp
Dim Da
As New
SqlDataAdapterstrSQL, con Dim
Dt As
New DataTable
Dim Bs
As New
BindingSource Da.FillDt
Bs.DataSource = Dt DataGridView1.DataSource = Bs
End Sub
Perintah Untuk Membuka Koneksi
Ke Database
Private Sub
Button1_Click ByVal
sender As
System.Object, ByVal
e As
System.EventArgs Handles
Button1.Click sintak menyimpan data ke database
Dim strSQL
As String
= INSERT INTO tabel_kwitansidp
values + TextBox1.Text +
, + DateTimePicker1.Text +
, + ComboBox1.Text +
, + TextBox2.Text +
, +
TextBox3.Text + ,
+ TextBox4.Text + ,
+ TextBox7.Text +
, + TextBox8.Text +
, + TextBox9.Text +
Try Dim
save As
New SqlCommandstrSQL, con
con.Open save.ExecuteNonQuery
MsgBox Data Berhasil Disimpan
, MsgBoxStyle.Information + MsgBoxStyle.OkOnly
con.Close Catch
ex As
Exception MsgBox
Maaf Anda Gagal + ex.Message
End Try
tampil End Sub
Perintah Untuk Menyimpan Data
Pembayaran Uang Muka
Form_Cetak_Kwitansi_DP.Show Perintah Untuk
Mencetak Kwitansi
142
4.5.8 Tampilan Kwitansi Pelunasan Pembayaran
Gambar 4.49 Tampilan Kwitansi Pelunasan Pembayaran
Gambar 4.50 Tampilan Cetak Kwitansi Pelunasan Pembayaran
143
4.5.9 Tampilan Laporan Penjualan
Gambar 4.51 Tampilan Laporan Penjualan Perbulan
Gambar 4.52 Tampilan Cetak Laporan Penjualan Perbulan
144 Gambar 4.53 Tampilan Cetak Laporan Penjualan Pertahun
Tabel 4.27 Listing Program Laporan Penjualan
Listing Program Keterangan
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Shared.ParameterField
Public Class
Form_Laporan_Penjualan Dim
strCon = server= localhost\ SQLEXPRESS;
Database=pt_kyalapratamasc; Integrated Security=True Dim
con As
SqlConnection Public
tanggalawal, tanggalakhir As
String Sub
connect con =
New SqlConnectionstrCon
Try con.Open
con.Close Catch
ex As
Exception MsgBox
Connection Error + ex.Message
End Try
End Sub
Perintah Untuk Membuka Koneksi
Ke Database
145 Tabel 4.28 Lanjutan Listing Program Laporan Penjualan
Listing Program Keterangan
Private Sub
Button1_Click ByVal
sender As
System.Object, ByVal
e As
System.EventArgs Handles
Button1.Click If
ComboBox1.Text = Bulan
Then If
ComboBox2.Text = Januari
Then tanggalawal = TextBox1.Text
-01-01 tanggalakhir = TextBox1.Text
-01-31 ElseIf
ComboBox2.Text = Februari
Then tanggalawal = TextBox1.Text
-02-01 tanggalakhir = TextBox1.Text
-02-28 ElseIf
ComboBox2.Text = Maret
Then tanggalawal = TextBox1.Text
-03-01 tanggalakhir = TextBox1.Text
-03-31 ElseIf
ComboBox2.Text = April
Then tanggalawal = TextBox1.Text
-04-01 tanggalakhir = TextBox1.Text
-04-30 ElseIf
ComboBox2.Text = Mei
Then tanggalawal = TextBox1.Text
-05-01 tanggalakhir = TextBox1.Text
-05-31 ElseIf
ComboBox2.Text = Juni
Then tanggalawal = TextBox1.Text
-06-01 tanggalakhir = TextBox1.Text
-06-30 ElseIf
ComboBox2.Text = Juli
Then tanggalawal = TextBox1.Text
-07-01 tanggalakhir = TextBox1.Text
-07-31 ElseIf
ComboBox2.Text = Agustus
Then tanggalawal = TextBox1.Text
-08-01 tanggalakhir = TextBox1.Text
-08-31 ElseIf
ComboBox2.Text = September
Then tanggalawal = TextBox1.Text
-09-01 tanggalakhir = TextBox1.Text
-09-30 ElseIf
ComboBox2.Text = Oktober
Then tanggalawal = TextBox1.Text
-10-01 tanggalakhir = TextBox1.Text
-10-31 ElseIf
ComboBox2.Text = November
Then tanggalawal = TextBox1.Text
-11-01 tanggalakhir = TextBox1.Text
-11-30 ElseIf
ComboBox2.Text = Desember
Then tanggalawal = TextBox1.Text
-12-01 tanggalakhir = TextBox1.Text
-12-31 End
If ElseIf
ComboBox1.Text = Tahun
Then tanggalawal = TextBox1.Text
-01-01 tanggalakhir = TextBox1.Text
-12-31 End
If Form_Cetak_Laporan_Penjualan.Show
End Sub
Perintah Untuk Mencetak dan
Pencarian Laporan Penjualan
Me.Close Menutup Form
Laporan Penjualan