Pertemuan 6 Dan 7

  • 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 6 Dan 7 as PDF for free.

More details

  • Words: 739
  • Pages: 5
Materi Foxpro Pertemuan 6-7 Lab H- I Malam Fatmawati A1 Buat Project dengan File New ->New File Save di C:\Sore\Ka5e\1107999 Simpan dengan nama PENJUALAN Lihat diProject manager klik + data Extension Project .pjx Pilih database new beri nama JUAL Extension Database .dbc Lihat diProject manager klik + table BUKAN FREE TABLE Pilih New table beri nama MENURESTO Extension Table .dbf Gunakan _ untuk nama field jangan menggunakan spasi HUKUMNYA HARAM Klik Table Pegawai modify maka kita akan merubah struktur field kita jika ada perubahan muncul message make change structur jawab yes Untuk Primary key pada menuresto adalah kd_menudex Klik table menuresto klik browse Isi record sebanyak 4 record ( CTRL+Y)

Lalu Dari Project Manager Cari Tab Documents pilih Form=>New=>NewForm Buat Tampilan Form dengan Bantuan Klik kanan Data envirotment Lalu Add Table Menuresto lalu Close Drag Fields dari table ke arah design Form Setting dari properties untuk memutuskan hubungan dengan Table karena coding sudah Full programming jadi tidak boleh double connect dengan table. Klik semua field dengan tombol shift lalu cari dari properties ControlSource lalu klik kanan pilih reset to default maka Hubungan ControlSource menjadi NONE Setting pula untuk field yang tipenya angka properties values=0 Lalu design Form seperti tampilan berikut :

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 6-7 Lab H- I Malam Fatmawati A1

Rubah Name dari tiap command button nya Untuk Caption Command Button misal = \Form =>New Methode Ketik lalu klik Add dan Close Buat Mehode Aktif , NonAktif , Bersih dan Tampil Buat ComboBox namenya = txtjns_menu dan isi dengan Builder Data Entered By Hand Lalu isi manual Makanan Dan Minuman Object Form1 Procedure Aktif thisform.txtKd_menu.Enabled= .t. thisform.txtjns_menu.Enabled= .t. thisform.txtnama_menu.Enabled= .t. thisform.txtharga.Enabled= .t. thisform.txtporsi.Enabled= .t.

Object Form1 Procedure Bersih

thisform.txtKd_menu.Value ="" thisform.txtjns_menu.Value ="" thisform.txtnama_menu.Value ="" thisform.txtharga.Value =0 thisform.txtporsi.Value =0 thisform.txtcari.Value =""

Object Form1 Procedure NonAktif thisform.txtKd_menu.Enabled= .f. thisform.txtjns_menu.Enabled= .f. thisform.txtnama_menu.Enabled= .f. thisform.txtharga.Enabled= .f. thisform.txtporsi.Enabled= .f.

Object Form1 Procedure Tampil

SELECT menuresto thisform.txtKd_menu.Value =kd_menu thisform.txtjns_menu.value =jns_menu

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 6-7 Lab H- I Malam Fatmawati A1 thisform.txtnama_menu.Value =nama_menu thisform.txtharga.Value =harga thisform.txtporsi.Value =porsi

Object Form1 Procedure Active

set delete on select menuresto set order to kd_menudex thisform.tampil() thisform.nonaktif() thisform.cmdadd.Enabled = .T. thisform.cmdsave.Enabled = .f. thisform.cmdedit.Enabled = .T. thisform.cmdcan.Enabled = .t. thisform.cmddel.Enabled = .T. thisform.cmdexit.Enabled = .T. thisform.cmdfind.Enabled = .T. thisform.txtcari.SetFocus

Object CmdTop Procedure Click = <<

go top thisform.tampil() messagebox("Posisi Awal Loh...!",64+0,"Informasi")

Object CmdPrev Procedure Click= <

if bof() GO top messagebox("Posisi sudah di awal file...!",64+0,"Informasi") else skip-1 endif thisform.tampil()

Object CmdNext Procedure Click= >

if eof() GO bottom messagebox("Posisi sudah di akhir file...!",64+0,"Informasi") else skip endif thisform.tampil()

Object CmdNext Procedure Click= >> go bottom thisform.tampil() messagebox("Posisi Akhir Loh...!",64+0,"Informasi")

Object TxtKd_menu Procedure LostFocus restoku=thisform.txtkd_menu.value select menuresto set filter to set order to kd_menudex seek restoku if found()

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 6-7 Lab H- I Malam Fatmawati A1 MESSAGEBOX("Menu sudah ada",64+0,"Info") thisform.tampil() thisform.nonaktif() endif

Object CmdAdd Procedure Click thisform.bersih () thisform.aktif thisform.txtKd_menu.SetFocus thisform.cmdsave.Enabled = .T.

Object CmdSave Procedure Click restoku=thisform.txtkd_menu.value select menuresto set order to kd_menudex set filter to seek restoku if found() p=messagebox("Data Sudah Ada,Apakah Mau DiPerbaharui ?",4+64,"Info") if p=6 recall replace jns_menu WITH thisform.txtjns_menu.Value replace nama_menu WITH thisform.txtnama_menu.Value replace harga WITH thisform.txtharga.Value replace porsi WITH thisform.txtporsi.Value endif else append blank replace kd_menu WITH thisform.txtKd_menu.Value replace jns_menu WITH thisform.txtjns_menu.Value replace nama_menu WITH thisform.txtnama_menu.Value replace harga WITH thisform.txtharga.Value replace porsi WITH thisform.txtporsi.Value endif thisform.nonaktif() thisform.Refresh

Object CmdEdit Procedure Click thisform.aktif thisform.txtKd_menu.Enabled = .f. thisform.txtnama_menu.SetFocus thisform.cmdsave.Enabled = .T.

Object CmdCancel Procedure Click THISFORM.BErsih THISFORM.NOnaktif thisform.cmdadd.Enabled = .T. thisform.cmdsave.Enabled = .f. thisform.cmdedit.Enabled = .T. thisform.cmdcan.Enabled = .t. thisform.cmddel.Enabled = .T. thisform.cmdexit.Enabled = .T. thisform.cmdfind.Enabled = .T. thisform.Refresh

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Materi Foxpro Pertemuan 6-7 Lab H- I Malam Fatmawati A1

Object CmdDelete Procedure Click

p=messagebox("Benar Mau DI Hapus?",4+32,"Info") if p=6 DELETE pack if eof() go bottom else skip endif thisform.tampil() thisform.nonaktif ENDIF thisform.Refresh

Object CmdExit Procedure Click tutup=MESSAGEBOX("Mau Keluar ?",32+4,"Tanya") IF tutup=6 thisform.Release ENDIF

Object CmdFind Procedure Click select menuresto set filter to set order to kd_menudex seek restoku if found() MESSAGEBOX("Menu sudah ada",64+0,"Info") thisform.tampil() thisform.nonaktif() ELSE MESSAGEBOX("Data tidak ada",48+0,"Info") thisform.txtcari.SetFocus ENDIF thisform.Refresh

Object CmdBrowse Procedure Click BROWSE THISFORM.Refresh

Pahami Listing Jangan Hanya Asal Me-Ngetik,,, saja Jika ada Komplain Kunjungi Blog www.sita-anggraeni.co.cc to Sent U Comment

SELAMAT MENGERJAKAN

FOXPRO 9.0 LAB H- I FMA @ SIA OKTOBER 2009

Related Documents

Pertemuan 6 Dan 7
June 2020 16
Pertemuan 6-7 Operator
April 2020 14
Pertemuan 7 (lk 6).docx
December 2019 19
Pertemuan 7
July 2020 10
Pertemuan 6
April 2020 18
Pertemuan-6
June 2020 15