w_sys_log.srw 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. $PBExportHeader$w_sys_log.srw
  2. forward
  3. global type w_sys_log from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_sys_log
  6. end type
  7. type cb_4 from uo_imflatbutton within w_sys_log
  8. end type
  9. end forward
  10. global type w_sys_log from w_publ_easyq
  11. string title = "系统操作日志"
  12. cbx_1 cbx_1
  13. cb_4 cb_4
  14. end type
  15. global w_sys_log w_sys_log
  16. on w_sys_log.create
  17. int iCurrent
  18. call super::create
  19. this.cbx_1=create cbx_1
  20. this.cb_4=create cb_4
  21. iCurrent=UpperBound(this.Control)
  22. this.Control[iCurrent+1]=this.cbx_1
  23. this.Control[iCurrent+2]=this.cb_4
  24. end on
  25. on w_sys_log.destroy
  26. call super::destroy
  27. destroy(this.cbx_1)
  28. destroy(this.cb_4)
  29. end on
  30. event ue_before_openretrieve;call super::ue_before_openretrieve;EM_1.TEXT=STRING(TODAY(),'YYYY-MM-DD')
  31. EM_2.TEXT=EM_1.TEXT
  32. end event
  33. type cb_func from w_publ_easyq`cb_func within w_sys_log
  34. end type
  35. type cb_exit from w_publ_easyq`cb_exit within w_sys_log
  36. integer x = 658
  37. end type
  38. type cb_2 from w_publ_easyq`cb_2 within w_sys_log
  39. boolean visible = false
  40. integer x = 699
  41. integer taborder = 100
  42. boolean bringtotop = true
  43. end type
  44. type cb_psetup from w_publ_easyq`cb_psetup within w_sys_log
  45. boolean visible = false
  46. integer x = 658
  47. boolean bringtotop = true
  48. end type
  49. type cb_1 from w_publ_easyq`cb_1 within w_sys_log
  50. boolean bringtotop = true
  51. end type
  52. event cb_1::clicked;call super::clicked;datetime first_date,end_date
  53. first_date=datetime(date(em_1.text),time(0))
  54. end_date=datetime(date(em_2.text),time('23:59:59'))
  55. dw_1.retrieve(first_date,end_date)
  56. end event
  57. type st_3 from w_publ_easyq`st_3 within w_sys_log
  58. integer x = 23
  59. integer y = 220
  60. end type
  61. type st_4 from w_publ_easyq`st_4 within w_sys_log
  62. integer x = 631
  63. integer y = 224
  64. end type
  65. type em_1 from w_publ_easyq`em_1 within w_sys_log
  66. integer x = 242
  67. integer y = 200
  68. integer width = 398
  69. integer taborder = 110
  70. end type
  71. type em_2 from w_publ_easyq`em_2 within w_sys_log
  72. integer x = 731
  73. integer y = 200
  74. integer width = 398
  75. integer taborder = 120
  76. end type
  77. type ddlb_yl from w_publ_easyq`ddlb_yl within w_sys_log
  78. boolean visible = false
  79. integer x = 1531
  80. integer y = 40
  81. end type
  82. type cbx_yl from w_publ_easyq`cbx_yl within w_sys_log
  83. boolean visible = false
  84. integer x = 1326
  85. integer y = 44
  86. end type
  87. type dw_1 from w_publ_easyq`dw_1 within w_sys_log
  88. integer y = 304
  89. string dataobject = "dw_sys_log"
  90. end type
  91. type sle_mtrl from w_publ_easyq`sle_mtrl within w_sys_log
  92. end type
  93. type sle_cust from w_publ_easyq`sle_cust within w_sys_log
  94. end type
  95. type st_mtrl from w_publ_easyq`st_mtrl within w_sys_log
  96. end type
  97. type st_cust from w_publ_easyq`st_cust within w_sys_log
  98. end type
  99. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_sys_log
  100. end type
  101. type pb_em1 from w_publ_easyq`pb_em1 within w_sys_log
  102. end type
  103. type pb_em2 from w_publ_easyq`pb_em2 within w_sys_log
  104. integer x = 1138
  105. end type
  106. type pb_2 from w_publ_easyq`pb_2 within w_sys_log
  107. integer x = 1248
  108. end type
  109. type cb_help from w_publ_easyq`cb_help within w_sys_log
  110. integer x = 507
  111. end type
  112. type cb_copyself from w_publ_easyq`cb_copyself within w_sys_log
  113. boolean visible = false
  114. end type
  115. type gb_1 from w_publ_easyq`gb_1 within w_sys_log
  116. end type
  117. type ln_bar from w_publ_easyq`ln_bar within w_sys_log
  118. end type
  119. type ln_bar2 from w_publ_easyq`ln_bar2 within w_sys_log
  120. end type
  121. type r_bar from w_publ_easyq`r_bar within w_sys_log
  122. end type
  123. type ln_1 from w_publ_easyq`ln_1 within w_sys_log
  124. end type
  125. type ln_2 from w_publ_easyq`ln_2 within w_sys_log
  126. end type
  127. type ln_3 from w_publ_easyq`ln_3 within w_sys_log
  128. end type
  129. type ln_4 from w_publ_easyq`ln_4 within w_sys_log
  130. end type
  131. type cbx_1 from checkbox within w_sys_log
  132. integer x = 1376
  133. integer y = 204
  134. integer width = 224
  135. integer height = 76
  136. boolean bringtotop = true
  137. integer textsize = -9
  138. integer weight = 400
  139. fontcharset fontcharset = gb2312charset!
  140. fontpitch fontpitch = variable!
  141. string facename = "宋体"
  142. long textcolor = 33554432
  143. long backcolor = 134217739
  144. string text = "全选"
  145. end type
  146. event clicked;long i
  147. if dw_1.rowcount()>0 then
  148. if this.checked then
  149. for i=1 to dw_1.rowcount()
  150. dw_1.object.deleteflag[i]=1
  151. next
  152. else
  153. for i=1 to dw_1.rowcount()
  154. dw_1.object.deleteflag[i]=0
  155. next
  156. end if
  157. end if
  158. end event
  159. type cb_4 from uo_imflatbutton within w_sys_log
  160. integer x = 302
  161. integer width = 206
  162. integer height = 164
  163. integer taborder = 80
  164. boolean bringtotop = true
  165. string text = "删日志"
  166. string normalpicname = "delete.bmp"
  167. integer picsize = 16
  168. toolbaralignment pic_align = alignattop!
  169. boolean border = false
  170. end type
  171. event clicked;call super::clicked;if not sys_power_issuper then
  172. messagebox(publ_operator,'你没有使用权限!')
  173. return
  174. end if
  175. long i,logid
  176. if dw_1.rowcount()>0 then
  177. for i=1 to dw_1.rowcount()
  178. if dw_1.object.deleteflag[i]=1 then
  179. logid=dw_1.object.logid[i]
  180. delete from sys_oplog where logid=:logid;
  181. if sqlca.sqlcode<>0 then
  182. messagebox('错误','删除日志失败', StopSign!, OK! )
  183. return
  184. end if
  185. end if
  186. next
  187. messagebox('错误','删除日志成功', StopSign!, OK! )
  188. cb_1.triggerevent(clicked!)
  189. else
  190. messagebox('错误','没有可删除的日志', StopSign!, OK! )
  191. end if
  192. end event
  193. type cb_sent from w_publ_easyq`cb_func within w_sys_log
  194. int X=530
  195. int Y=0
  196. int TabOrder=90
  197. boolean BringToTop=true
  198. end type