w_func_set_version.srw 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. $PBExportHeader$w_func_set_version.srw
  2. forward
  3. global type w_func_set_version from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_func_set_version
  6. end type
  7. type rb_1 from radiobutton within w_func_set_version
  8. end type
  9. type rb_2 from radiobutton within w_func_set_version
  10. end type
  11. type rb_3 from radiobutton within w_func_set_version
  12. end type
  13. type rb_4 from radiobutton within w_func_set_version
  14. end type
  15. end forward
  16. global type w_func_set_version from w_publ_base
  17. integer width = 1751
  18. integer height = 620
  19. string title = "版本设定"
  20. boolean minbox = false
  21. windowtype windowtype = response!
  22. cb_1 cb_1
  23. rb_1 rb_1
  24. rb_2 rb_2
  25. rb_3 rb_3
  26. rb_4 rb_4
  27. end type
  28. global w_func_set_version w_func_set_version
  29. type variables
  30. s_sys_func s_func
  31. end variables
  32. on w_func_set_version.create
  33. int iCurrent
  34. call super::create
  35. this.cb_1=create cb_1
  36. this.rb_1=create rb_1
  37. this.rb_2=create rb_2
  38. this.rb_3=create rb_3
  39. this.rb_4=create rb_4
  40. iCurrent=UpperBound(this.Control)
  41. this.Control[iCurrent+1]=this.cb_1
  42. this.Control[iCurrent+2]=this.rb_1
  43. this.Control[iCurrent+3]=this.rb_2
  44. this.Control[iCurrent+4]=this.rb_3
  45. this.Control[iCurrent+5]=this.rb_4
  46. end on
  47. on w_func_set_version.destroy
  48. call super::destroy
  49. destroy(this.cb_1)
  50. destroy(this.rb_1)
  51. destroy(this.rb_2)
  52. destroy(this.rb_3)
  53. destroy(this.rb_4)
  54. end on
  55. event open;call super::open;Int li_versiontype
  56. s_func = Message.PowerObjectParm
  57. li_versiontype = s_func.versiontype
  58. IF li_versiontype = 0 THEN
  59. rb_1.Checked = TRUE
  60. rb_2.Checked = FALSE
  61. rb_3.Checked = FALSE
  62. rb_4.Checked = FALSE
  63. ELSEIF li_versiontype = 1 THEN
  64. rb_1.Checked = FALSE
  65. rb_2.Checked = TRUE
  66. rb_3.Checked = FALSE
  67. rb_4.Checked = FALSE
  68. ELSEIF li_versiontype = 2 THEN
  69. rb_1.Checked = FALSE
  70. rb_2.Checked = FALSE
  71. rb_3.Checked = FALSE
  72. rb_4.Checked = TRUE
  73. ELSE
  74. rb_1.Checked = FALSE
  75. rb_3.Checked = TRUE
  76. rb_2.Checked = FALSE
  77. rb_4.Checked = FALSE
  78. END IF
  79. end event
  80. type cb_func from w_publ_base`cb_func within w_func_set_version
  81. boolean visible = false
  82. integer x = 494
  83. integer y = 716
  84. boolean enabled = false
  85. end type
  86. type cb_exit from w_publ_base`cb_exit within w_func_set_version
  87. integer x = 859
  88. integer y = 312
  89. end type
  90. type cb_1 from uo_imflatbutton within w_func_set_version
  91. integer x = 366
  92. integer y = 312
  93. integer width = 311
  94. integer height = 96
  95. integer taborder = 10
  96. boolean bringtotop = true
  97. string normalpicname = "ok.bmp"
  98. end type
  99. event clicked;call super::clicked;Int li_versiontype
  100. String ls_msg
  101. IF rb_1.Checked THEN
  102. li_versiontype = 0
  103. ELSEIF rb_2.Checked THEN
  104. li_versiontype = 1
  105. ELSEIF rb_4.Checked THEN
  106. li_versiontype = 2
  107. ELSE
  108. li_versiontype = -1
  109. END IF
  110. UPDATE sys_func_pwr
  111. SET sys_func_pwr.versiontype = :li_versiontype
  112. Where sys_func_pwr.parentid = :s_func.funcid;
  113. IF sqlca.SQLCode <> 0 THEN
  114. MessageBox('提示','设置下级版本失败', Information!, OK! )
  115. return
  116. else
  117. MessageBox('提示','设置成功', Information!, OK! )
  118. close(parent)
  119. END IF
  120. end event
  121. type rb_1 from radiobutton within w_func_set_version
  122. integer x = 544
  123. integer y = 160
  124. integer width = 325
  125. integer height = 60
  126. boolean bringtotop = true
  127. integer textsize = -9
  128. integer weight = 400
  129. fontcharset fontcharset = gb2312charset!
  130. fontpitch fontpitch = variable!
  131. string facename = "宋体"
  132. long textcolor = 33554432
  133. long backcolor = 134217739
  134. string text = "工业版"
  135. boolean checked = true
  136. end type
  137. type rb_2 from radiobutton within w_func_set_version
  138. integer x = 1321
  139. integer y = 160
  140. integer width = 325
  141. integer height = 60
  142. boolean bringtotop = true
  143. integer textsize = -9
  144. integer weight = 400
  145. fontcharset fontcharset = gb2312charset!
  146. fontpitch fontpitch = variable!
  147. string facename = "宋体"
  148. long textcolor = 33554432
  149. long backcolor = 134217739
  150. string text = "商业版 "
  151. end type
  152. type rb_3 from radiobutton within w_func_set_version
  153. integer x = 155
  154. integer y = 160
  155. integer width = 325
  156. integer height = 60
  157. boolean bringtotop = true
  158. integer textsize = -9
  159. integer weight = 400
  160. fontcharset fontcharset = gb2312charset!
  161. fontpitch fontpitch = variable!
  162. string facename = "宋体"
  163. long textcolor = 33554432
  164. long backcolor = 134217739
  165. string text = "公共版"
  166. end type
  167. type rb_4 from radiobutton within w_func_set_version
  168. integer x = 933
  169. integer y = 160
  170. integer width = 325
  171. integer height = 60
  172. boolean bringtotop = true
  173. integer textsize = -9
  174. integer weight = 400
  175. fontcharset fontcharset = gb2312charset!
  176. fontpitch fontpitch = variable!
  177. string facename = "宋体"
  178. long textcolor = 33554432
  179. long backcolor = 134217739
  180. string text = "工业版+"
  181. boolean checked = true
  182. end type