w_del_data.srw 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. $PBExportHeader$w_del_data.srw
  2. forward
  3. global type w_del_data from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_del_data
  6. end type
  7. type em_1 from editmask within w_del_data
  8. end type
  9. type st_4 from statictext within w_del_data
  10. end type
  11. type st_1 from statictext within w_del_data
  12. end type
  13. type st_2 from statictext within w_del_data
  14. end type
  15. end forward
  16. global type w_del_data from w_publ_base
  17. integer width = 1289
  18. integer height = 744
  19. string title = "数据删除"
  20. cb_1 cb_1
  21. em_1 em_1
  22. st_4 st_4
  23. st_1 st_1
  24. st_2 st_2
  25. end type
  26. global w_del_data w_del_data
  27. type variables
  28. long del_type
  29. end variables
  30. on w_del_data.create
  31. int iCurrent
  32. call super::create
  33. this.cb_1=create cb_1
  34. this.em_1=create em_1
  35. this.st_4=create st_4
  36. this.st_1=create st_1
  37. this.st_2=create st_2
  38. iCurrent=UpperBound(this.Control)
  39. this.Control[iCurrent+1]=this.cb_1
  40. this.Control[iCurrent+2]=this.em_1
  41. this.Control[iCurrent+3]=this.st_4
  42. this.Control[iCurrent+4]=this.st_1
  43. this.Control[iCurrent+5]=this.st_2
  44. end on
  45. on w_del_data.destroy
  46. call super::destroy
  47. destroy(this.cb_1)
  48. destroy(this.em_1)
  49. destroy(this.st_4)
  50. destroy(this.st_1)
  51. destroy(this.st_2)
  52. end on
  53. event open;call super::open;del_type = message.doubleparm
  54. end event
  55. type cb_func from w_publ_base`cb_func within w_del_data
  56. integer x = 46
  57. integer y = 904
  58. boolean enabled = false
  59. end type
  60. type cb_exit from w_publ_base`cb_exit within w_del_data
  61. integer x = 759
  62. integer y = 484
  63. integer width = 302
  64. integer height = 100
  65. string text = "取消"
  66. end type
  67. type cb_1 from uo_imflatbutton within w_del_data
  68. integer x = 279
  69. integer y = 484
  70. integer taborder = 30
  71. boolean bringtotop = true
  72. boolean default = true
  73. end type
  74. event clicked;call super::clicked;string msg
  75. datetime del_date
  76. msg = "是否确定要删除 "+string(em_1.text)+" 之前单据吗?数据删除后将不能恢复!"
  77. IF MessageBox ("询问",msg,Question!,YesNo! ) = 2 THEN RETURN
  78. del_date = datetime(date(em_1.text),time('23:59:59'))
  79. w_sys_wait.show()
  80. if del_type = 0 then
  81. delete from u_cusamt
  82. where cusdate <= :del_date
  83. and flag = 1;
  84. if sqlca.sqlcode <> 0 then
  85. rollback;
  86. messagebox('错误','数据删除失败,'+sqlca.sqlerrtext,stopsign!,ok!)
  87. w_sys_wait.hide()
  88. return
  89. end if
  90. else
  91. delete from u_rap_money
  92. where takedate <= :del_date
  93. and accountid = :del_type
  94. and rapmoneyid not in (select rapmoneyid from v_max_rapid);
  95. if sqlca.sqlcode <> 0 then
  96. rollback;
  97. messagebox('错误','数据删除失败,'+sqlca.sqlerrtext,stopsign!,ok!)
  98. w_sys_wait.hide()
  99. return
  100. end if
  101. end if
  102. commit;
  103. w_sys_wait.hide()
  104. messagebox('提示','数据删除成功',information!,ok!)
  105. end event
  106. type em_1 from editmask within w_del_data
  107. integer x = 375
  108. integer y = 304
  109. integer width = 443
  110. integer height = 84
  111. integer taborder = 10
  112. boolean bringtotop = true
  113. integer textsize = -10
  114. integer weight = 400
  115. fontcharset fontcharset = gb2312charset!
  116. fontpitch fontpitch = variable!
  117. string facename = "宋体"
  118. long textcolor = 33554432
  119. string text = "none"
  120. borderstyle borderstyle = stylelowered!
  121. maskdatatype maskdatatype = datemask!
  122. string mask = "yyyy-mm-dd"
  123. boolean spin = true
  124. end type
  125. event constructor;this.text = string(today(),'yyyy-mm-dd')
  126. end event
  127. type st_4 from statictext within w_del_data
  128. integer x = 73
  129. integer y = 84
  130. integer width = 1115
  131. integer height = 76
  132. boolean bringtotop = true
  133. integer textsize = -9
  134. integer weight = 400
  135. fontcharset fontcharset = gb2312charset!
  136. fontpitch fontpitch = variable!
  137. string facename = "宋体"
  138. long textcolor = 16711680
  139. long backcolor = 134217739
  140. boolean enabled = false
  141. string text = "提示:确定要删除以下日期之前的数据吗?"
  142. boolean focusrectangle = false
  143. end type
  144. type st_1 from statictext within w_del_data
  145. integer x = 183
  146. integer y = 320
  147. integer width = 183
  148. integer height = 48
  149. boolean bringtotop = true
  150. integer textsize = -9
  151. integer weight = 400
  152. fontcharset fontcharset = gb2312charset!
  153. fontpitch fontpitch = variable!
  154. string facename = "宋体"
  155. long backcolor = 134217739
  156. string text = "日期:"
  157. boolean focusrectangle = false
  158. end type
  159. type st_2 from statictext within w_del_data
  160. integer x = 73
  161. integer y = 188
  162. integer width = 1115
  163. integer height = 48
  164. boolean bringtotop = true
  165. integer textsize = -9
  166. integer weight = 400
  167. fontcharset fontcharset = gb2312charset!
  168. fontpitch fontpitch = variable!
  169. string facename = "宋体"
  170. long textcolor = 16711680
  171. long backcolor = 134217739
  172. string text = " 数据删除后将不能恢复!"
  173. boolean focusrectangle = false
  174. end type