w_department_ch.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. $PBExportHeader$w_department_ch.srw
  2. forward
  3. global type w_department_ch from w_publ_base
  4. end type
  5. type cb_refresh from uo_imflatbutton within w_department_ch
  6. end type
  7. type cb_add from uo_imflatbutton within w_department_ch
  8. end type
  9. type cb_add_next from uo_imflatbutton within w_department_ch
  10. end type
  11. type cb_mod from uo_imflatbutton within w_department_ch
  12. end type
  13. type cb_del from uo_imflatbutton within w_department_ch
  14. end type
  15. type tv_1 from uo_tv_deptype within w_department_ch
  16. end type
  17. type cb_help from uo_imflatbutton within w_department_ch
  18. end type
  19. type cb_ch from uo_imflatbutton within w_department_ch
  20. end type
  21. type ln_bar from line within w_department_ch
  22. end type
  23. type ln_bar2 from line within w_department_ch
  24. end type
  25. type r_bar from rectangle within w_department_ch
  26. end type
  27. end forward
  28. global type w_department_ch from w_publ_base
  29. integer width = 2437
  30. integer height = 1724
  31. string title = "部门选择"
  32. boolean minbox = false
  33. windowtype windowtype = response!
  34. event ue_help ( )
  35. cb_refresh cb_refresh
  36. cb_add cb_add
  37. cb_add_next cb_add_next
  38. cb_mod cb_mod
  39. cb_del cb_del
  40. tv_1 tv_1
  41. cb_help cb_help
  42. cb_ch cb_ch
  43. ln_bar ln_bar
  44. ln_bar2 ln_bar2
  45. r_bar r_bar
  46. end type
  47. global w_department_ch w_department_ch
  48. type variables
  49. long il_hand
  50. s_deptype s_dep_rst
  51. end variables
  52. forward prototypes
  53. public function integer wf_cnt_dot (string arg_mtrltype)
  54. end prototypes
  55. event ue_help();Int i
  56. i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".htm")
  57. end event
  58. public function integer wf_cnt_dot (string arg_mtrltype);long rst_cnt
  59. string ls_mtrltype
  60. long pos_dot
  61. ls_mtrltype = arg_mtrltype
  62. again:
  63. pos_dot = pos(ls_mtrltype,'>>')
  64. if pos_dot > 0 then
  65. rst_cnt++
  66. ls_mtrltype = mid( ls_mtrltype,pos_dot + 2 )
  67. goto again
  68. else
  69. goto ext
  70. end if
  71. ext:
  72. return rst_cnt
  73. end function
  74. on w_department_ch.create
  75. int iCurrent
  76. call super::create
  77. this.cb_refresh=create cb_refresh
  78. this.cb_add=create cb_add
  79. this.cb_add_next=create cb_add_next
  80. this.cb_mod=create cb_mod
  81. this.cb_del=create cb_del
  82. this.tv_1=create tv_1
  83. this.cb_help=create cb_help
  84. this.cb_ch=create cb_ch
  85. this.ln_bar=create ln_bar
  86. this.ln_bar2=create ln_bar2
  87. this.r_bar=create r_bar
  88. iCurrent=UpperBound(this.Control)
  89. this.Control[iCurrent+1]=this.cb_refresh
  90. this.Control[iCurrent+2]=this.cb_add
  91. this.Control[iCurrent+3]=this.cb_add_next
  92. this.Control[iCurrent+4]=this.cb_mod
  93. this.Control[iCurrent+5]=this.cb_del
  94. this.Control[iCurrent+6]=this.tv_1
  95. this.Control[iCurrent+7]=this.cb_help
  96. this.Control[iCurrent+8]=this.cb_ch
  97. this.Control[iCurrent+9]=this.ln_bar
  98. this.Control[iCurrent+10]=this.ln_bar2
  99. this.Control[iCurrent+11]=this.r_bar
  100. end on
  101. on w_department_ch.destroy
  102. call super::destroy
  103. destroy(this.cb_refresh)
  104. destroy(this.cb_add)
  105. destroy(this.cb_add_next)
  106. destroy(this.cb_mod)
  107. destroy(this.cb_del)
  108. destroy(this.tv_1)
  109. destroy(this.cb_help)
  110. destroy(this.cb_ch)
  111. destroy(this.ln_bar)
  112. destroy(this.ln_bar2)
  113. destroy(this.r_bar)
  114. end on
  115. event resize;call super::resize;ln_bar.EndX = THIS.Width
  116. ln_bar2.EndX = THIS.Width
  117. r_bar.Width = THIS.Width
  118. end event
  119. event key;call super::key;IF KeyDown(KeyF1!) THEN
  120. THIS.TriggerEvent('ue_help')
  121. end if
  122. end event
  123. event close;call super::close;closewithreturn(this,s_dep_rst)
  124. end event
  125. type cb_func from w_publ_base`cb_func within w_department_ch
  126. boolean visible = false
  127. integer x = 119
  128. integer y = 484
  129. end type
  130. type cb_exit from w_publ_base`cb_exit within w_department_ch
  131. integer x = 1202
  132. integer width = 174
  133. integer height = 164
  134. integer picsize = 16
  135. toolbaralignment pic_align = alignattop!
  136. boolean border = false
  137. end type
  138. event cb_exit::clicked;close(parent)
  139. end event
  140. type cb_refresh from uo_imflatbutton within w_department_ch
  141. integer width = 174
  142. integer height = 164
  143. integer taborder = 80
  144. boolean bringtotop = true
  145. string text = "刷新"
  146. string normalpicname = "refresh.bmp"
  147. integer picsize = 16
  148. toolbaralignment pic_align = alignattop!
  149. boolean border = false
  150. end type
  151. event clicked;call super::clicked;tv_1.f_maketree()
  152. end event
  153. type cb_add from uo_imflatbutton within w_department_ch
  154. integer x = 174
  155. integer width = 192
  156. integer height = 164
  157. integer taborder = 80
  158. boolean bringtotop = true
  159. string text = "增同级"
  160. string normalpicname = "mx1.bmp"
  161. integer picsize = 16
  162. toolbaralignment pic_align = alignattop!
  163. boolean border = false
  164. end type
  165. event clicked;call super::clicked;IF NOT f_power_ind(192,sys_msg_pow) THEN
  166. MessageBox(publ_operator,sys_msg_pow)
  167. RETURN
  168. END IF
  169. IF tv_1.uo_cur_info.departmentid = 0 THEN
  170. MessageBox("系统提示",'不能建立部门')
  171. RETURN
  172. END IF
  173. s_deptype s_dept,s_r_dept
  174. Long ll_departmentid,ll_parentid
  175. String ls_deptcode,ls_departmentname,ls_handtype
  176. Int li_sonflag
  177. String arg_msg
  178. String ls_parent_handtype
  179. s_dept.departmentid = 0
  180. s_dept.deptcode = tv_1.uo_cur_info.deptcode
  181. s_dept.departmentname = tv_1.uo_cur_info.departmentname
  182. s_dept.sonflag = 1
  183. s_dept.parentid = tv_1.uo_cur_info.parentid
  184. IF tv_1.uo_cur_info.parentid = 0 THEN
  185. s_dept.parenthandtype = ''
  186. ELSE
  187. SELECT handtype INTO :ls_parent_handtype
  188. FROM cw_department
  189. Where departmentid = :tv_1.uo_cur_info.parentid;
  190. IF sqlca.SQLCode <> 0 THEN
  191. MessageBox('系统提示','查询上级部门资料失败')
  192. RETURN
  193. END IF
  194. s_dept.parenthandtype = ls_parent_handtype
  195. END IF
  196. OpenWithParm(w_department_add,s_dept)
  197. s_r_dept = Message.PowerObjectParm
  198. IF s_r_dept.departmentid = -1 THEN RETURN
  199. ls_deptcode = s_r_dept.deptcode
  200. ls_departmentname = s_r_dept.departmentname
  201. ls_handtype = s_r_dept.handtype
  202. ll_parentid = s_r_dept.parentid
  203. li_sonflag = s_r_dept.sonflag
  204. ll_departmentid = f_sys_scidentity(0,"cw_department","departmentid",arg_msg,TRUE,id_sqlca)
  205. IF ll_departmentid <= 0 THEN
  206. MessageBox(publ_operator,arg_msg)
  207. RETURN
  208. END IF
  209. INSERT INTO cw_department
  210. (departmentid,
  211. deptcode,
  212. departmentname,
  213. handtype,
  214. sonflag,
  215. parentid)
  216. VALUES
  217. (:ll_departmentid,
  218. :ls_deptcode,
  219. :ls_departmentname,
  220. :ls_handtype,
  221. :li_sonflag,
  222. :ll_parentid) ;
  223. IF sqlca.SQLCode <> 0 THEN
  224. ROLLBACK;
  225. MessageBox('失败','新建部门"'+ls_departmentname+'"失败,可能是编号或名称已经存在或网络故障!')
  226. RETURN
  227. END IF
  228. UPDATE cw_department
  229. SET sonflag = 0
  230. Where cw_department.departmentid = :ll_parentid;
  231. IF sqlca.SQLCode <> 0 THEN
  232. ROLLBACK;
  233. MessageBox('失败','新建部门"'+ls_departmentname+'"失败,可能是名称已经存在或网络故障!')
  234. RETURN
  235. END IF
  236. COMMIT;
  237. MessageBox('成功','新建部门操作成功!')
  238. Long ll_hand,ll_handl
  239. TreeViewItem l_tvi
  240. ll_hand = tv_1.FindItem(parenttreeitem!,il_hand)
  241. ll_handl = tv_1.InsertItemSort(ll_hand,ls_departmentname,2)
  242. IF tv_1.GetItem ( ll_handl, l_tvi) = 1 THEN
  243. l_tvi.Label = ls_deptcode + ' - ' + ls_departmentname
  244. l_tvi.Data = ll_departmentid
  245. tv_1.SetItem(ll_handl, l_tvi)
  246. tv_1.SetFocus()
  247. tv_1.SelectItem ( ll_handl )
  248. END IF
  249. end event
  250. type cb_add_next from uo_imflatbutton within w_department_ch
  251. integer x = 366
  252. integer width = 192
  253. integer height = 164
  254. integer taborder = 90
  255. boolean bringtotop = true
  256. string text = "增下级"
  257. string normalpicname = "mx2.bmp"
  258. integer picsize = 16
  259. toolbaralignment pic_align = alignattop!
  260. boolean border = false
  261. end type
  262. event clicked;call super::clicked;if not f_power_ind(192,sys_msg_pow) THEN
  263. MessageBox(publ_operator,sys_msg_pow)
  264. RETURN
  265. END IF
  266. s_deptype s_dept,s_r_dept
  267. Long ll_departmentid,ll_parentid
  268. String ls_deptcode,ls_departmentname,ls_handtype
  269. Int li_sonflag
  270. String arg_msg
  271. s_dept.departmentid = 0
  272. s_dept.deptcode = tv_1.uo_cur_info.deptcode
  273. s_dept.departmentname = tv_1.uo_cur_info.departmentname
  274. s_dept.sonflag = 1
  275. IF tv_1.uo_cur_info.departmentid = 0 THEN
  276. s_dept.parentid = 0
  277. s_dept.parenthandtype = ''
  278. ELSE
  279. s_dept.parentid = tv_1.uo_cur_info.departmentid
  280. s_dept.parenthandtype = tv_1.uo_cur_info.handtype
  281. END IF
  282. OpenWithParm(w_department_add,s_dept)
  283. s_r_dept = Message.PowerObjectParm
  284. IF s_r_dept.departmentid = -1 THEN RETURN
  285. ls_deptcode = s_r_dept.deptcode
  286. ls_departmentname = s_r_dept.departmentname
  287. ls_handtype = s_r_dept.handtype
  288. ll_parentid = s_r_dept.parentid
  289. li_sonflag = s_r_dept.sonflag
  290. ll_departmentid = f_sys_scidentity(0,"cw_department","departmentid",arg_msg,TRUE,id_sqlca)
  291. IF ll_departmentid <= 0 THEN
  292. MessageBox(publ_operator,arg_msg)
  293. RETURN
  294. END IF
  295. INSERT INTO cw_department
  296. (departmentid,
  297. deptcode,
  298. departmentname,
  299. handtype,
  300. sonflag,
  301. parentid)
  302. Values
  303. (:ll_departmentid,
  304. :ls_deptcode,
  305. :ls_departmentname,
  306. :ls_handtype,
  307. :li_sonflag,
  308. :ll_parentid) ;
  309. IF sqlca.SQLCode <> 0 THEN
  310. ROLLBACK;
  311. MessageBox('失败','新建部门"'+ls_departmentname+'"失败,可能是编号或名称已经存在或网络故障!')
  312. RETURN
  313. END IF
  314. UPDATE cw_department
  315. SET sonflag = 0
  316. Where cw_department.departmentid = :ll_parentid;
  317. IF sqlca.SQLCode <> 0 THEN
  318. ROLLBACK;
  319. MessageBox('失败','新建部门"'+ls_departmentname+'"失败,可能是编号或名称已经存在或网络故障!')
  320. RETURN
  321. END IF
  322. COMMIT;
  323. MessageBox('成功','新建部门操作成功!')
  324. Long ll_handl
  325. TreeViewItem l_tvi
  326. ll_handl = tv_1.InsertItemSort(il_hand,ls_departmentname,2)
  327. IF tv_1.GetItem ( ll_handl, l_tvi) = 1 THEN
  328. l_tvi.Label = ls_deptcode + ' - ' + ls_departmentname
  329. l_tvi.Data = ll_departmentid
  330. tv_1.SetItem(ll_handl, l_tvi)
  331. tv_1.SetFocus()
  332. tv_1.SelectItem ( ll_handl )
  333. END IF
  334. end event
  335. type cb_mod from uo_imflatbutton within w_department_ch
  336. integer x = 558
  337. integer width = 174
  338. integer height = 164
  339. integer taborder = 90
  340. boolean bringtotop = true
  341. string text = "修改"
  342. string normalpicname = "open.bmp"
  343. integer picsize = 16
  344. toolbaralignment pic_align = alignattop!
  345. boolean border = false
  346. end type
  347. event clicked;call super::clicked;IF NOT f_power_ind(192,sys_msg_pow) THEN
  348. MessageBox(publ_operator,sys_msg_pow)
  349. RETURN
  350. END IF
  351. IF tv_1.uo_cur_info.departmentid = 0 THEN
  352. MessageBox(publ_operator,'请选择要修改当前部门!')
  353. RETURN
  354. END IF
  355. s_deptype s_dept,s_r_dept
  356. Long cnt
  357. Long ll_departmentid
  358. Long ll_old_parentid
  359. Long ll_new_parentid
  360. String ls_deptcode
  361. String ls_new_departmentname
  362. String ls_old_departmentname
  363. String ls_new_handtype
  364. String ls_old_handtype
  365. String ls_update_handtype
  366. Int li_sonflag
  367. s_dept.departmentid = tv_1.uo_cur_info.departmentid
  368. s_dept.deptcode = tv_1.uo_cur_info.deptcode
  369. s_dept.departmentname = tv_1.uo_cur_info.departmentname
  370. s_dept.sonflag = tv_1.uo_cur_info.sonflag
  371. s_dept.parentid = tv_1.uo_cur_info.parentid
  372. s_dept.parenthandtype = tv_1.uo_cur_info.parenthandtype
  373. ll_departmentid = tv_1.uo_cur_info.departmentid
  374. ll_old_parentid = tv_1.uo_cur_info.parentid
  375. ls_old_departmentname = tv_1.uo_cur_info.departmentname
  376. ls_old_handtype = tv_1.uo_cur_info.handtype
  377. ls_update_handtype = ls_old_handtype + '%'
  378. OpenWithParm(w_department_add,s_dept)
  379. s_r_dept = Message.PowerObjectParm
  380. IF s_r_dept.departmentid = - 1 THEN RETURN
  381. ls_deptcode = s_r_dept.deptcode
  382. ls_new_departmentname = s_r_dept.departmentname
  383. ls_new_handtype = s_r_dept.handtype
  384. ll_new_parentid = s_r_dept.parentid
  385. li_sonflag = s_r_dept.sonflag
  386. UPDATE cw_department
  387. SET deptcode = :ls_deptcode,
  388. departmentname = :ls_new_departmentname,
  389. sonflag = :li_sonflag,
  390. parentid = :ll_new_parentid,
  391. handtype = :ls_new_handtype
  392. Where (departmentid = :ll_departmentid ) ;
  393. IF sqlca.SQLCode <> 0 THEN
  394. ROLLBACK;
  395. MessageBox('失败','修改名称操作失败,可能是新名称已经存在或网络故障!')
  396. RETURN
  397. END IF
  398. UPDATE cw_department
  399. SET handtype = replace(handtype,:ls_old_handtype,:ls_new_handtype)
  400. Where handtype Like :ls_update_handtype;
  401. IF sqlca.SQLCode <> 0 THEN
  402. ROLLBACK;
  403. MessageBox('失败','修改部门资料操作失败,可能是新名称已经存在或网络故障!')
  404. RETURN
  405. END IF
  406. UPDATE u_rs_empinfo
  407. SET deptype = :ls_new_departmentname
  408. Where deptid = :ll_departmentid;
  409. IF sqlca.SQLCode <> 0 THEN
  410. ROLLBACK;
  411. MessageBox('失败','修改部门资料(人事)操作失败,可能是新名称已经存在或网络故障!')
  412. RETURN
  413. END IF
  414. UPDATE u_rs_empinfo
  415. SET handtype = replace(handtype,:ls_old_handtype,:ls_new_handtype)
  416. Where handtype Like :ls_update_handtype;
  417. IF sqlca.SQLCode <> 0 THEN
  418. ROLLBACK;
  419. MessageBox('失败','修改部门资料(人事)操作失败,可能是新名称已经存在或网络故障!')
  420. RETURN
  421. END IF
  422. UPDATE cw_department
  423. SET sonflag = 0
  424. Where cw_department.departmentid = :ll_new_parentid;
  425. IF sqlca.SQLCode <> 0 THEN
  426. ROLLBACK;
  427. MessageBox('失败','更新部门"'+ls_new_departmentname+'"上级部门失败')
  428. RETURN
  429. END IF
  430. IF ll_old_parentid <> ll_new_parentid THEN
  431. SELECT count(*) INTO :cnt
  432. FROM cw_department
  433. Where parentid = :ll_old_parentid;
  434. IF sqlca.SQLCode <> 0 THEN
  435. ROLLBACK;
  436. MessageBox('失败','查询上级部门是否还存在下级部门失败')
  437. RETURN
  438. END IF
  439. IF cnt = 0 THEN
  440. UPDATE cw_department SET sonflag = 1
  441. Where departmentid = :ll_old_parentid;
  442. IF sqlca.SQLCode <> 0 THEN
  443. ROLLBACK;
  444. MessageBox('失败','更新上级部门资料失败')
  445. RETURN
  446. END IF
  447. END IF
  448. END IF
  449. COMMIT;
  450. MessageBox('成功','部门修改成功!')
  451. TreeViewItem l_tvi
  452. IF tv_1.GetItem(il_hand,l_tvi) > 0 THEN
  453. l_tvi.Label = ls_deptcode + ' - ' + ls_new_departmentname
  454. l_tvi.Data = ll_departmentid
  455. tv_1.SetItem(il_hand, l_tvi)
  456. tv_1.SetFocus()
  457. tv_1.SelectItem ( il_hand )
  458. END IF
  459. end event
  460. type cb_del from uo_imflatbutton within w_department_ch
  461. integer x = 731
  462. integer width = 174
  463. integer height = 164
  464. integer taborder = 100
  465. boolean bringtotop = true
  466. string text = "删除"
  467. string normalpicname = "delete.bmp"
  468. integer picsize = 16
  469. toolbaralignment pic_align = alignattop!
  470. boolean border = false
  471. end type
  472. event clicked;call super::clicked;long cnt
  473. if not f_power_ind(192,sys_msg_pow) THEN
  474. MessageBox(publ_operator,sys_msg_pow)
  475. RETURN
  476. END IF
  477. if MessageBox(publ_operator,'是否要确定删除当前部门', Exclamation!, YesNo!, 2)=2 then
  478. return
  479. end if
  480. if tv_1.uo_cur_info.sonflag = 0 then
  481. messagebox(publ_operator,'不是明细部门,不能删除')
  482. return
  483. end if
  484. cnt = 0
  485. select count(*) into :cnt
  486. from u_rs_empinfo
  487. where deptid = :tv_1.uo_cur_info.departmentid;
  488. if sqlca.sqlcode <> 0 then
  489. messagebox(publ_operator,'查询部门是否已用失败,不能删除')
  490. return
  491. end if
  492. if cnt > 0 then
  493. messagebox(publ_operator,'部门已用于员工信息管理,不能删除')
  494. return
  495. end if
  496. cnt = 0
  497. select count(*) into :cnt
  498. from cw_department
  499. where parentid = :tv_1.uo_cur_info.parentid;
  500. if sqlca.sqlcode <> 0 then
  501. messagebox(publ_operator,'查询部门资料失败,不能删除')
  502. return
  503. end if
  504. if cnt = 1 then
  505. update cw_department
  506. set sonflag = 1
  507. where departmentid = :tv_1.uo_cur_info.parentid;
  508. if sqlca.sqlcode <> 0 then
  509. messagebox(publ_operator,'更新上级部门资料失败,不能删除')
  510. rollback;
  511. return
  512. end if
  513. end if
  514. delete from cw_department
  515. where departmentid = :tv_1.uo_cur_info.departmentid;
  516. if sqlca.sqlcode <> 0 then
  517. messagebox(publ_operator,'删除部门失败>>'+sqlca.sqlerrtext)
  518. rollback;
  519. return
  520. end if
  521. commit;
  522. messagebox(publ_operator,'删除部门成功')
  523. tv_1.f_maketree()
  524. end event
  525. type tv_1 from uo_tv_deptype within w_department_ch
  526. integer y = 180
  527. integer width = 2359
  528. integer height = 1396
  529. integer taborder = 30
  530. boolean bringtotop = true
  531. integer textsize = -9
  532. fontcharset fontcharset = gb2312charset!
  533. fontfamily fontfamily = anyfont!
  534. string facename = "宋体"
  535. end type
  536. event selectionchanged;call super::selectionchanged;il_hand = newhandle
  537. end event
  538. event doubleclicked;call super::doubleclicked;cb_ch.TriggerEvent(Clicked!)
  539. end event
  540. type cb_help from uo_imflatbutton within w_department_ch
  541. integer x = 1051
  542. integer width = 151
  543. integer height = 164
  544. integer taborder = 20
  545. boolean bringtotop = true
  546. string text = "帮助"
  547. string normalpicname = "help.bmp"
  548. integer picsize = 16
  549. toolbaralignment pic_align = alignattop!
  550. boolean border = false
  551. end type
  552. event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')
  553. end event
  554. type cb_ch from uo_imflatbutton within w_department_ch
  555. integer x = 901
  556. integer width = 151
  557. integer height = 164
  558. integer taborder = 110
  559. boolean bringtotop = true
  560. string text = "选定"
  561. string normalpicname = "ok.bmp"
  562. integer picsize = 16
  563. toolbaralignment pic_align = alignattop!
  564. boolean border = false
  565. end type
  566. event clicked;call super::clicked;IF tv_1.uo_cur_info.departmentid = 0 THEN
  567. MessageBox('提示','请选择部门!')
  568. RETURN
  569. END IF
  570. s_dep_rst.departmentid = tv_1.uo_cur_info.departmentid
  571. s_dep_rst.departmentname = tv_1.uo_cur_info.departmentname
  572. s_dep_rst.handtype = tv_1.uo_cur_info.handtype
  573. Close(PARENT)
  574. end event
  575. type ln_bar from line within w_department_ch
  576. long linecolor = 268435456
  577. integer linethickness = 4
  578. integer beginy = 172
  579. integer endx = 2007
  580. integer endy = 172
  581. end type
  582. type ln_bar2 from line within w_department_ch
  583. long linecolor = 16777215
  584. integer linethickness = 4
  585. integer beginy = 176
  586. integer endx = 2039
  587. integer endy = 176
  588. end type
  589. type r_bar from rectangle within w_department_ch
  590. long linecolor = 16777215
  591. integer linethickness = 4
  592. long fillcolor = 1073741824
  593. integer x = 1833
  594. integer width = 146
  595. integer height = 68
  596. end type
  597. event constructor;this.fillcolor = 14215660
  598. this.linecolor = 14215660
  599. this.x = -1
  600. this.y = -1
  601. this.height = ln_bar.beginy - 5
  602. end event