Pertemuan 8 Dan 9

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Pertemuan 8 Dan 9 as PDF for free.

More details

  • Words: 963
  • Pages: 6
Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1 Buat Project dengan File New =>New File Save di C:\Sore\Ka5e\1107999 PENYIMPANAN jangan menggunakan spasi HUKUMNYA HARAM Simpan dengan nama JUALKUE Lihat diProject manager klik + data Extension Project .pjx Pilih database new beri nama TOKOKUE Extension Database .dbc Lihat diProject manager klik + table BUKAN FREE TABLE Pilih New table beri nama KUEKU Extension Table .dbf Gunakan _ (UNDERSCORE\GARISBAWAH) untuk nama field Jangan menggunakan spasi HUKUMNYA HARAM Klik Table Pegawai modify maka kita akan merubah struktur field kita => jika ada perubahan FIELD muncul message make change structur jawab YES Klik table KUEKU klik browse Isi record sebanyak 3 record DENGAN ( CTRL+Y)

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1

Ambil Semua Field dari Data Envirotment Putuskan Dengan Meng Klik semua field Dan pilih properties cari control source lalu klik kanan pilih reset to default Setting pula field yang untuk perhitungan Properties Values = 0 Setting Combo seperti gambar disamping => Dari Menu Form NewMethode => Add Buat 3 Methode Aktif,Bersih,Non Object Form1

Procedure Aktif

THISFORM.TXTId_byr.Enabled = .t. THISFORM.TXTtgl.Enabled = .t. THISFORM.TXTqty.Enabled = .t. THISFORM.TXTbyr.Enabled = .t. THISFORM.TXTpot.Enabled = .t. THISFORM.TXTppn.Enabled = .t. THISFORM.TXTtotal.Enabled = .t. THISFORM.combo1.Enabled = .t. THISFORM.TXTnm_kue.Enabled = .t. THISFORM.TXTjns_kue.Enabled = .t. THISFORM.TXTharga.Enabled = .t.

Cara cepat mengganti True ke False Blok semua yang di aktif lalu pilih dari menu edit pilih replace lalu ganti .t. jadi .f. Seperti gambar disamping => Object Form1

Procedure non

THISFORM.TXTId_byr.Enabled = .F. THISFORM.TXTtgl.Enabled = .F. THISFORM.TXTqty.Enabled = .F.

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1 THISFORM.TXTbyr.Enabled = .F. THISFORM.TXTpot.Enabled = .F. THISFORM.TXTppn.Enabled = .F. THISFORM.TXTtotal.Enabled = .F. THISFORM.combo1.Enabled = .F. THISFORM.TXTnm_kue.Enabled = .F. THISFORM.TXTjns_kue.Enabled = .F. THISFORM.TXTharga.Enabled = .F.

Object Form1 Bersih

Procedure

THISFORM.TXTid_byr.Value ="" THISFORM.TXTtgl.Value =DATE() THISFORM.TXTqty.Value =0 THISFORM.TXTbyr.Value =0 THISFORM.TXTpot.Value =0 THISFORM.TXTppn.Value =0 THISFORM.TXTtotal.Value =0 THISFORM.combo1.Value ="" THISFORM.TXTnm_kue.Value ="" THISFORM.TXTjns_kue.Value ="" THISFORM.TXTharga.Value =0

Object Form1 Activate

Procedure

THISFORM.TXTTgl.Value=DATE() thisform.bersih() thisform.aktif() THISFORM.TXTId_byr.SetFocus

Object Form1 Load

Procedure

SELECT kueku SET ORDER TO tag id_kuedex SELECT bayar SET ORDER TO tag id_byrdex

Object TxtId_byr LostFocus

Procedure

SELECT bayar SET ORDER TO tag id_byrdex IF SEEK(thisform.txtId_byr.Value) MESSAGEbox("DahAda",64+0,"info") thisform.txttgl.Value = tgl thisform.txtqty.Value = qty thisform.txtbyr.Value = byr thisform.txtpot.Value = pot thisform.txtppn.Value = ppn thisform.txttotal.Value = total thisform.combo1.Value = id_kue SELECT kueku SET ORDER TO tag id_kuedex thisform.txtnm_kue.Value =nm_kue thisform.txtjns_kue.Value =jns_kue thisform.txtharga.Value =harga thisform.non() endif

Object CmdNew Click

Procedure

thisform.bersih() thisform.aktif() thisform.txtid_byr.SetFocus

Object CmdCal

Procedure Click

byr=thisform.txtbyr.Value qty=thisform.txtqty.Value harga=thisform.txtharga.Value pot=thisform.txtpot.Value ppn=thisform.txtppn.Value ttl=thisform.txttotal.Value byr=harga*qty thisform.txtByr.Value =byr IF qty>10 AND thisform.txtJns_kue.Value = "CAKE" pot=10/100*byr ELSE IF qty>5 AND thisform.txtJns_kue.Value = "CAKE"

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1 pot=5/100*byr ELSE pot=2/100*byr ENDIF ENDIF thisform.txtpot.Value =pot IF byr>150000 ppn=10/100*byr ELSE IF byr>90000 ppn=5/100*byr else ppn=1/100*byr ENDIF ENDIF thisform.txtppn.Value =ppn ttl=byr+ppn-pot thisform.txttotal.Value = ttl

Object CmdRpl

Ketentuan Soal ! Bayar = Qty * Harga Jika Qty > 10 dan Jenis_kue = “CAKE” Maka Potongan = 10 % * Bayar Jika Qty > 5 dan Jenis_kue = “CAKE” Maka Potongan = 5 % * Bayar Selain itu Potongan = 2 % * Bayar Jika Bayar > 1500000 Maka Ppn = 10% * Bayar Jika Bayar > 90000 Maka Ppn = 5% * Bayar Selain itu Ppn = 1% * Bayar Total = Bayar + PPn - Potongan

Procedure Click

SELECT bayar SET ORDER TO tag id_byrdex APPEND BLANK REPLACE id_byr WITH thisform.txtid_byr.Value REPLACE tgl WITH thisform.txttgl.Value REPLACE qty WITH thisform.txtqty.Value REPLACE byr WITH thisform.txtbyr.Value REPLACE pot WITH thisform.txtpot.Value REPLACE ppn WITH thisform.txtppn.Value REPLACE total WITH thisform.txttotal.Value REPLACE id_kue WITH thisform.combo1.Value MESSAGEBOX("OK SAVE",64+0,"OK") thisform.non()

Object CmdQuit

Procedure Click

q=MESSAGEBOX("Mau Quit???",32+4,"Q") IF q=6 thisform.Release ENDIF

Object Combo1

Object CmdBrow Click SELECT bayar BROWSE

Procedure Click

SELECT kueku IF THISFORM.COmbo1.Value =id_kue then THISFORM.TXtNm_kue.Value = nm_kue THISFORM.TXtjns_kue.Value = jns_kue THISFORM.TXtharga.Value = harga thisform.txtQty.SetFocus endif

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Procedure

Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1

Tambahkan Option Group , CheckBox dan Listbox Pada Form Jika Pembeli Member maka Potongan 5000 Non member tidak mendapat potongan Total Potongan dari Pembeli dan Besar Quantity ada pada Command CaL Jika Pasta Keju dipilih Maka Harga Bayar akan bertambah 10000 dan List Box akan tertera keterangan Keju Jika Pasta Coklat dipilih Maka Harga Bayar akan bertambah 7500 dan List Box akan tertera keterangan Coklat Jika Pasta Straw dipilih Maka Harga Bayar akan bertambah 5000 dan List Box akan tertera keterangan Straw Jika Pasta Nanas dipilih Maka Harga Bayar akan bertambah 2500 dan List Box akan tertera keterangan Nanas Tampilkan Form Active dalam keadaan bersih Object Form1

Tambahan Procedure Bersih

thisform.optiongroup1.Value =0 thisform.list1.Clear thisform.check1.Value =0 thisform.check2.Value =0 thisform.check3.Value =0 thisform.check4.Value =0

Object Form1

Tambahan Procedure Bersih

IF thisform.optiongroup1.option1.Value =1 thisform.txtPot.Value = 5000 ELSE thisform.txtPot.Value = 0 ENDIF

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 8-9 Lab H- I Malam Fatmawati A1

Object Check1

Procedure Click

IF thisform.check1.Value =1 thisform.list1.List ="Keju" thisform.txtbyr.Value =thisform.txtbyr.Value+10000 endif

Object CmdCal

Tambahan Procedure Click

byr=byr+(harga*qty) thisform.txtByr.Value =byr IF qty>10 AND thisform.txtJns_kue.Value = "CAKE" pot=pot+10/100*byr ELSE IF qty>5 AND thisform.txtJns_kue.Value = "CAKE" pot=pot+(5/100*byr) ELSE pot=pot+(2/100*byr) ENDIF ENDIF thisform.txtpot.Value =pot IF byr>150000 ppn=10/100*byr ELSE IF byr>90000 ppn=5/100*byr else ppn=1/100*byr ENDIF ENDIF thisform.txtppn.Value =ppn ttl=byr+ppn-pot thisform.txttotal.Value = ttl

Materi sudah selesai semua nya dari penggunaan Form Juga penggunaan Database hingga transaksi 2 tabel Tapi masih menggunakan relasi one to one belum one to many ( 1 transaksi bisa banyak data master ) Selamat Belajar menempuh UTS Tanggal 16 November 2009 hari Senin , Harap masuk sesuai shiftnya …!!! Belajar lagi materi Foxpro 9.0 Mulai pembuatan project, database, hingga isi tabel, juga pembuatan form , dsb

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Related Documents

Pertemuan 8 Dan 9
June 2020 14
Pertemuan 8-9
May 2020 17
Pertemuan 9
July 2020 19
Pertemuan - 8
June 2020 28
Pertemuan 9.pptx
November 2019 16
Pertemuan Ke-9
July 2020 20