Advertisement
Guest User

UAS

a guest
Dec 1st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (form)
  2. {Procedure Init}
  3. Thisform.text1.Value=""
  4.  
  5. Thisform.text2.Value=""
  6.  
  7. Thisform.text3.Value=DATE()
  8.  
  9. Thisform.text4.Value=""
  10.  
  11. Thisform.text5.Value=0
  12.  
  13. Thisform.combo1.Value=""
  14.  
  15. Thisform.optiongroup1.Value = 1
  16.  
  17. thisform.text1.SetFocus
  18.  
  19. {Procedure Load}
  20. CLOSE DATABASE
  21.  
  22. SET TALK OFF
  23.  
  24. SET ECHO OFF
  25.  
  26. USE pegawai.dbf
  27.  
  28. {Procedure Unload}
  29. Close Database
  30.  
  31. Command2 (Tombol Simpan)
  32. Procedure Click
  33. APPEND BLANK
  34.  
  35. replace nip WITH thisform.text1.Value
  36.  
  37. replace nama WITH thisform.text2.Value
  38.  
  39. replace tgllahir WITH thisform.text3.Value
  40.  
  41. replace alamat WITH thisform.text4.value
  42.  
  43. replace gol WITH thisform.combo1.Value
  44.  
  45. IF thisform.optiongroup1.Value =1
  46.  
  47. replace jnskel WITH .T.
  48.  
  49. ELSE
  50.  
  51. replace jnskel WITH .F.
  52.  
  53. ENDIF
  54.  
  55. replace jamk WITH thisform.text5.Value
  56.  
  57. thisform.Init
  58.  
  59. Command4 (Tombol Cari)
  60. Procedure Click
  61. LOCATE FOR nip = ALLTRIM(thisform.text1.Value)
  62. IF FOUND()
  63. thisform.text1.Value = nip
  64. thisform.text2.Value = nama
  65. thisform.text3.Value = tgllahir
  66. thisform.text4.Value = alamat
  67. thisform.combo1.Value = gol
  68. IF jnskel
  69. thisform.Optiongroup1.Option1.Value=1
  70. thisform.Optiongroup1.Option2.Value=0
  71. ELSE
  72. thisform.Optiongroup1.Option1.Value=0
  73. thisform.Optiongroup1.Option2.Value=1
  74. ENDIF
  75. thisform.text5.Value=jamk
  76. ELSE
  77. MESSAGEBOX("data tidak ditemukan")
  78.  
  79. thisform.Init
  80. thisform.text1.SetFocus
  81. ENDIF
  82.  
  83. Command5 (Tombol Edit)
  84. Procedure Click
  85. replace nip WITH thisform.text1.Value
  86. replace nama WITH thisform.text2.Value
  87. replace tgllahir WITH thisform.text3.Value
  88. replace alamat WITH thisform.text4.Value
  89. replace gol WITH thisform.combo1.Value
  90. IF thisform.Optiongroup1.Value=1
  91. replace jnskel WITH .T.
  92. ELSE
  93. replace jnskel WITH .F.
  94. ENDIF
  95. replace jamk WITH thisform.text5.Value
  96. thisform.Init
  97.  
  98. Command6 (Tombol Hapus)
  99. Procedure Click
  100. DELETE
  101. PACK
  102. thisform.text1.Value=""
  103. thisform.text2.Value=""
  104. thisform.text3.Value=""
  105. thisform.text4.Value=""
  106. thisform.text5.Value=""
  107. thisform.combo1.Value=""
  108. thisform.text1.SetFocus
  109.  
  110. Command1 (Tombol Browse)
  111. Procedure Click
  112. Browse
  113.  
  114. Command3 (Tombol Keluar)
  115. Procedure Click
  116. Thisform.Release()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement