w_set_scdb.srw 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. $PBExportHeader$w_set_scdb.srw
  2. forward
  3. global type w_set_scdb from w_publ_base
  4. end type
  5. type cbx_his from checkbox within w_set_scdb
  6. end type
  7. type gb_1 from groupbox within w_set_scdb
  8. end type
  9. type mle_1 from multilineedit within w_set_scdb
  10. end type
  11. type cbx_switch from checkbox within w_set_scdb
  12. end type
  13. end forward
  14. global type w_set_scdb from w_publ_base
  15. integer width = 1783
  16. integer height = 580
  17. string title = "数据库设定"
  18. boolean minbox = false
  19. windowtype windowtype = response!
  20. long backcolor = 80269524
  21. cbx_his cbx_his
  22. gb_1 gb_1
  23. mle_1 mle_1
  24. cbx_switch cbx_switch
  25. end type
  26. global w_set_scdb w_set_scdb
  27. type variables
  28. uo_getdbinfo uo_setdbinfo
  29. end variables
  30. on w_set_scdb.create
  31. int iCurrent
  32. call super::create
  33. this.cbx_his=create cbx_his
  34. this.gb_1=create gb_1
  35. this.mle_1=create mle_1
  36. this.cbx_switch=create cbx_switch
  37. iCurrent=UpperBound(this.Control)
  38. this.Control[iCurrent+1]=this.cbx_his
  39. this.Control[iCurrent+2]=this.gb_1
  40. this.Control[iCurrent+3]=this.mle_1
  41. this.Control[iCurrent+4]=this.cbx_switch
  42. end on
  43. on w_set_scdb.destroy
  44. call super::destroy
  45. destroy(this.cbx_his)
  46. destroy(this.gb_1)
  47. destroy(this.mle_1)
  48. destroy(this.cbx_switch)
  49. end on
  50. event open;call super::open;uo_setdbinfo=create uo_getdbinfo
  51. end event
  52. event close;call super::close;halt
  53. end event
  54. type cb_func from w_publ_base`cb_func within w_set_scdb
  55. integer x = 1010
  56. integer y = 344
  57. integer width = 311
  58. integer height = 100
  59. string text = "确定"
  60. toolbaralignment pic_align = alignatleft!
  61. end type
  62. event cb_func::clicked;String arg_msg
  63. Int li_hisflag,li_switchflag
  64. IF cbx_his.Checked THEN
  65. li_hisflag = 1
  66. ELSE
  67. li_hisflag = 0
  68. END IF
  69. IF cbx_switch.Checked THEN
  70. li_switchflag = 1
  71. ELSE
  72. li_switchflag = 0
  73. END IF
  74. IF uo_setdbinfo.set_dbinfo(sqlca,li_hisflag,li_switchflag,arg_msg) = 0 THEN
  75. MessageBox("提示",arg_msg, Information!, OK! )
  76. RETURN
  77. END IF
  78. MessageBox("提示",'初始化数据库成功,请重新登录', Information!, OK! )
  79. HALT
  80. end event
  81. type cb_exit from w_publ_base`cb_exit within w_set_scdb
  82. integer x = 1390
  83. integer y = 344
  84. integer height = 100
  85. integer taborder = 30
  86. string text = "取消"
  87. end type
  88. event cb_exit::clicked;halt
  89. end event
  90. type cbx_his from checkbox within w_set_scdb
  91. integer x = 73
  92. integer y = 316
  93. integer width = 521
  94. integer height = 76
  95. boolean bringtotop = true
  96. integer textsize = -9
  97. integer weight = 400
  98. fontcharset fontcharset = gb2312charset!
  99. fontpitch fontpitch = variable!
  100. string facename = "宋体"
  101. long textcolor = 33554432
  102. long backcolor = 67108864
  103. string text = "设定为历史数据库"
  104. end type
  105. type gb_1 from groupbox within w_set_scdb
  106. integer x = 41
  107. integer y = 20
  108. integer width = 1701
  109. integer height = 244
  110. integer taborder = 20
  111. integer textsize = -9
  112. integer weight = 400
  113. fontcharset fontcharset = gb2312charset!
  114. fontpitch fontpitch = variable!
  115. string facename = "宋体"
  116. long textcolor = 16711935
  117. long backcolor = 67108864
  118. string text = "说明"
  119. end type
  120. type mle_1 from multilineedit within w_set_scdb
  121. integer x = 64
  122. integer y = 84
  123. integer width = 1650
  124. integer height = 140
  125. integer taborder = 20
  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 = 32768
  133. string text = " 数据库可设定为历史查询数据库或日常正式使用数据库,每月已完成的数据将转入历史查询数据库作查询用途。"
  134. boolean displayonly = true
  135. borderstyle borderstyle = stylelowered!
  136. end type
  137. type cbx_switch from checkbox within w_set_scdb
  138. boolean visible = false
  139. integer x = 73
  140. integer y = 408
  141. integer width = 608
  142. integer height = 76
  143. boolean bringtotop = true
  144. integer textsize = -9
  145. integer weight = 400
  146. fontcharset fontcharset = gb2312charset!
  147. fontpitch fontpitch = variable!
  148. string facename = "宋体"
  149. long textcolor = 33554432
  150. long backcolor = 67108864
  151. boolean enabled = false
  152. string text = "设定为切换数据库"
  153. end type