w_set_sqlca_fj.srw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. $PBExportHeader$w_set_sqlca_fj.srw
  2. $PBExportComments$数据库连接窗口
  3. forward
  4. global type w_set_sqlca_fj from w_publ_base
  5. end type
  6. type cb_ok from uo_imflatbutton within w_set_sqlca_fj
  7. end type
  8. type sle_logpass from singlelineedit within w_set_sqlca_fj
  9. end type
  10. type sle_logid from singlelineedit within w_set_sqlca_fj
  11. end type
  12. type sle_server from singlelineedit within w_set_sqlca_fj
  13. end type
  14. type sle_database from singlelineedit within w_set_sqlca_fj
  15. end type
  16. type sle_dbpass from singlelineedit within w_set_sqlca_fj
  17. end type
  18. type sle_userid from singlelineedit within w_set_sqlca_fj
  19. end type
  20. type sle_dbparm from singlelineedit within w_set_sqlca_fj
  21. end type
  22. type st_9 from statictext within w_set_sqlca_fj
  23. end type
  24. type st_6 from statictext within w_set_sqlca_fj
  25. end type
  26. type st_5 from statictext within w_set_sqlca_fj
  27. end type
  28. type st_4 from statictext within w_set_sqlca_fj
  29. end type
  30. type st_3 from statictext within w_set_sqlca_fj
  31. end type
  32. type st_2 from statictext within w_set_sqlca_fj
  33. end type
  34. type st_00 from statictext within w_set_sqlca_fj
  35. end type
  36. type st_7 from statictext within w_set_sqlca_fj
  37. end type
  38. type sle_dbms from dropdownlistbox within w_set_sqlca_fj
  39. end type
  40. end forward
  41. global type w_set_sqlca_fj from w_publ_base
  42. integer x = 283
  43. integer y = 12
  44. integer width = 2331
  45. integer height = 492
  46. string title = "附件数据库连接设置"
  47. boolean minbox = false
  48. windowtype windowtype = response!
  49. cb_ok cb_ok
  50. sle_logpass sle_logpass
  51. sle_logid sle_logid
  52. sle_server sle_server
  53. sle_database sle_database
  54. sle_dbpass sle_dbpass
  55. sle_userid sle_userid
  56. sle_dbparm sle_dbparm
  57. st_9 st_9
  58. st_6 st_6
  59. st_5 st_5
  60. st_4 st_4
  61. st_3 st_3
  62. st_2 st_2
  63. st_00 st_00
  64. st_7 st_7
  65. sle_dbms sle_dbms
  66. end type
  67. global w_set_sqlca_fj w_set_sqlca_fj
  68. type prototypes
  69. Subroutine Sleep(ulong dwMilliseconds) LIBRARY "kernel32.dll"
  70. Function long ShellExecuteA (long hwnd, string lpOperation ,String lpFile, String lpParameters, String lpDirectory, Long nShowCmd) Library "shell32.dll" alias for "ShellExecuteA;Ansi"
  71. end prototypes
  72. type variables
  73. end variables
  74. event open;call super::open;// Open script for W_SET_SQLCA
  75. sle_dbms.Text = sys_fileDB_sqlca.DBMS
  76. sle_database.Text = sys_fileDB_sqlca.database
  77. sle_userid.Text = sys_fileDB_sqlca.userid
  78. sle_dbpass.Text = sys_fileDB_sqlca.dbpass
  79. sle_logid.Text = sys_fileDB_sqlca.logid
  80. sle_logpass.Text = sys_fileDB_sqlca.logpass
  81. sle_server.Text = sys_fileDB_sqlca.servername
  82. sle_dbparm.Text = sys_fileDB_sqlca.dbparm
  83. end event
  84. on w_set_sqlca_fj.create
  85. int iCurrent
  86. call super::create
  87. this.cb_ok=create cb_ok
  88. this.sle_logpass=create sle_logpass
  89. this.sle_logid=create sle_logid
  90. this.sle_server=create sle_server
  91. this.sle_database=create sle_database
  92. this.sle_dbpass=create sle_dbpass
  93. this.sle_userid=create sle_userid
  94. this.sle_dbparm=create sle_dbparm
  95. this.st_9=create st_9
  96. this.st_6=create st_6
  97. this.st_5=create st_5
  98. this.st_4=create st_4
  99. this.st_3=create st_3
  100. this.st_2=create st_2
  101. this.st_00=create st_00
  102. this.st_7=create st_7
  103. this.sle_dbms=create sle_dbms
  104. iCurrent=UpperBound(this.Control)
  105. this.Control[iCurrent+1]=this.cb_ok
  106. this.Control[iCurrent+2]=this.sle_logpass
  107. this.Control[iCurrent+3]=this.sle_logid
  108. this.Control[iCurrent+4]=this.sle_server
  109. this.Control[iCurrent+5]=this.sle_database
  110. this.Control[iCurrent+6]=this.sle_dbpass
  111. this.Control[iCurrent+7]=this.sle_userid
  112. this.Control[iCurrent+8]=this.sle_dbparm
  113. this.Control[iCurrent+9]=this.st_9
  114. this.Control[iCurrent+10]=this.st_6
  115. this.Control[iCurrent+11]=this.st_5
  116. this.Control[iCurrent+12]=this.st_4
  117. this.Control[iCurrent+13]=this.st_3
  118. this.Control[iCurrent+14]=this.st_2
  119. this.Control[iCurrent+15]=this.st_00
  120. this.Control[iCurrent+16]=this.st_7
  121. this.Control[iCurrent+17]=this.sle_dbms
  122. end on
  123. on w_set_sqlca_fj.destroy
  124. call super::destroy
  125. destroy(this.cb_ok)
  126. destroy(this.sle_logpass)
  127. destroy(this.sle_logid)
  128. destroy(this.sle_server)
  129. destroy(this.sle_database)
  130. destroy(this.sle_dbpass)
  131. destroy(this.sle_userid)
  132. destroy(this.sle_dbparm)
  133. destroy(this.st_9)
  134. destroy(this.st_6)
  135. destroy(this.st_5)
  136. destroy(this.st_4)
  137. destroy(this.st_3)
  138. destroy(this.st_2)
  139. destroy(this.st_00)
  140. destroy(this.st_7)
  141. destroy(this.sle_dbms)
  142. end on
  143. type cb_func from w_publ_base`cb_func within w_set_sqlca_fj
  144. boolean visible = false
  145. integer x = 1934
  146. integer y = 644
  147. boolean enabled = false
  148. end type
  149. type cb_exit from w_publ_base`cb_exit within w_set_sqlca_fj
  150. integer x = 1938
  151. integer y = 168
  152. integer width = 315
  153. string text = "取消"
  154. end type
  155. type cb_ok from uo_imflatbutton within w_set_sqlca_fj
  156. integer x = 1938
  157. integer y = 48
  158. integer width = 315
  159. integer height = 96
  160. integer taborder = 60
  161. end type
  162. event clicked;call super::clicked;IF Trim(sle_database.Text) = '' THEN
  163. MessageBox('系统提示','请输入database!')
  164. RETURN
  165. END IF
  166. IF Trim(sle_server.Text) = '' THEN
  167. MessageBox('系统提示','请输入server name!')
  168. RETURN
  169. END IF
  170. SetProfileString (sys_inifilename, "fjdatabase", "dbms", sle_dbms.Text)
  171. SetProfileString (sys_inifilename, "fjdatabase", "database", sle_database.Text)
  172. SetProfileString (sys_inifilename, "fjdatabase", "userid", sle_userid.Text)
  173. SetProfileString (sys_inifilename, "fjdatabase", "dbpass", f_psw_bczh(sle_dbpass.Text,0,sys_power_key))
  174. SetProfileString (sys_inifilename, "fjdatabase", "logid", sle_logid.Text)
  175. SetProfileString (sys_inifilename, "fjdatabase", "LogPassWord", f_psw_bczh(sle_logpass.Text,0,sys_power_key))
  176. SetProfileString (sys_inifilename, "fjdatabase", "servername", sle_server.Text)
  177. SetProfileString (sys_inifilename, "fjdatabase", "dbparm", f_psw_bczh(sle_dbparm.Text,0,sys_power_key))
  178. MessageBox('','设置保存完成!系统必须重起!')
  179. CloseWithReturn (PARENT,1)
  180. Restart()
  181. end event
  182. type sle_logpass from singlelineedit within w_set_sqlca_fj
  183. integer x = 443
  184. integer y = 288
  185. integer width = 1422
  186. integer height = 80
  187. integer taborder = 140
  188. integer textsize = -8
  189. integer weight = 400
  190. fontpitch fontpitch = variable!
  191. fontfamily fontfamily = swiss!
  192. string facename = "MS Sans Serif"
  193. long textcolor = 41943040
  194. boolean autohscroll = false
  195. boolean password = true
  196. borderstyle borderstyle = stylelowered!
  197. end type
  198. type sle_logid from singlelineedit within w_set_sqlca_fj
  199. integer x = 443
  200. integer y = 200
  201. integer width = 1422
  202. integer height = 80
  203. integer taborder = 130
  204. integer textsize = -8
  205. integer weight = 400
  206. fontpitch fontpitch = variable!
  207. fontfamily fontfamily = swiss!
  208. string facename = "MS Sans Serif"
  209. long textcolor = 41943040
  210. boolean autohscroll = false
  211. borderstyle borderstyle = stylelowered!
  212. end type
  213. type sle_server from singlelineedit within w_set_sqlca_fj
  214. integer x = 443
  215. integer y = 112
  216. integer width = 1422
  217. integer height = 80
  218. integer taborder = 120
  219. integer textsize = -8
  220. integer weight = 400
  221. fontpitch fontpitch = variable!
  222. fontfamily fontfamily = swiss!
  223. string facename = "MS Sans Serif"
  224. long textcolor = 41943040
  225. boolean autohscroll = false
  226. borderstyle borderstyle = stylelowered!
  227. end type
  228. type sle_database from singlelineedit within w_set_sqlca_fj
  229. integer x = 443
  230. integer y = 24
  231. integer width = 1422
  232. integer height = 80
  233. integer taborder = 50
  234. integer textsize = -8
  235. integer weight = 400
  236. fontpitch fontpitch = variable!
  237. fontfamily fontfamily = swiss!
  238. string facename = "MS Sans Serif"
  239. long textcolor = 41943040
  240. boolean autohscroll = false
  241. borderstyle borderstyle = stylelowered!
  242. end type
  243. type sle_dbpass from singlelineedit within w_set_sqlca_fj
  244. boolean visible = false
  245. integer x = 443
  246. integer y = 204
  247. integer width = 1422
  248. integer height = 80
  249. integer taborder = 20
  250. integer textsize = -8
  251. integer weight = 400
  252. fontpitch fontpitch = variable!
  253. fontfamily fontfamily = swiss!
  254. string facename = "MS Sans Serif"
  255. long textcolor = 41943040
  256. boolean enabled = false
  257. boolean autohscroll = false
  258. boolean password = true
  259. borderstyle borderstyle = stylelowered!
  260. end type
  261. type sle_userid from singlelineedit within w_set_sqlca_fj
  262. boolean visible = false
  263. integer x = 443
  264. integer y = 116
  265. integer width = 1422
  266. integer height = 80
  267. integer taborder = 10
  268. integer textsize = -8
  269. integer weight = 400
  270. fontcharset fontcharset = ansi!
  271. fontpitch fontpitch = variable!
  272. fontfamily fontfamily = swiss!
  273. string facename = "MS Sans Serif"
  274. long textcolor = 41943040
  275. boolean enabled = false
  276. boolean autohscroll = false
  277. borderstyle borderstyle = stylelowered!
  278. end type
  279. type sle_dbparm from singlelineedit within w_set_sqlca_fj
  280. boolean visible = false
  281. integer x = 443
  282. integer y = 644
  283. integer width = 1422
  284. integer height = 80
  285. integer taborder = 150
  286. integer textsize = -8
  287. integer weight = 400
  288. fontpitch fontpitch = variable!
  289. fontfamily fontfamily = swiss!
  290. string facename = "MS Sans Serif"
  291. long textcolor = 41943040
  292. borderstyle borderstyle = stylelowered!
  293. end type
  294. type st_9 from statictext within w_set_sqlca_fj
  295. boolean visible = false
  296. integer x = 192
  297. integer y = 656
  298. integer width = 233
  299. integer height = 60
  300. integer textsize = -8
  301. integer weight = 400
  302. fontpitch fontpitch = variable!
  303. fontfamily fontfamily = swiss!
  304. string facename = "MS Sans Serif"
  305. long textcolor = 41943040
  306. long backcolor = 74481808
  307. boolean enabled = false
  308. string text = "DBPARM:"
  309. alignment alignment = right!
  310. boolean focusrectangle = false
  311. end type
  312. type st_6 from statictext within w_set_sqlca_fj
  313. integer x = 18
  314. integer y = 296
  315. integer width = 407
  316. integer height = 60
  317. integer textsize = -8
  318. integer weight = 400
  319. fontpitch fontpitch = variable!
  320. fontfamily fontfamily = swiss!
  321. string facename = "MS Sans Serif"
  322. long textcolor = 41943040
  323. long backcolor = 134217739
  324. boolean enabled = false
  325. string text = "登录 口令:"
  326. alignment alignment = right!
  327. boolean focusrectangle = false
  328. end type
  329. type st_5 from statictext within w_set_sqlca_fj
  330. integer x = 155
  331. integer y = 212
  332. integer width = 270
  333. integer height = 60
  334. integer textsize = -8
  335. integer weight = 400
  336. fontpitch fontpitch = variable!
  337. fontfamily fontfamily = swiss!
  338. string facename = "MS Sans Serif"
  339. long textcolor = 41943040
  340. long backcolor = 134217739
  341. boolean enabled = false
  342. string text = "登录 ID:"
  343. alignment alignment = right!
  344. boolean focusrectangle = false
  345. end type
  346. type st_4 from statictext within w_set_sqlca_fj
  347. boolean visible = false
  348. integer x = 151
  349. integer y = 216
  350. integer width = 274
  351. integer height = 60
  352. integer textsize = -8
  353. integer weight = 400
  354. fontpitch fontpitch = variable!
  355. fontfamily fontfamily = swiss!
  356. string facename = "MS Sans Serif"
  357. long textcolor = 41943040
  358. long backcolor = 134217739
  359. boolean enabled = false
  360. string text = "口令:"
  361. alignment alignment = right!
  362. boolean focusrectangle = false
  363. end type
  364. type st_3 from statictext within w_set_sqlca_fj
  365. boolean visible = false
  366. integer x = 187
  367. integer y = 128
  368. integer width = 238
  369. integer height = 60
  370. integer textsize = -8
  371. integer weight = 400
  372. fontpitch fontpitch = variable!
  373. fontfamily fontfamily = swiss!
  374. string facename = "MS Sans Serif"
  375. long textcolor = 41943040
  376. long backcolor = 134217739
  377. boolean enabled = false
  378. string text = "用户ID:"
  379. alignment alignment = right!
  380. boolean focusrectangle = false
  381. end type
  382. type st_2 from statictext within w_set_sqlca_fj
  383. integer x = 128
  384. integer y = 36
  385. integer width = 297
  386. integer height = 60
  387. integer textsize = -8
  388. integer weight = 400
  389. fontpitch fontpitch = variable!
  390. fontfamily fontfamily = swiss!
  391. string facename = "MS Sans Serif"
  392. long textcolor = 41943040
  393. long backcolor = 134217739
  394. boolean enabled = false
  395. string text = "附件数据库:"
  396. alignment alignment = right!
  397. boolean focusrectangle = false
  398. end type
  399. type st_00 from statictext within w_set_sqlca_fj
  400. boolean visible = false
  401. integer x = 82
  402. integer y = 40
  403. integer width = 343
  404. integer height = 60
  405. integer textsize = -8
  406. integer weight = 400
  407. fontpitch fontpitch = variable!
  408. fontfamily fontfamily = swiss!
  409. string facename = "MS Sans Serif"
  410. long backcolor = 134217739
  411. boolean enabled = false
  412. string text = "DBMS:"
  413. alignment alignment = right!
  414. boolean focusrectangle = false
  415. end type
  416. type st_7 from statictext within w_set_sqlca_fj
  417. integer x = 64
  418. integer y = 120
  419. integer width = 361
  420. integer height = 60
  421. integer textsize = -8
  422. integer weight = 400
  423. fontpitch fontpitch = variable!
  424. fontfamily fontfamily = swiss!
  425. string facename = "MS Sans Serif"
  426. long textcolor = 41943040
  427. long backcolor = 134217739
  428. boolean enabled = false
  429. string text = "服务器:"
  430. alignment alignment = right!
  431. boolean focusrectangle = false
  432. end type
  433. type sle_dbms from dropdownlistbox within w_set_sqlca_fj
  434. boolean visible = false
  435. integer x = 443
  436. integer y = 28
  437. integer width = 1422
  438. integer height = 156
  439. integer taborder = 210
  440. boolean bringtotop = true
  441. integer textsize = -8
  442. integer weight = 400
  443. fontcharset fontcharset = ansi!
  444. fontpitch fontpitch = variable!
  445. fontfamily fontfamily = swiss!
  446. string facename = "MS Sans Serif"
  447. long textcolor = 33554432
  448. boolean allowedit = true
  449. boolean sorted = false
  450. boolean vscrollbar = true
  451. string item[] = {"ODBC","MSS Microsoft SQL Server 6.x"}
  452. borderstyle borderstyle = stylelowered!
  453. end type
  454. event modified;sle_dbms.postevent(selectionchanged!)
  455. end event