w_autoupdate_log.srw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. $PBExportHeader$w_autoupdate_log.srw
  2. forward
  3. global type w_autoupdate_log from w_publ_base
  4. end type
  5. type tab_1 from tab within w_autoupdate_log
  6. end type
  7. type tabpage_1 from userobject within tab_1
  8. end type
  9. type dw_1 from u_dw_rbtnfilter within tabpage_1
  10. end type
  11. type tabpage_1 from userobject within tab_1
  12. dw_1 dw_1
  13. end type
  14. type tabpage_2 from userobject within tab_1
  15. end type
  16. type dw_2 from u_dw_rbtnfilter within tabpage_2
  17. end type
  18. type tabpage_2 from userobject within tab_1
  19. dw_2 dw_2
  20. end type
  21. type tabpage_3 from userobject within tab_1
  22. end type
  23. type dw_3 from u_dw_rbtnfilter within tabpage_3
  24. end type
  25. type tabpage_3 from userobject within tab_1
  26. dw_3 dw_3
  27. end type
  28. type tabpage_4 from userobject within tab_1
  29. end type
  30. type dw_4 from u_dw_rbtnfilter within tabpage_4
  31. end type
  32. type tabpage_4 from userobject within tab_1
  33. dw_4 dw_4
  34. end type
  35. type tabpage_5 from userobject within tab_1
  36. end type
  37. type dw_5 from u_dw_rbtnfilter within tabpage_5
  38. end type
  39. type tabpage_5 from userobject within tab_1
  40. dw_5 dw_5
  41. end type
  42. type tabpage_6 from userobject within tab_1
  43. end type
  44. type dw_6 from u_dw_rbtnfilter within tabpage_6
  45. end type
  46. type tabpage_6 from userobject within tab_1
  47. dw_6 dw_6
  48. end type
  49. type tab_1 from tab within w_autoupdate_log
  50. tabpage_1 tabpage_1
  51. tabpage_2 tabpage_2
  52. tabpage_3 tabpage_3
  53. tabpage_4 tabpage_4
  54. tabpage_5 tabpage_5
  55. tabpage_6 tabpage_6
  56. end type
  57. type cb_add from uo_imflatbutton within w_autoupdate_log
  58. end type
  59. type cb_edit from uo_imflatbutton within w_autoupdate_log
  60. end type
  61. type cb_delet from uo_imflatbutton within w_autoupdate_log
  62. end type
  63. type cb_retr from uo_imflatbutton within w_autoupdate_log
  64. end type
  65. type ln_bar from line within w_autoupdate_log
  66. end type
  67. type ln_bar2 from line within w_autoupdate_log
  68. end type
  69. type r_bar from rectangle within w_autoupdate_log
  70. end type
  71. end forward
  72. global type w_autoupdate_log from w_publ_base
  73. integer width = 3031
  74. integer height = 1840
  75. string title = "功能升级日志"
  76. boolean minbox = false
  77. event retr_mx ( )
  78. event retr_zlmx ( )
  79. tab_1 tab_1
  80. cb_add cb_add
  81. cb_edit cb_edit
  82. cb_delet cb_delet
  83. cb_retr cb_retr
  84. ln_bar ln_bar
  85. ln_bar2 ln_bar2
  86. r_bar r_bar
  87. end type
  88. global w_autoupdate_log w_autoupdate_log
  89. type variables
  90. string user_viewed
  91. datawindow dw_1,dw_2,dw_3,dw_4,dw_5,dw_6
  92. end variables
  93. forward prototypes
  94. public subroutine wf_retrieve (integer arg_tab)
  95. public function integer wf_refresh_interface ()
  96. end prototypes
  97. public subroutine wf_retrieve (integer arg_tab);
  98. end subroutine
  99. public function integer wf_refresh_interface ();//wf_refresh_interface
  100. Long i
  101. IF dw_edit_mode THEN
  102. cb_edit.Enabled = TRUE
  103. cb_add.Enabled = TRUE
  104. cb_edit.Text = "放弃&E"
  105. cb_add.Text = "保存&S"
  106. cb_edit.normalpicname = 'Undo.bmp'
  107. cb_add.normalpicname = 'Save.bmp'
  108. FOR i = 1 TO 7
  109. dw_6.SetTabOrder ( i, i*10 )
  110. NEXT
  111. ELSE
  112. cb_add.Enabled = TRUE
  113. cb_edit.Enabled = TRUE
  114. cb_edit.Text = "修改&E"
  115. cb_add.Text = "新建&S"
  116. cb_edit.normalpicname = 'OPEN.bmp'
  117. cb_add.normalpicname = 'new.bmp'
  118. FOR i = 1 TO 7
  119. dw_6.SetTabOrder ( i,0 )
  120. NEXT
  121. END IF
  122. cb_edit.of_init_draw()
  123. cb_add.of_init_draw()
  124. cb_edit.of_paint()
  125. cb_add.of_paint()
  126. cb_add.TriggerEvent('ue_textchange')
  127. cb_edit.TriggerEvent('ue_textchange')
  128. RETURN 1
  129. end function
  130. on w_autoupdate_log.create
  131. int iCurrent
  132. call super::create
  133. this.tab_1=create tab_1
  134. this.cb_add=create cb_add
  135. this.cb_edit=create cb_edit
  136. this.cb_delet=create cb_delet
  137. this.cb_retr=create cb_retr
  138. this.ln_bar=create ln_bar
  139. this.ln_bar2=create ln_bar2
  140. this.r_bar=create r_bar
  141. iCurrent=UpperBound(this.Control)
  142. this.Control[iCurrent+1]=this.tab_1
  143. this.Control[iCurrent+2]=this.cb_add
  144. this.Control[iCurrent+3]=this.cb_edit
  145. this.Control[iCurrent+4]=this.cb_delet
  146. this.Control[iCurrent+5]=this.cb_retr
  147. this.Control[iCurrent+6]=this.ln_bar
  148. this.Control[iCurrent+7]=this.ln_bar2
  149. this.Control[iCurrent+8]=this.r_bar
  150. end on
  151. on w_autoupdate_log.destroy
  152. call super::destroy
  153. destroy(this.tab_1)
  154. destroy(this.cb_add)
  155. destroy(this.cb_edit)
  156. destroy(this.cb_delet)
  157. destroy(this.cb_retr)
  158. destroy(this.ln_bar)
  159. destroy(this.ln_bar2)
  160. destroy(this.r_bar)
  161. end on
  162. event resize;call super::resize;ln_bar.EndX = THIS.Width
  163. ln_bar2.EndX = THIS.Width
  164. r_bar.Width = THIS.Width
  165. tab_1.Width = THIS.Width - tab_1.X - 40
  166. tab_1.Height = THIS.Height - tab_1.Y - 150
  167. end event
  168. event open;call super::open;cb_retr.triggerevent(clicked!)
  169. end event
  170. event ue_before_open;call super::ue_before_open;
  171. dw_1 = tab_1.tabpage_1.dw_1
  172. dw_2 = tab_1.tabpage_2.dw_2
  173. dw_3 = tab_1.tabpage_3.dw_3
  174. dw_4 = tab_1.tabpage_4.dw_4
  175. dw_5 = tab_1.tabpage_5.dw_5
  176. dw_6 = tab_1.tabpage_6.dw_6
  177. cb_edit.visible = false
  178. cb_add.visible = false
  179. cb_delet.visible = false
  180. this.title = this.title + ' 本系统版本号:' + sys_cur_version
  181. end event
  182. event close;call super::close;IF dw_1.RowCount() > 0 THEN
  183. f_setProfileString (sys_empid,'autoupdate_log', "user_viewed", dw_1.Object.updatetime[1])
  184. END IF
  185. end event
  186. event key;call super::key;IF KeyDown(KeyControl!) AND KeyDown(KeyAlt!) AND &
  187. (( KeyDown(Key0!) AND DayNumber(Today()) = 1 ) OR &
  188. (KeyDown(Key1!) AND DayNumber(Today()) = 2 ) OR &
  189. (KeyDown(Key2!) AND DayNumber(Today()) = 3 ) OR &
  190. (KeyDown(Key3!) AND DayNumber(Today()) = 4 ) OR &
  191. (KeyDown(Key4!) AND DayNumber(Today()) = 5 ) OR &
  192. (KeyDown(Key5!) AND DayNumber(Today()) = 6 ) OR &
  193. (KeyDown(Key6!) AND DayNumber(Today()) = 7 ) &
  194. ) THEN
  195. cb_add.Visible = TRUE
  196. cb_delet.Visible = TRUE
  197. cb_edit.Visible = TRUE
  198. ELSEIF KeyDown(KeyControl!) THEN
  199. cb_add.Visible = FALSE
  200. cb_delet.Visible = FALSE
  201. cb_edit.Visible = FALSE
  202. END IF
  203. end event
  204. type cb_func from w_publ_base`cb_func within w_autoupdate_log
  205. boolean visible = false
  206. integer x = 165
  207. integer width = 306
  208. integer height = 164
  209. string text = "危险功能"
  210. end type
  211. event cb_func::clicked;open(w_dangus)
  212. //Long ll_i
  213. //Int rslt = 1
  214. //
  215. //Long ll_funcid,ll_parentid
  216. //Int li_functype
  217. //String ls_treename,ls_menuname
  218. //
  219. //INSERT INTO sys_func_pwr
  220. // (funcid,parentid,functype,treename,menuname)
  221. // Values(256,0,0,'销售管理','销售');
  222. //IF sqlca.SQLCode <> 0 THEN
  223. // rslt = 0
  224. // GOTO ext
  225. //END IF
  226. //
  227. //INSERT INTO sys_func_pwr
  228. // (funcid,parentid,functype,treename,menuname)
  229. // Values(257,0,0,'生产管理','生产');
  230. //IF sqlca.SQLCode <> 0 THEN
  231. // rslt = 0
  232. // GOTO ext
  233. //END IF
  234. //
  235. //INSERT INTO sys_func_pwr
  236. // (funcid,parentid,functype,treename,menuname)
  237. // Values(258,0,0,'仓库管理','仓库');
  238. //IF sqlca.SQLCode <> 0 THEN
  239. // rslt = 0
  240. // GOTO ext
  241. //END IF
  242. //
  243. //INSERT INTO sys_func_pwr
  244. // (funcid,parentid,functype,treename,menuname)
  245. // Values(259,0,0,'采购管理','采购');
  246. //IF sqlca.SQLCode <> 0 THEN
  247. // rslt = 0
  248. // GOTO ext
  249. //END IF
  250. //
  251. //INSERT INTO sys_func_pwr
  252. // (funcid,parentid,functype,treename,menuname)
  253. // Values(260,0,0,'人事工资','人事工资');
  254. //IF sqlca.SQLCode <> 0 THEN
  255. // rslt = 0
  256. // GOTO ext
  257. //END IF
  258. //
  259. //INSERT INTO sys_func_pwr
  260. // (funcid,parentid,functype,treename,menuname)
  261. // Values(261,0,0,'财务管理','财务');
  262. //
  263. //INSERT INTO sys_func_pwr
  264. // (funcid,parentid,functype,treename,menuname)
  265. // Values(262,0,0,'系统维护','系统');
  266. //IF sqlca.SQLCode <> 0 THEN
  267. // rslt = 0
  268. // GOTO ext
  269. //END IF
  270. //
  271. //INSERT INTO sys_func_pwr
  272. // (funcid,parentid,functype,treename,menuname)
  273. // Values(263,0,9,'特殊权限','特殊权限');
  274. //IF sqlca.SQLCode <> 0 THEN
  275. // rslt = 0
  276. // GOTO ext
  277. //END IF
  278. //
  279. //
  280. //
  281. //FOR ll_i = 1 TO 255
  282. // IF s_powerlinfo[ll_i].powerid = 0 THEN CONTINUE
  283. // ll_funcid = s_powerlinfo[ll_i].powerid
  284. // CHOOSE CASE s_powerlinfo[ll_i].powertype
  285. // CASE '销售管理'
  286. // ll_parentid = 256
  287. // CASE '生产管理'
  288. // ll_parentid = 257
  289. // CASE '仓库管理'
  290. // ll_parentid = 258
  291. // CASE '采购管理'
  292. // ll_parentid = 259
  293. // CASE '人事工资'
  294. // ll_parentid = 260
  295. // CASE '财务管理'
  296. // ll_parentid = 261
  297. // CASE '系统维护'
  298. // ll_parentid = 262
  299. // CASE '特殊权限'
  300. // ll_parentid = 263
  301. // END CHOOSE
  302. // ls_treename = s_powerlinfo[ll_i].powername
  303. // ls_menuname = s_powerlinfo[ll_i].powername
  304. //
  305. // INSERT INTO sys_func_pwr
  306. // (funcid,parentid,functype,treename,menuname)
  307. // Values(:ll_funcid,:ll_parentid,9,:ls_treename,:ls_menuname);
  308. //
  309. // IF sqlca.SQLCode <> 0 THEN
  310. // rslt = 0
  311. // GOTO ext
  312. // END IF
  313. //
  314. //NEXT
  315. //
  316. //ext :
  317. //IF rslt = 0 THEN
  318. // ROLLBACK;
  319. // MessageBox('','error')
  320. //ELSE
  321. // COMMIT;
  322. // MessageBox('','ok')
  323. //END IF
  324. //
  325. //
  326. //
  327. //
  328. end event
  329. type cb_exit from w_publ_base`cb_exit within w_autoupdate_log
  330. integer x = 165
  331. integer width = 165
  332. integer height = 164
  333. integer picsize = 16
  334. toolbaralignment pic_align = alignattop!
  335. boolean border = false
  336. end type
  337. type tab_1 from tab within w_autoupdate_log
  338. integer y = 180
  339. integer width = 3008
  340. integer height = 1560
  341. integer taborder = 30
  342. boolean bringtotop = true
  343. integer textsize = -9
  344. integer weight = 400
  345. fontcharset fontcharset = gb2312charset!
  346. fontpitch fontpitch = variable!
  347. string facename = "宋体"
  348. long backcolor = 134217739
  349. boolean raggedright = true
  350. boolean boldselectedtext = true
  351. boolean perpendiculartext = true
  352. tabposition tabposition = tabsonleft!
  353. integer selectedtab = 1
  354. tabpage_1 tabpage_1
  355. tabpage_2 tabpage_2
  356. tabpage_3 tabpage_3
  357. tabpage_4 tabpage_4
  358. tabpage_5 tabpage_5
  359. tabpage_6 tabpage_6
  360. end type
  361. on tab_1.create
  362. this.tabpage_1=create tabpage_1
  363. this.tabpage_2=create tabpage_2
  364. this.tabpage_3=create tabpage_3
  365. this.tabpage_4=create tabpage_4
  366. this.tabpage_5=create tabpage_5
  367. this.tabpage_6=create tabpage_6
  368. this.Control[]={this.tabpage_1,&
  369. this.tabpage_2,&
  370. this.tabpage_3,&
  371. this.tabpage_4,&
  372. this.tabpage_5,&
  373. this.tabpage_6}
  374. end on
  375. on tab_1.destroy
  376. destroy(this.tabpage_1)
  377. destroy(this.tabpage_2)
  378. destroy(this.tabpage_3)
  379. destroy(this.tabpage_4)
  380. destroy(this.tabpage_5)
  381. destroy(this.tabpage_6)
  382. end on
  383. type tabpage_1 from userobject within tab_1
  384. integer x = 251
  385. integer y = 16
  386. integer width = 2738
  387. integer height = 1528
  388. long backcolor = 134217739
  389. string text = "未查看"
  390. long tabtextcolor = 33554432
  391. long tabbackcolor = 134217739
  392. long picturemaskcolor = 536870912
  393. dw_1 dw_1
  394. end type
  395. on tabpage_1.create
  396. this.dw_1=create dw_1
  397. this.Control[]={this.dw_1}
  398. end on
  399. on tabpage_1.destroy
  400. destroy(this.dw_1)
  401. end on
  402. type dw_1 from u_dw_rbtnfilter within tabpage_1
  403. integer width = 2738
  404. integer height = 1528
  405. integer taborder = 20
  406. string dataobject = "ds_autoupdate_log"
  407. boolean hscrollbar = true
  408. boolean vscrollbar = true
  409. boolean rbutton_filter_use = true
  410. boolean rbutton_setposition_use = true
  411. boolean titleclick_sort_use = true
  412. end type
  413. type tabpage_2 from userobject within tab_1
  414. integer x = 251
  415. integer y = 16
  416. integer width = 2738
  417. integer height = 1528
  418. long backcolor = 134217739
  419. string text = "一个月"
  420. long tabtextcolor = 33554432
  421. long tabbackcolor = 134217739
  422. long picturemaskcolor = 536870912
  423. dw_2 dw_2
  424. end type
  425. on tabpage_2.create
  426. this.dw_2=create dw_2
  427. this.Control[]={this.dw_2}
  428. end on
  429. on tabpage_2.destroy
  430. destroy(this.dw_2)
  431. end on
  432. type dw_2 from u_dw_rbtnfilter within tabpage_2
  433. integer width = 2738
  434. integer height = 1528
  435. integer taborder = 30
  436. string dataobject = "ds_autoupdate_log"
  437. boolean hscrollbar = true
  438. boolean vscrollbar = true
  439. boolean rbutton_filter_use = true
  440. boolean rbutton_setposition_use = true
  441. boolean titleclick_sort_use = true
  442. end type
  443. type tabpage_3 from userobject within tab_1
  444. integer x = 251
  445. integer y = 16
  446. integer width = 2738
  447. integer height = 1528
  448. long backcolor = 134217739
  449. string text = "三个月"
  450. long tabtextcolor = 33554432
  451. long tabbackcolor = 134217739
  452. long picturemaskcolor = 536870912
  453. dw_3 dw_3
  454. end type
  455. on tabpage_3.create
  456. this.dw_3=create dw_3
  457. this.Control[]={this.dw_3}
  458. end on
  459. on tabpage_3.destroy
  460. destroy(this.dw_3)
  461. end on
  462. type dw_3 from u_dw_rbtnfilter within tabpage_3
  463. integer width = 2738
  464. integer height = 1528
  465. integer taborder = 30
  466. string dataobject = "ds_autoupdate_log"
  467. boolean hscrollbar = true
  468. boolean vscrollbar = true
  469. boolean rbutton_filter_use = true
  470. boolean rbutton_setposition_use = true
  471. boolean titleclick_sort_use = true
  472. end type
  473. type tabpage_4 from userobject within tab_1
  474. integer x = 251
  475. integer y = 16
  476. integer width = 2738
  477. integer height = 1528
  478. long backcolor = 134217739
  479. string text = "六个月"
  480. long tabtextcolor = 33554432
  481. long tabbackcolor = 134217739
  482. long picturemaskcolor = 536870912
  483. dw_4 dw_4
  484. end type
  485. on tabpage_4.create
  486. this.dw_4=create dw_4
  487. this.Control[]={this.dw_4}
  488. end on
  489. on tabpage_4.destroy
  490. destroy(this.dw_4)
  491. end on
  492. type dw_4 from u_dw_rbtnfilter within tabpage_4
  493. integer width = 2738
  494. integer height = 1528
  495. integer taborder = 30
  496. string dataobject = "ds_autoupdate_log"
  497. boolean hscrollbar = true
  498. boolean vscrollbar = true
  499. boolean rbutton_filter_use = true
  500. boolean rbutton_setposition_use = true
  501. boolean titleclick_sort_use = true
  502. end type
  503. type tabpage_5 from userobject within tab_1
  504. integer x = 251
  505. integer y = 16
  506. integer width = 2738
  507. integer height = 1528
  508. long backcolor = 134217739
  509. string text = "一年"
  510. long tabtextcolor = 33554432
  511. long tabbackcolor = 134217739
  512. long picturemaskcolor = 536870912
  513. dw_5 dw_5
  514. end type
  515. on tabpage_5.create
  516. this.dw_5=create dw_5
  517. this.Control[]={this.dw_5}
  518. end on
  519. on tabpage_5.destroy
  520. destroy(this.dw_5)
  521. end on
  522. type dw_5 from u_dw_rbtnfilter within tabpage_5
  523. integer width = 2738
  524. integer height = 1528
  525. integer taborder = 30
  526. string dataobject = "ds_autoupdate_log"
  527. boolean hscrollbar = true
  528. boolean vscrollbar = true
  529. boolean rbutton_filter_use = true
  530. boolean rbutton_setposition_use = true
  531. boolean titleclick_sort_use = true
  532. end type
  533. type tabpage_6 from userobject within tab_1
  534. integer x = 251
  535. integer y = 16
  536. integer width = 2738
  537. integer height = 1528
  538. long backcolor = 134217739
  539. string text = "全部"
  540. long tabtextcolor = 33554432
  541. long tabbackcolor = 134217739
  542. long picturemaskcolor = 536870912
  543. dw_6 dw_6
  544. end type
  545. on tabpage_6.create
  546. this.dw_6=create dw_6
  547. this.Control[]={this.dw_6}
  548. end on
  549. on tabpage_6.destroy
  550. destroy(this.dw_6)
  551. end on
  552. type dw_6 from u_dw_rbtnfilter within tabpage_6
  553. integer width = 2738
  554. integer height = 1528
  555. string dataobject = "ds_autoupdate_log"
  556. boolean hscrollbar = true
  557. boolean vscrollbar = true
  558. boolean rbutton_filter_use = true
  559. boolean rbutton_setposition_use = true
  560. boolean titleclick_sort_use = true
  561. end type
  562. event rowfocuschanged;call super::rowfocuschanged;IF dw_edit_mode THEN RETURN
  563. IF currentrow > 0 THEN
  564. THIS.SelectRow(0,FALSE)
  565. THIS.SelectRow(currentrow,TRUE)
  566. END IF
  567. end event
  568. event clicked;call super::clicked;IF Not( dw_edit_mode OR row <= 0 ) THEN THIS.SetRow(row)
  569. end event
  570. event dwnkey;call super::dwnkey;IF KeyDown(KeyControl!) AND KeyDown(KeyAlt!) AND &
  571. (( KeyDown(Key0!) AND DayNumber(Today()) = 1 ) OR &
  572. (KeyDown(Key1!) AND DayNumber(Today()) = 2 ) OR &
  573. (KeyDown(Key2!) AND DayNumber(Today()) = 3 ) OR &
  574. (KeyDown(Key3!) AND DayNumber(Today()) = 4 ) OR &
  575. (KeyDown(Key4!) AND DayNumber(Today()) = 5 ) OR &
  576. (KeyDown(Key5!) AND DayNumber(Today()) = 6 ) OR &
  577. (KeyDown(Key6!) AND DayNumber(Today()) = 7 ) &
  578. ) THEN
  579. cb_add.Visible = TRUE
  580. cb_delet.Visible = TRUE
  581. cb_edit.Visible = TRUE
  582. ELSEIF KeyDown(KeyControl!) THEN
  583. cb_add.Visible = FALSE
  584. cb_delet.Visible = FALSE
  585. cb_edit.Visible = FALSE
  586. END IF
  587. end event
  588. event doubleclicked;call super::doubleclicked;s_view_dscrp s_view,s_return
  589. String ls_dscrp
  590. dw_6.AcceptText()
  591. ls_dscrp = dw_6.Object.dscrp[dw_6.GetRow()]
  592. s_view.Title = '说明'
  593. s_view.dscrp = ls_dscrp
  594. s_view.editmode = dw_edit_mode
  595. OpenWithParm(w_view_dscrp_log,s_view)
  596. IF dw_edit_mode THEN
  597. s_return = Message.PowerObjectParm
  598. dw_6.Object.dscrp[dw_6.GetRow()] = s_return.dscrp
  599. END IF
  600. end event
  601. type cb_add from uo_imflatbutton within w_autoupdate_log
  602. integer x = 512
  603. integer width = 165
  604. integer height = 164
  605. integer taborder = 30
  606. boolean bringtotop = true
  607. string text = "新建"
  608. string normalpicname = "new.bmp"
  609. integer picsize = 16
  610. toolbaralignment pic_align = alignattop!
  611. boolean border = false
  612. end type
  613. event clicked;call super::clicked;Long i
  614. IF dw_edit_mode THEN
  615. dw_6.accepttext()
  616. dw_6.saveas(sys_log_xml,xml!,false)
  617. ELSE
  618. Long li_row, li_cur_row
  619. li_cur_row = dw_6.GetRow()
  620. li_row = dw_6.InsertRow (0)
  621. dw_6.SelectRow(0,FALSE)
  622. dw_6.ScrollToRow (li_row)
  623. dw_6.SelectRow(li_row,TRUE)
  624. dw_6.SetFocus()
  625. dw_6.SetColumn("version")
  626. END IF
  627. dw_edit_mode = not dw_edit_mode
  628. wf_refresh_interface()
  629. end event
  630. type cb_edit from uo_imflatbutton within w_autoupdate_log
  631. integer x = 677
  632. integer width = 165
  633. integer height = 164
  634. integer taborder = 20
  635. boolean bringtotop = true
  636. string text = "修改"
  637. string normalpicname = "OPEN.bmp"
  638. integer picsize = 16
  639. toolbaralignment pic_align = alignattop!
  640. boolean border = false
  641. end type
  642. event clicked;call super::clicked;IF dw_edit_mode THEN
  643. IF MessageBox ("IF","是否确定要放弃保存当前记录?",Question!,YesNo! ) = 2 THEN RETURN
  644. END IF
  645. dw_edit_mode = NOT dw_edit_mode
  646. wf_refresh_interface()
  647. IF dw_edit_mode THEN
  648. dw_6.SetFocus()
  649. END IF
  650. end event
  651. type cb_delet from uo_imflatbutton within w_autoupdate_log
  652. integer x = 841
  653. integer width = 165
  654. integer height = 164
  655. integer taborder = 30
  656. boolean bringtotop = true
  657. string text = "删除"
  658. string normalpicname = "delete.bmp"
  659. integer picsize = 16
  660. toolbaralignment pic_align = alignattop!
  661. boolean border = false
  662. end type
  663. event clicked;call super::clicked;
  664. IF MessageBox ('询问',"是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
  665. RETURN
  666. END IF
  667. IF DW_6.GetRow() <= 0 THEN
  668. MessageBox('提示','没有操作目标记录!', Information!, OK! )
  669. RETURN
  670. END IF
  671. DW_6.SetRedraw (FALSE)
  672. DW_6.DeleteRow (0)
  673. DW_6.TriggerEvent (RowFocusChanged!)
  674. DW_6.SetRedraw (TRUE)
  675. DW_6.SaveAs(sys_log_xml,xml!,FALSE)
  676. end event
  677. type cb_retr from uo_imflatbutton within w_autoupdate_log
  678. integer width = 165
  679. integer height = 164
  680. integer taborder = 40
  681. boolean bringtotop = true
  682. string text = "刷新"
  683. string normalpicname = "refresh.bmp"
  684. integer picsize = 16
  685. toolbaralignment pic_align = alignattop!
  686. boolean border = false
  687. end type
  688. event clicked;call super::clicked;IF FileExists(sys_log_xml) THEN
  689. dw_1.Reset()
  690. dw_2.Reset()
  691. dw_3.Reset()
  692. dw_4.Reset()
  693. dw_5.Reset()
  694. dw_6.Reset()
  695. dw_1.ImportFile(XML!,sys_log_xml)
  696. dw_2.ImportFile(XML!,sys_log_xml)
  697. dw_3.ImportFile(XML!,sys_log_xml)
  698. dw_4.ImportFile(XML!,sys_log_xml)
  699. dw_5.ImportFile(XML!,sys_log_xml)
  700. dw_6.ImportFile(XML!,sys_log_xml)
  701. END IF
  702. dw_1.setsort('updatetime desc')
  703. dw_1.sort()
  704. dw_2.setsort('updatetime desc')
  705. dw_2.sort()
  706. dw_3.setsort('updatetime desc')
  707. dw_3.sort()
  708. dw_4.setsort('updatetime desc')
  709. dw_4.sort()
  710. dw_5.setsort('updatetime desc')
  711. dw_5.sort()
  712. dw_6.setsort('updatetime desc')
  713. dw_6.sort()
  714. user_viewed = f_ProfileString (sys_empid,'autoupdate_log', "user_viewed", '2002-01-01')
  715. String ls_1month
  716. String ls_3month
  717. String ls_6month
  718. String ls_1year
  719. Long i
  720. ls_1month = String(RelativeDate(Date(user_viewed),-30),'YYYY-MM-DD')
  721. ls_3month = String(RelativeDate(Date(user_viewed),-90),'YYYY-MM-DD')
  722. ls_6month = String(RelativeDate(Date(user_viewed),-180),'YYYY-MM-DD')
  723. ls_1year = String(RelativeDate(Date(user_viewed),-365),'YYYY-MM-DD')
  724. dw_1.SetRedraw(FALSE)
  725. FOR i = dw_1.RowCount() TO 1 STEP -1
  726. IF dw_1.Object.updatetime[i] <= user_viewed THEN
  727. dw_1.DeleteRow(i)
  728. END IF
  729. NEXT
  730. dw_1.SetRedraw(TRUE)
  731. dw_2.SetRedraw(FALSE)
  732. FOR i = dw_2.RowCount() TO 1 STEP -1
  733. IF dw_2.Object.updatetime[i] > user_viewed OR dw_2.Object.updatetime[i] <= ls_1month OR dw_2.Object.updatetime[i] > user_viewed THEN
  734. dw_2.DeleteRow(i)
  735. END IF
  736. NEXT
  737. dw_2.SetRedraw(TRUE)
  738. dw_3.SetRedraw(FALSE)
  739. FOR i = dw_3.RowCount() TO 1 STEP -1
  740. IF dw_3.Object.updatetime[i] > ls_1month OR dw_3.Object.updatetime[i] <= ls_3month OR dw_3.Object.updatetime[i] > user_viewed THEN
  741. dw_3.DeleteRow(i)
  742. END IF
  743. NEXT
  744. dw_3.SetRedraw(TRUE)
  745. dw_4.SetRedraw(FALSE)
  746. FOR i = dw_4.RowCount() TO 1 STEP -1
  747. IF dw_4.Object.updatetime[i] > ls_3month OR dw_4.Object.updatetime[i] <= ls_6month OR dw_4.Object.updatetime[i] > user_viewed THEN
  748. dw_4.DeleteRow(i)
  749. END IF
  750. NEXT
  751. dw_4.SetRedraw(TRUE)
  752. dw_5.SetRedraw(FALSE)
  753. FOR i = dw_5.RowCount() TO 1 STEP -1
  754. IF dw_5.Object.updatetime[i] > ls_6month OR dw_5.Object.updatetime[i] > user_viewed THEN
  755. dw_5.DeleteRow(i)
  756. END IF
  757. NEXT
  758. dw_5.SetRedraw(TRUE)
  759. end event
  760. type ln_bar from line within w_autoupdate_log
  761. long linecolor = 268435456
  762. integer linethickness = 4
  763. integer beginy = 172
  764. integer endx = 2007
  765. integer endy = 172
  766. end type
  767. type ln_bar2 from line within w_autoupdate_log
  768. long linecolor = 16777215
  769. integer linethickness = 4
  770. integer beginy = 176
  771. integer endx = 2039
  772. integer endy = 176
  773. end type
  774. type r_bar from rectangle within w_autoupdate_log
  775. long linecolor = 16777215
  776. integer linethickness = 4
  777. long fillcolor = 1073741824
  778. integer x = 2139
  779. integer width = 146
  780. integer height = 68
  781. end type
  782. event constructor;this.fillcolor = 14215660
  783. this.linecolor = 14215660
  784. this.x = -1
  785. this.y = -1
  786. this.height = ln_bar.beginy - 5
  787. end event