w_his_data_del.srw 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. $PBExportHeader$w_his_data_del.srw
  2. forward
  3. global type w_his_data_del from w_publ_base
  4. end type
  5. type mle_log from multilineedit within w_his_data_del
  6. end type
  7. type st_msg from statictext within w_his_data_del
  8. end type
  9. type gb_14 from groupbox within w_his_data_del
  10. end type
  11. type st_222 from statictext within w_his_data_del
  12. end type
  13. type ddlb_bg from dropdownlistbox within w_his_data_del
  14. end type
  15. type st_1 from statictext within w_his_data_del
  16. end type
  17. type cb_1 from commandbutton within w_his_data_del
  18. end type
  19. type st_2 from statictext within w_his_data_del
  20. end type
  21. type em_step from editmask within w_his_data_del
  22. end type
  23. end forward
  24. global type w_his_data_del from w_publ_base
  25. integer x = 46
  26. integer y = 32
  27. integer width = 3118
  28. integer height = 1640
  29. string title = "历史数据删除"
  30. boolean maxbox = true
  31. windowstate windowstate = maximized!
  32. long backcolor = 80269524
  33. mle_log mle_log
  34. st_msg st_msg
  35. gb_14 gb_14
  36. st_222 st_222
  37. ddlb_bg ddlb_bg
  38. st_1 st_1
  39. cb_1 cb_1
  40. st_2 st_2
  41. em_step em_step
  42. end type
  43. global w_his_data_del w_his_data_del
  44. type variables
  45. uo_yfct uo_ct
  46. end variables
  47. on w_his_data_del.create
  48. int iCurrent
  49. call super::create
  50. this.mle_log=create mle_log
  51. this.st_msg=create st_msg
  52. this.gb_14=create gb_14
  53. this.st_222=create st_222
  54. this.ddlb_bg=create ddlb_bg
  55. this.st_1=create st_1
  56. this.cb_1=create cb_1
  57. this.st_2=create st_2
  58. this.em_step=create em_step
  59. iCurrent=UpperBound(this.Control)
  60. this.Control[iCurrent+1]=this.mle_log
  61. this.Control[iCurrent+2]=this.st_msg
  62. this.Control[iCurrent+3]=this.gb_14
  63. this.Control[iCurrent+4]=this.st_222
  64. this.Control[iCurrent+5]=this.ddlb_bg
  65. this.Control[iCurrent+6]=this.st_1
  66. this.Control[iCurrent+7]=this.cb_1
  67. this.Control[iCurrent+8]=this.st_2
  68. this.Control[iCurrent+9]=this.em_step
  69. end on
  70. on w_his_data_del.destroy
  71. call super::destroy
  72. destroy(this.mle_log)
  73. destroy(this.st_msg)
  74. destroy(this.gb_14)
  75. destroy(this.st_222)
  76. destroy(this.ddlb_bg)
  77. destroy(this.st_1)
  78. destroy(this.cb_1)
  79. destroy(this.st_2)
  80. destroy(this.em_step)
  81. end on
  82. event resize;mle_log.width=newwidth - mle_log.x - 5
  83. mle_log.height=newheight - mle_log.y - 10
  84. end event
  85. type cb_func from w_publ_base`cb_func within w_his_data_del
  86. boolean visible = false
  87. integer x = 649
  88. integer y = 708
  89. boolean enabled = false
  90. end type
  91. type cb_exit from w_publ_base`cb_exit within w_his_data_del
  92. boolean visible = false
  93. integer x = 969
  94. integer y = 708
  95. boolean enabled = false
  96. end type
  97. type mle_log from multilineedit within w_his_data_del
  98. integer y = 284
  99. integer width = 3077
  100. integer height = 1248
  101. integer taborder = 100
  102. boolean bringtotop = true
  103. integer textsize = -9
  104. integer weight = 400
  105. fontcharset fontcharset = gb2312charset!
  106. fontpitch fontpitch = variable!
  107. string facename = "宋体"
  108. long textcolor = 33554432
  109. boolean hscrollbar = true
  110. boolean vscrollbar = true
  111. boolean displayonly = true
  112. borderstyle borderstyle = stylelowered!
  113. end type
  114. type st_msg from statictext within w_his_data_del
  115. integer y = 192
  116. integer width = 2880
  117. integer height = 88
  118. boolean bringtotop = true
  119. integer textsize = -9
  120. integer weight = 400
  121. fontcharset fontcharset = gb2312charset!
  122. fontpitch fontpitch = variable!
  123. string facename = "宋体"
  124. long backcolor = 16776960
  125. boolean enabled = false
  126. boolean border = true
  127. boolean focusrectangle = false
  128. end type
  129. type gb_14 from groupbox within w_his_data_del
  130. integer width = 2665
  131. integer height = 192
  132. integer taborder = 70
  133. integer textsize = -9
  134. integer weight = 700
  135. fontcharset fontcharset = gb2312charset!
  136. fontpitch fontpitch = variable!
  137. string facename = "宋体"
  138. long textcolor = 33554432
  139. long backcolor = 67108864
  140. string text = "历史数据库删除范围:"
  141. end type
  142. type st_222 from statictext within w_his_data_del
  143. integer x = 32
  144. integer y = 88
  145. integer width = 375
  146. integer height = 64
  147. boolean bringtotop = true
  148. integer textsize = -9
  149. integer weight = 400
  150. fontcharset fontcharset = gb2312charset!
  151. fontpitch fontpitch = variable!
  152. string facename = "宋体"
  153. long textcolor = 255
  154. long backcolor = 67108864
  155. boolean enabled = false
  156. string text = "删除截数时间:"
  157. boolean focusrectangle = false
  158. end type
  159. type ddlb_bg from dropdownlistbox within w_his_data_del
  160. integer x = 393
  161. integer y = 72
  162. integer width = 667
  163. integer height = 972
  164. integer taborder = 80
  165. boolean bringtotop = true
  166. integer textsize = -9
  167. integer weight = 400
  168. fontcharset fontcharset = gb2312charset!
  169. fontpitch fontpitch = variable!
  170. string facename = "宋体"
  171. long textcolor = 33554432
  172. boolean sorted = false
  173. boolean vscrollbar = true
  174. borderstyle borderstyle = stylelowered!
  175. end type
  176. event constructor;long ctmint
  177. long ctdt_num=0
  178. DECLARE ct_cur CURSOR FOR
  179. SELECT distinct u_inware.ctmint
  180. FROM u_inware
  181. ORDER BY u_inware.ctmint ASC ;
  182. open ct_cur;
  183. fetch ct_cur into :ctmint;
  184. do while sqlca.sqlcode=0
  185. ddlb_bg.additem(string(ctmint))
  186. ctdt_num++
  187. fetch ct_cur into :ctmint;
  188. loop
  189. close ct_cur;
  190. if ctdt_num=0 then
  191. ctmint = 19000101
  192. ddlb_bg.additem(string(ctmint))
  193. end if
  194. ddlb_bg.text=string(ctmint)
  195. end event
  196. type st_1 from statictext within w_his_data_del
  197. integer x = 1074
  198. integer y = 88
  199. integer width = 402
  200. integer height = 64
  201. boolean bringtotop = true
  202. integer textsize = -9
  203. integer weight = 400
  204. fontcharset fontcharset = gb2312charset!
  205. fontpitch fontpitch = variable!
  206. string facename = "宋体"
  207. long textcolor = 255
  208. long backcolor = 67108864
  209. string text = "以前的数据!"
  210. boolean focusrectangle = false
  211. end type
  212. type cb_1 from commandbutton within w_his_data_del
  213. integer x = 2089
  214. integer y = 72
  215. integer width = 302
  216. integer height = 96
  217. integer taborder = 60
  218. boolean bringtotop = true
  219. integer textsize = -9
  220. integer weight = 400
  221. fontcharset fontcharset = gb2312charset!
  222. fontpitch fontpitch = variable!
  223. string facename = "宋体"
  224. string text = "执行删除"
  225. end type
  226. event clicked;if MessageBox("询问",'是否确定要删除数据? ', Exclamation!, yesno!, 2) =2 then return
  227. //if if_hisdb then
  228. // messagebox("系统提示",'当前数据库是历史查询数据库,不能删除历史数据')
  229. // return
  230. //end if
  231. datetime arg_ct_time
  232. long bg_ctmint,ed_ctmint
  233. int ls_step
  234. string arg_msg,arg_log
  235. bg_ctmint=long(ddlb_bg.text)
  236. ed_ctmint=long(ddlb_bg.text)
  237. ls_step=integer(em_step.text)
  238. if ls_step=0 then
  239. messagebox("提示",'请输入提交步长',information!,OK!)
  240. return
  241. end if
  242. st_msg.text=''
  243. uo_ct = create uo_yfct
  244. uo_ct.del_ct_data(arg_ct_time,0,bg_ctmint,ed_ctmint,ls_step,arg_msg,arg_log,true)
  245. mle_log.text=arg_log
  246. destroy uo_yfct
  247. messagebox("提示",'数据删除完毕',information!,OK!)
  248. end event
  249. type st_2 from statictext within w_his_data_del
  250. integer x = 1417
  251. integer y = 88
  252. integer width = 274
  253. integer height = 64
  254. boolean bringtotop = true
  255. integer textsize = -9
  256. integer weight = 400
  257. fontcharset fontcharset = gb2312charset!
  258. fontpitch fontpitch = variable!
  259. string facename = "宋体"
  260. long textcolor = 33554432
  261. long backcolor = 67108864
  262. string text = "提交步长:"
  263. alignment alignment = right!
  264. boolean focusrectangle = false
  265. end type
  266. type em_step from editmask within w_his_data_del
  267. integer x = 1705
  268. integer y = 72
  269. integer width = 302
  270. integer height = 96
  271. integer taborder = 110
  272. boolean bringtotop = true
  273. integer textsize = -9
  274. integer weight = 400
  275. fontcharset fontcharset = gb2312charset!
  276. fontpitch fontpitch = variable!
  277. string facename = "宋体"
  278. long textcolor = 33554432
  279. string text = "100"
  280. alignment alignment = center!
  281. borderstyle borderstyle = stylelowered!
  282. string mask = "###"
  283. boolean spin = true
  284. double increment = 10
  285. string minmax = "50~~150"
  286. end type