Syntax Lengkap

Embed Size (px)

DESCRIPTION

syntaX basisdata

Citation preview

DATABLANKthisform.txt_kd.Value=""thisform.txt_nm.Value=""thisform.txt_hb.Value=0thisform.txt_hj.Value=0thisform.txt_jml.Value=0thisform.RefreshDATASETthisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshFORM1 ACTIVEthisform.SetAll('enabled',.F.,'textbox')thisform.cmd_top.SetFocusthisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshCMD_TOPSELECT t_brgGO topthisform.SetAll ('enabled',.T.,'commandbutton')thisform.cmd_top.Enabled= .F.thisform.cmd_prev.Enabled= .F.thisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshCMD_PREVSELECT t_brgIf!BOF()SKIP -1thisform.SetAll('enabled',.T.,'commandbutton')IF BOF()SKIPthisform.SetAll('enabled',.T.,'commandbutton')thisform.cmd_top.Enabled= .F.thisform.cmd_prev.Enabled= .F.ENDIFENDIFthisform.txt_kd.Value=kd_brgthisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshCMD_NEXTSELECT t_brgIf!EOF()SKIPthisform.SetAll('enabled',.T.,'commandbutton')IF EOF()SKIP -1thisform.SetAll('enabled',.T.,'commandbutton')thisform.cmd_next.Enabled= .F.thisform.cmd_bottom.Enabled= .F.ENDIFENDIFthisform.txt_kd.Value=kd_brgthisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshCMD_BOTTOMSELECT t_brgGO bottomthisform.SetAll ('enabled',.T.,'commandbutton')thisform.cmd_bottom.Enabled= .F.thisform.cmd_next.Enabled= .F.thisform.txt_kd.Value=kd_brgthisform.txt_nm.Value=nm_brgthisform.txt_hb.Value=hrg_belithisform.txt_hj.Value=hrg_jualthisform.txt_jml.Value=jmlthisform.RefreshCMD_NEWIF thisform.cmd_new.Caption="new"SELECT t_brgGO bottomthisform.datablankkode = VAL (RIGHT (kd_brg,3))+ 10001thisform.txt_kd.Value= "B" + alltrim(RIGHT(STR(kode),3))thisform.cmd_new.Caption="save"thisform.cmd_exit.Caption="cancel"thisform.txt_kd.Enabled= .F.thisform.txt_nm.Enabled= .T.thisform.txt_hb.Enabled= .T.thisform.txt_hj.Enabled= .T.thisform.txt_jml.Enabled= .T.thisform.cmd_top.Enabled= .F.thisform.cmd_prev.Enabled= .F.thisform.cmd_next.Enabled= .F.thisform.cmd_bottom.Enabled= .F.thisform.txt_nm.SetFocusELSEIF thisform.txt_nm.Value=="" OR thisform.txt_hb.Value=0 OR thisform.txt_hj.Value=0 OR thisform.txt_jml.value=0 OR thisform.txt_kd.Value==t_brgthisform.cmd_new.Caption="new"thisform.cmd_exit.Caption="exit"thisform.SetAll('enabled',.F.,'commandbutton')thisform.RefreshELSEINSERT INTO t_brg values(thisform.txt_kd.Value, thisform.txt_nm.Value, thisform.txt_hb.Value, thisform.txt_hj.Value, thisform.txt_jml.Value)thisform.cmd_new.Caption="new"thisform.cmd_exit.Caption="exit"thisform.SetAll('enabled',.F.,'textbox')thisform.SetAll('enabled',.T.,'commandbutton')thisform.RefreshENDIFENDIFCMD_EXITIF thisform.cmd_new.Caption="new"thisform.Release()ELSEthisform.SetAll('enabled',.F.,'textbox')GO bottomthisform.cmd_new.Caption="new"thisform.cmd_exit.Caption="exit"thisform.SetAll('enabled',.T.,'commandbutton')ENDIFCMD_EDITIF thisform.cmd_edit.Caption="edit"thisform.cmd_edit.Caption="save"thisform.txt_kd.Enabled= .F.thisform.txt_nm.Enabled= .T.thisform.txt_bl.Enabled= .T.thisform.txt_jl.Enabled= .T.thisform.txt_jml.Enabled= .T.thisform.txt_nm.SetFocusthisform.cmd_top.Enabled= .F.thisform.cmd_prev.Enabled= .F.thisform.cmd_next.Enabled= .F.thisform.cmd_bottom.Enabled= .F.thisform.cmd_new.Enabled= .F.thisform.cmd_exit.Caption="cancel"thisform.cmd_edit.TabIndex=0ELSEif!EMPTY(thisform.txt_nm.Value)thena=thisform.txt_nm.ValueUPDATE t_brg SET nm_brg = a wheret_brg.kd_brg=thisform.txt_kd.Valuethisform.cmd_edit="edit"thisform.SetAll('enabled',.F.,'textbox')thisform.SetAll('enabled',.T.,'commandbutton')thisform.cmd_new.Caption="new"thisform.cmd_edit.Caption="edit"ELSEMESSAGEBOX("Anda belum mengisi nama barang!!!",0+48,"Peringatan")thisform.txt_nm.SetFocusENDIFENDIF