w_sys_xgmm.srw 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. $PBExportHeader$w_sys_xgmm.srw
  2. $PBExportComments$Generated MDI frame window
  3. forward
  4. global type w_sys_xgmm from w_publ_base
  5. end type
  6. type st_2 from statictext within w_sys_xgmm
  7. end type
  8. type sle_1 from singlelineedit within w_sys_xgmm
  9. end type
  10. type sle_2 from singlelineedit within w_sys_xgmm
  11. end type
  12. type st_1 from statictext within w_sys_xgmm
  13. end type
  14. type cb_1 from uo_imflatbutton within w_sys_xgmm
  15. end type
  16. type st_3 from statictext within w_sys_xgmm
  17. end type
  18. type st_4 from statictext within w_sys_xgmm
  19. end type
  20. type sle_3 from singlelineedit within w_sys_xgmm
  21. end type
  22. end forward
  23. global type w_sys_xgmm from w_publ_base
  24. integer width = 1408
  25. integer height = 744
  26. string title = "口令修改"
  27. boolean minbox = false
  28. windowtype windowtype = response!
  29. st_2 st_2
  30. sle_1 sle_1
  31. sle_2 sle_2
  32. st_1 st_1
  33. cb_1 cb_1
  34. st_3 st_3
  35. st_4 st_4
  36. sle_3 sle_3
  37. end type
  38. global w_sys_xgmm w_sys_xgmm
  39. on w_sys_xgmm.create
  40. int iCurrent
  41. call super::create
  42. this.st_2=create st_2
  43. this.sle_1=create sle_1
  44. this.sle_2=create sle_2
  45. this.st_1=create st_1
  46. this.cb_1=create cb_1
  47. this.st_3=create st_3
  48. this.st_4=create st_4
  49. this.sle_3=create sle_3
  50. iCurrent=UpperBound(this.Control)
  51. this.Control[iCurrent+1]=this.st_2
  52. this.Control[iCurrent+2]=this.sle_1
  53. this.Control[iCurrent+3]=this.sle_2
  54. this.Control[iCurrent+4]=this.st_1
  55. this.Control[iCurrent+5]=this.cb_1
  56. this.Control[iCurrent+6]=this.st_3
  57. this.Control[iCurrent+7]=this.st_4
  58. this.Control[iCurrent+8]=this.sle_3
  59. end on
  60. on w_sys_xgmm.destroy
  61. call super::destroy
  62. destroy(this.st_2)
  63. destroy(this.sle_1)
  64. destroy(this.sle_2)
  65. destroy(this.st_1)
  66. destroy(this.cb_1)
  67. destroy(this.st_3)
  68. destroy(this.st_4)
  69. destroy(this.sle_3)
  70. end on
  71. type cb_func from w_publ_base`cb_func within w_sys_xgmm
  72. boolean visible = false
  73. integer x = 562
  74. integer y = 448
  75. boolean enabled = false
  76. end type
  77. type cb_exit from w_publ_base`cb_exit within w_sys_xgmm
  78. integer x = 864
  79. integer y = 472
  80. integer width = 311
  81. integer height = 96
  82. integer taborder = 4
  83. integer picsize = 0
  84. toolbaralignment pic_align = alignatleft!
  85. boolean border = true
  86. end type
  87. event cb_exit::clicked;s_changepassword ls_cgpsw
  88. ls_cgpsw.yn=false
  89. CloseWithReturn(PARENT,ls_cgpsw)
  90. end event
  91. type st_2 from statictext within w_sys_xgmm
  92. integer x = 283
  93. integer y = 204
  94. integer width = 233
  95. integer height = 60
  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 = 134217739
  103. boolean enabled = false
  104. string text = "新密码:"
  105. boolean focusrectangle = false
  106. end type
  107. type sle_1 from singlelineedit within w_sys_xgmm
  108. event key pbm_keydown
  109. integer x = 539
  110. integer y = 172
  111. integer width = 581
  112. integer height = 92
  113. integer taborder = 1
  114. integer textsize = -10
  115. integer weight = 400
  116. fontcharset fontcharset = gb2312charset!
  117. fontpitch fontpitch = variable!
  118. string facename = "宋体"
  119. long textcolor = 33554432
  120. boolean autohscroll = false
  121. boolean password = true
  122. integer limit = 15
  123. borderstyle borderstyle = stylelowered!
  124. end type
  125. event key;If key = KeyEnter! Or Key = KeyDownArrow! Then //
  126. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  127. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  128. Return 1
  129. End If
  130. end event
  131. type sle_2 from singlelineedit within w_sys_xgmm
  132. event key pbm_keydown
  133. integer x = 539
  134. integer y = 288
  135. integer width = 581
  136. integer height = 92
  137. integer taborder = 2
  138. integer textsize = -10
  139. integer weight = 400
  140. fontcharset fontcharset = gb2312charset!
  141. fontpitch fontpitch = variable!
  142. string facename = "宋体"
  143. long textcolor = 33554432
  144. boolean autohscroll = false
  145. boolean password = true
  146. integer limit = 15
  147. borderstyle borderstyle = stylelowered!
  148. end type
  149. event key;If key = KeyEnter! Or Key = KeyDownArrow! Then //
  150. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  151. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  152. Return 1
  153. End If
  154. end event
  155. type st_1 from statictext within w_sys_xgmm
  156. integer x = 174
  157. integer y = 320
  158. integer width = 343
  159. integer height = 48
  160. boolean bringtotop = true
  161. integer textsize = -9
  162. integer weight = 400
  163. fontcharset fontcharset = gb2312charset!
  164. fontpitch fontpitch = variable!
  165. string facename = "宋体"
  166. long textcolor = 33554432
  167. long backcolor = 134217739
  168. string text = "确认新密码:"
  169. boolean focusrectangle = false
  170. end type
  171. type cb_1 from uo_imflatbutton within w_sys_xgmm
  172. integer x = 251
  173. integer y = 472
  174. integer width = 311
  175. integer height = 96
  176. integer taborder = 14
  177. boolean bringtotop = true
  178. end type
  179. event clicked;call super::clicked;String ls_find_pass,ls_find_user,ls_powerstring
  180. Long ls_empid
  181. SELECT u_user.username,
  182. u_user.empid,
  183. u_user.rightstring,
  184. u_user.psw
  185. INTO :ls_find_user,
  186. :ls_empid,
  187. :ls_powerstring,
  188. :ls_find_pass
  189. FROM u_user
  190. WHERE u_user.scid = :sys_scid
  191. AND u_user.empid = :sys_empid USING sqlca ;
  192. IF sqlca.SQLCode <> 0 THEN
  193. MessageBox('提示','用户信息查询操作失败!', StopSign!, OK! )
  194. RETURN
  195. END IF
  196. IF Trim(f_psw_bczh(ls_find_pass,1,sys_power_key)) = Trim(sle_3.Text) THEN
  197. publ_operator = ls_find_user
  198. sys_power_issuper = ( Lower(Trim(publ_userid)) = sys_super_id )
  199. sys_right = ls_powerstring
  200. ELSE
  201. MessageBox("提示", "用户口令不正确,请重新输入!", StopSign!, OK! )
  202. sle_3.Text = ''
  203. sle_3.SetFocus()
  204. RETURN
  205. END IF
  206. IF sle_1.Text <> sle_2.Text THEN
  207. MessageBox('提示','新密码与确认新密码不相符,请修改!', Information!, OK! )
  208. RETURN
  209. END IF
  210. //**********************检查密码
  211. uo_usergroup uo_user
  212. String arg_msg
  213. uo_user = CREATE uo_usergroup
  214. IF uo_user.check_psw(sle_1.Text,arg_msg) = 0 THEN
  215. MessageBox(publ_operator,arg_msg)
  216. RETURN
  217. END IF
  218. DESTROY uo_user
  219. //****************************
  220. ls_find_pass = f_psw_bczh(Trim(sle_1.Text),0,sys_power_key)
  221. UPDATE u_user
  222. SET psw = :ls_find_pass
  223. WHERE u_user.empid = :ls_empid
  224. AND u_user.scid = :sys_scid;
  225. IF sqlca.SQLCode <> 0 OR sqlca.SQLNRows = 0 THEN
  226. ROLLBACK;
  227. MessageBox (publ_operator,"更新数据操作失败!(请从试!)",Exclamation!,OK!)
  228. RETURN
  229. ELSE
  230. COMMIT;
  231. MessageBox (publ_operator,"你的密码更新操作成功!",Exclamation!,OK!)
  232. Close(PARENT)
  233. END IF
  234. end event
  235. type st_3 from statictext within w_sys_xgmm
  236. integer x = 539
  237. integer y = 400
  238. integer width = 507
  239. integer height = 48
  240. boolean bringtotop = true
  241. integer textsize = -9
  242. integer weight = 400
  243. fontcharset fontcharset = gb2312charset!
  244. fontpitch fontpitch = variable!
  245. string facename = "宋体"
  246. long textcolor = 16711680
  247. long backcolor = 134217739
  248. string text = "注:密码最长15位!"
  249. boolean focusrectangle = false
  250. end type
  251. type st_4 from statictext within w_sys_xgmm
  252. integer x = 283
  253. integer y = 72
  254. integer width = 233
  255. integer height = 60
  256. boolean bringtotop = true
  257. integer textsize = -9
  258. integer weight = 400
  259. fontcharset fontcharset = gb2312charset!
  260. fontpitch fontpitch = variable!
  261. string facename = "宋体"
  262. long textcolor = 33554432
  263. long backcolor = 134217739
  264. boolean enabled = false
  265. string text = "原密码:"
  266. boolean focusrectangle = false
  267. end type
  268. type sle_3 from singlelineedit within w_sys_xgmm
  269. event key pbm_keydown
  270. integer x = 539
  271. integer y = 40
  272. integer width = 581
  273. integer height = 92
  274. integer taborder = 10
  275. boolean bringtotop = true
  276. integer textsize = -10
  277. integer weight = 400
  278. fontcharset fontcharset = gb2312charset!
  279. fontpitch fontpitch = variable!
  280. string facename = "宋体"
  281. long textcolor = 33554432
  282. boolean autohscroll = false
  283. boolean password = true
  284. integer limit = 15
  285. borderstyle borderstyle = stylelowered!
  286. end type
  287. event key;If key = KeyEnter! Or Key = KeyDownArrow! Then //
  288. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  289. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  290. Return 1
  291. End If
  292. end event