w_system_plan_super.srw 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948
  1. $PBExportHeader$w_system_plan_super.srw
  2. forward
  3. global type w_system_plan_super from w_publ_base
  4. end type
  5. type tab_1 from tab within w_system_plan_super
  6. end type
  7. type tabpage_1 from userobject within tab_1
  8. end type
  9. type tv_1 from treeview within tabpage_1
  10. end type
  11. type tabpage_1 from userobject within tab_1
  12. tv_1 tv_1
  13. end type
  14. type tabpage_3 from userobject within tab_1
  15. end type
  16. type dw_1 from u_dw_rbtnfilter within tabpage_3
  17. end type
  18. type tabpage_3 from userobject within tab_1
  19. dw_1 dw_1
  20. end type
  21. type tabpage_2 from userobject within tab_1
  22. end type
  23. type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
  24. end type
  25. type dw_2 from u_dw_rbtnfilter within tabpage_2
  26. end type
  27. type dw_column from u_dw_rbtnfilter within tabpage_2
  28. end type
  29. type dw_windw from u_dw_rbtnfilter within tabpage_2
  30. end type
  31. type tv_2 from treeview within tabpage_2
  32. end type
  33. type tabpage_2 from userobject within tab_1
  34. dw_3 dw_3
  35. dw_2 dw_2
  36. dw_column dw_column
  37. dw_windw dw_windw
  38. tv_2 tv_2
  39. end type
  40. type tab_1 from tab within w_system_plan_super
  41. tabpage_1 tabpage_1
  42. tabpage_3 tabpage_3
  43. tabpage_2 tabpage_2
  44. end type
  45. type cb_edit from uo_imflatbutton within w_system_plan_super
  46. end type
  47. type cb_save from uo_imflatbutton within w_system_plan_super
  48. end type
  49. type cb_in from uo_imflatbutton within w_system_plan_super
  50. end type
  51. type cb_out from uo_imflatbutton within w_system_plan_super
  52. end type
  53. type cb_select from uo_imflatbutton within w_system_plan_super
  54. end type
  55. type cb_3 from uo_imflatbutton within w_system_plan_super
  56. end type
  57. type cb_retrieve from uo_imflatbutton within w_system_plan_super
  58. end type
  59. type ln_bar from line within w_system_plan_super
  60. end type
  61. type ln_bar2 from line within w_system_plan_super
  62. end type
  63. type r_bar from rectangle within w_system_plan_super
  64. end type
  65. end forward
  66. global type w_system_plan_super from w_publ_base
  67. integer width = 3611
  68. integer height = 2380
  69. string title = "系统解决方案-管理员模式"
  70. boolean maxbox = true
  71. windowstate windowstate = maximized!
  72. tab_1 tab_1
  73. cb_edit cb_edit
  74. cb_save cb_save
  75. cb_in cb_in
  76. cb_out cb_out
  77. cb_select cb_select
  78. cb_3 cb_3
  79. cb_retrieve cb_retrieve
  80. ln_bar ln_bar
  81. ln_bar2 ln_bar2
  82. r_bar r_bar
  83. end type
  84. global w_system_plan_super w_system_plan_super
  85. type prototypes
  86. subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
  87. Function long GetCursor () Library "user32.dll" Alias for "GetCursor"
  88. Function long LoadCursor (long hInstance, long lpCursorName) Library "user32.dll" Alias for "LoadCursorW"
  89. end prototypes
  90. type variables
  91. treeview tv_func, tv_2
  92. datawindow dw_sys_option
  93. Long deep = 0
  94. Long il_handle_arr[], il_state_arr[]
  95. Long il_max = 0
  96. datastore ds_func_tree
  97. long il_dw_mainid
  98. //tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
  99. //tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
  100. string is_AllowVersion
  101. string is_dwname
  102. int ii_version_int
  103. string is_sys_pwrstr_sys
  104. end variables
  105. forward prototypes
  106. public function integer wf_build_functree ()
  107. public subroutine wf_refresh_option ()
  108. public subroutine wf_sethandlestate (long arg_handle, long arg_state)
  109. public function long wf_gethandlestate (long arg_handle)
  110. public subroutine wf_set_tvchild (long arg_handl)
  111. public subroutine wf_set_tvnext (long arg_handl)
  112. public subroutine wf_set_tvparent (long arg_handl)
  113. public function integer wf_face ()
  114. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr)
  115. public subroutine wf_setvalue_option (string arg_str)
  116. public subroutine wf_retrieve_value ()
  117. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr)
  118. public function string wf_getright ()
  119. public function string wf_getoption ()
  120. public function integer wf_build_functree2 ()
  121. public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp)
  122. public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag)
  123. public subroutine wf_retrieve_col (long currentrow)
  124. public subroutine wf_retrieve_allowversion (long currentrow)
  125. public subroutine wf_set_allowversion ()
  126. public subroutine wf_retrieve_dw_obj (long currentrow)
  127. public subroutine wf_save_dw_obj ()
  128. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp)
  129. public subroutine wf_get_planstr (ref string arg_sys_pwrstr, ref string arg_sys_optionstr)
  130. public subroutine wf_get_planstr_sys (ref string arg_sys_pwrstr)
  131. end prototypes
  132. public function integer wf_build_functree ();//====================================================================
  133. // Function: wf_build_functree()
  134. //--------------------------------------------------------------------
  135. // Description:
  136. //--------------------------------------------------------------------
  137. // Arguments:(None)
  138. //--------------------------------------------------------------------
  139. // Returns: integer
  140. //--------------------------------------------------------------------
  141. // Author: lhd Date: 2013.06.14
  142. //--------------------------------------------------------------------
  143. // Modify History:
  144. //
  145. //====================================================================
  146. Long hand
  147. deep = 1
  148. Long tvi_hdl = 0
  149. DO UNTIL tv_func.FindItem(roottreeitem!, 0) = -1
  150. tv_func.DeleteItem(tvi_hdl)
  151. LOOP
  152. hand = tv_func.InsertItemLast(0,sys_message_title,1)
  153. pf_treegrowth(hand,0,2)
  154. tv_func.ExpandAll(hand)
  155. tv_func.SelectItem(hand)
  156. RETURN 1
  157. end function
  158. public subroutine wf_refresh_option ();Long i
  159. Long ll_row
  160. String ls_kind
  161. String ls_value,arg_msg
  162. dw_sys_option.SetRedraw(FALSE)
  163. dw_sys_option.Reset()
  164. FOR i = 1 TO UpperBound(s_sys_opt)
  165. IF s_sys_opt[i].optionname = '' THEN CONTINUE
  166. IF s_sys_opt[i].module = '' THEN CONTINUE
  167. ll_row = dw_sys_option.InsertRow(0)
  168. dw_sys_option.Object.module[ll_row] = s_sys_opt[i].module
  169. dw_sys_option.Object.optionid[ll_row] = s_sys_opt[i].optionid
  170. dw_sys_option.Object.optionname[ll_row] = s_sys_opt[i].optionname
  171. dw_sys_option.Object.itype[ll_row] = s_sys_opt[i].itype
  172. // dw_sys_option.Object.Kindid[ll_row] = s_sys_opt[i].Kind
  173. // dw_sys_option.Object.printid[ll_row] = s_sys_opt[i].printid
  174. // IF s_sys_opt[i].Kind = 0 THEN
  175. ls_kind = '流程类'
  176. // ELSEIF s_sys_opt[i].Kind = 1 THEN
  177. // ls_kind = '参数类'
  178. // ELSEIF s_sys_opt[i].Kind = 2 THEN
  179. // ls_kind = '限制类'
  180. // ELSEIF s_sys_opt[i].Kind = 3 THEN
  181. // ls_kind = '界面类'
  182. // END IF
  183. //
  184. // dw_sys_option.Object.Kind[ll_row] = ls_kind
  185. dw_sys_option.Object.module_int[ll_row] = s_sys_opt[i].module_int
  186. dw_sys_option.Object.dscrp[ll_row] = s_sys_opt[i].dscrp
  187. NEXT
  188. dw_sys_option.SetSort('module_int asc, kindid asc ,printid asc')
  189. dw_sys_option.Sort()
  190. dw_sys_option.SetRedraw(TRUE)
  191. end subroutine
  192. public subroutine wf_sethandlestate (long arg_handle, long arg_state);long i
  193. for i = 1 to il_max
  194. if il_handle_arr[i] = arg_handle then
  195. il_state_arr[i] = arg_state
  196. return
  197. end if
  198. next
  199. il_max ++
  200. il_handle_arr[il_max] = arg_handle
  201. il_state_arr[il_max] = arg_state
  202. end subroutine
  203. public function long wf_gethandlestate (long arg_handle);long i
  204. for i = 1 to il_max
  205. if il_handle_arr[i] = arg_handle then
  206. return il_state_arr[i]
  207. end if
  208. next
  209. return 0
  210. end function
  211. public subroutine wf_set_tvchild (long arg_handl);//====================================================================
  212. // Function: wf_find_childtree()
  213. //--------------------------------------------------------------------
  214. // Description:
  215. //--------------------------------------------------------------------
  216. // Arguments:
  217. // value long arg_handl
  218. // value long arg_state
  219. //--------------------------------------------------------------------
  220. // Returns: integer
  221. //--------------------------------------------------------------------
  222. // Author: yyx Date: 2004.11.18
  223. //--------------------------------------------------------------------
  224. // Modify History:
  225. //
  226. //====================================================================
  227. long ll_handl
  228. treeviewitem tvi
  229. ll_handl = arg_handl
  230. tv_func.getitem(ll_handl,tvi)
  231. tvi.StatePictureIndex = 1
  232. tv_func.setitem(ll_handl,tvi)
  233. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  234. do while ll_handl > 0
  235. wf_set_tvnext(ll_handl)
  236. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  237. loop
  238. end subroutine
  239. public subroutine wf_set_tvnext (long arg_handl);//====================================================================
  240. // Function: wf_find_childtree()
  241. //--------------------------------------------------------------------
  242. // Description:
  243. //--------------------------------------------------------------------
  244. // Arguments:
  245. // value long arg_handl
  246. // value long arg_state
  247. //--------------------------------------------------------------------
  248. // Returns: integer
  249. //--------------------------------------------------------------------
  250. // Author: yyx Date: 2004.11.18
  251. //--------------------------------------------------------------------
  252. // Modify History:
  253. //
  254. //====================================================================
  255. long ll_handl
  256. treeviewitem tvi
  257. ll_handl = arg_handl
  258. tv_func.getitem(ll_handl,tvi)
  259. tvi.StatePictureIndex = 1
  260. tv_func.setitem(ll_handl,tvi)
  261. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  262. do while ll_handl > 0
  263. wf_set_tvchild(ll_handl)
  264. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  265. loop
  266. end subroutine
  267. public subroutine wf_set_tvparent (long arg_handl);//====================================================================
  268. // Function: wf_find_parenttree()
  269. //--------------------------------------------------------------------
  270. // Description:
  271. //--------------------------------------------------------------------
  272. // Arguments:
  273. // value long arg_handl
  274. // value long arg_state
  275. //--------------------------------------------------------------------
  276. // Returns: (none)
  277. //--------------------------------------------------------------------
  278. // Author: yyx Date: 2004.11.18
  279. //--------------------------------------------------------------------
  280. // Modify History:
  281. //
  282. //====================================================================
  283. long ll_handl
  284. treeviewitem tvi
  285. ll_handl = arg_handl
  286. tv_func.getitem(ll_handl,tvi)
  287. tvi.StatePictureIndex = 2
  288. tv_func.setitem(ll_handl,tvi)
  289. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  290. do while ll_handl > 0
  291. tv_func.getitem(ll_handl,tvi)
  292. tvi.StatePictureIndex = 2
  293. tv_func.setitem(ll_handl,tvi)
  294. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  295. loop
  296. end subroutine
  297. public function integer wf_face ();IF dw_edit_mode THEN
  298. cb_in.Enabled = FALSE
  299. cb_out.Enabled = FALSE
  300. cb_select.Enabled = TRUE
  301. cb_save.Enabled = TRUE
  302. cb_edit.Text = "放弃&E"
  303. cb_edit.normalpicname = 'Undo.bmp'
  304. dw_sys_option.SetTabOrder('ch',10)
  305. tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',10)
  306. tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',20)
  307. tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',10)
  308. tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',20)
  309. // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',10)
  310. ELSE
  311. cb_in.Enabled = TRUE
  312. cb_out.Enabled = TRUE
  313. cb_select.Enabled = FALSE
  314. cb_save.Enabled = FALSE
  315. cb_edit.Text = "修改&E"
  316. cb_edit.normalpicname = 'OPEN.bmp'
  317. dw_sys_option.SetTabOrder('ch',0)
  318. tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',0)
  319. tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',0)
  320. tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',0)
  321. tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',0)
  322. // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',0)
  323. END IF
  324. cb_edit.of_init_draw()
  325. cb_edit.of_paint()
  326. cb_edit.TriggerEvent('ue_textchange')
  327. RETURN 1
  328. end function
  329. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr);Long ll_handl
  330. Long ll_funcid
  331. treeviewitem tvi
  332. ll_handl = arg_handl
  333. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  334. DO WHILE ll_handl > 0
  335. tv_func.GetItem(ll_handl,tvi)
  336. ll_funcid = tvi.Data
  337. IF NOT ll_funcid = 0 THEN
  338. IF Mid(arg_rightstr,ll_funcid,1) = '0' or Mid(arg_rightstr,ll_funcid,1) = '' THEN
  339. tvi.StatePictureIndex = 1
  340. ELSE
  341. tvi.StatePictureIndex = 2
  342. END IF
  343. END IF
  344. tv_func.SetItem(ll_handl,tvi)
  345. wf_refresh_tvchild(ll_handl,arg_rightstr)
  346. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  347. LOOP
  348. end subroutine
  349. public subroutine wf_setvalue_option (string arg_str);Long ll_i
  350. Long ll_optionid
  351. dw_sys_option.AcceptText()
  352. dw_sys_option.SetRedraw(FALSE)
  353. FOR ll_i = 1 TO dw_sys_option.RowCount()
  354. ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
  355. IF Mid(arg_str,ll_optionid,1) = '0' OR Mid(arg_str,ll_optionid,1) = '' THEN
  356. dw_sys_option.Object.ch[ll_i] = 0
  357. ELSE
  358. dw_sys_option.Object.ch[ll_i] = 1
  359. END IF
  360. NEXT
  361. dw_sys_option.SetRedraw(TRUE)
  362. end subroutine
  363. public subroutine wf_retrieve_value ();
  364. String ls_sys_pwrstr,ls_sys_optionstr
  365. wf_get_planstr(ls_sys_pwrstr, ls_sys_optionstr)
  366. //SELECT sys_pwrstr,sys_optionstr
  367. // INTO :ls_sys_pwrstr,:ls_sys_optionstr
  368. // FROM sys_DB_version;
  369. //IF sqlca.SQLCode <> 0 THEN
  370. // ls_sys_pwrstr = Fill('1',5000)
  371. // ls_sys_optionstr = Fill('1',500)
  372. //END IF
  373. //
  374. //IF ls_sys_pwrstr = '' THEN
  375. // ls_sys_pwrstr = Fill('1',5000)
  376. //END IF
  377. //
  378. //
  379. //
  380. //IF ls_sys_optionstr = '' THEN
  381. // ls_sys_optionstr = Fill('1',1000)
  382. //END IF
  383. Long ll_handl
  384. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  385. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
  386. wf_setvalue_option(ls_sys_optionstr)
  387. end subroutine
  388. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr);Long ll_handl
  389. Long ll_funcid
  390. treeviewitem tvi
  391. ll_handl = arg_handl
  392. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  393. DO WHILE ll_handl > 0
  394. tv_func.GetItem(ll_handl,tvi)
  395. ll_funcid = tvi.Data
  396. IF NOT ll_funcid = 0 THEN
  397. IF tvi.StatePictureIndex = 2 THEN
  398. arg_rightstr = Replace(arg_rightstr,ll_funcid,1,"1")
  399. END IF
  400. END IF
  401. wf_getright_tvchild(ll_handl,arg_rightstr)
  402. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  403. LOOP
  404. end subroutine
  405. public function string wf_getright ();string ls_ret
  406. ls_ret=fill("0",5000)
  407. long ll_handl
  408. ll_handl = tv_func.finditem(RootTreeItem!,0)
  409. if ll_handl > 0 then wf_getright_tvchild(ll_handl,ls_ret)
  410. return ls_ret
  411. end function
  412. public function string wf_getoption ();String ls_ret
  413. Long ll_i,ll_optionid
  414. ls_ret = Fill("0",500)
  415. dw_sys_option.SetFilter('')
  416. dw_sys_option.Filter()
  417. dw_sys_option.AcceptText()
  418. FOR ll_i = 1 TO dw_sys_option.RowCount()
  419. ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
  420. IF dw_sys_option.Object.ch[ll_i] = 1 THEN
  421. ls_ret = Replace(ls_ret,ll_optionid,1,"1")
  422. END IF
  423. NEXT
  424. RETURN ls_ret
  425. end function
  426. public function integer wf_build_functree2 ();//====================================================================
  427. // Function: wf_build_functree()
  428. //--------------------------------------------------------------------
  429. // Description:
  430. //--------------------------------------------------------------------
  431. // Arguments:(None)
  432. //--------------------------------------------------------------------
  433. // Returns: integer
  434. //--------------------------------------------------------------------
  435. // Author: lhd Date: 2013.06.14
  436. //--------------------------------------------------------------------
  437. // Modify History:
  438. //
  439. //====================================================================
  440. Long hand
  441. deep = 1
  442. Long tvi_hdl = 0
  443. DO UNTIL tv_2.FindItem(roottreeitem!, 0) = -1
  444. tv_2.DeleteItem(tvi_hdl)
  445. LOOP
  446. hand = tv_2.InsertItemLast(0,sys_message_title,1)
  447. pf_treegrowth2(hand,0,2)
  448. tv_2.ExpandItem(hand)
  449. RETURN 1
  450. end function
  451. public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
  452. // function: pf_treegrowth()
  453. //--------------------------------------------------------------------
  454. // description:
  455. //--------------------------------------------------------------------
  456. // arguments:
  457. // value long arg_handl
  458. // value long arg_funcid
  459. // value integer arg_lp
  460. //--------------------------------------------------------------------
  461. // returns: integer
  462. //--------------------------------------------------------------------
  463. // author: lhd date: 2013.06.16
  464. //--------------------------------------------------------------------
  465. // modify history:
  466. //
  467. //====================================================================
  468. Int rslt = 1
  469. s_sys_func ls_s_func[]
  470. Long count = 0,ls_i, ll_cnt
  471. Long handl
  472. treeviewitem tvi
  473. IF IsNull(arg_funcid) THEN RETURN 0
  474. deep++
  475. IF deep > 100000 THEN //防止死递归
  476. RETURN 0
  477. END IF
  478. String ls_filter
  479. IF sys_if_network = 1 THEN
  480. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
  481. ELSE
  482. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
  483. END IF
  484. IF sys_version_type = 0 THEN
  485. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  486. ELSEIF sys_version_type = 1 THEN
  487. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  488. ELSEIF sys_version_type = 2 THEN
  489. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  490. END IF
  491. ls_filter += " and if_use <> 0 and functype <> 2 and functype <> 9 "
  492. sys_ds_maininfo.SetFilter(ls_filter)
  493. sys_ds_maininfo.Filter()
  494. FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
  495. // IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
  496. // (sys_ds_maininfo.Object.funcid[ls_i] <> 263 And sys_ds_maininfo.Object.funcid[ls_i] <> 1573) THEN CONTINUE
  497. count++
  498. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  499. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  500. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  501. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  502. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  503. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  504. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  505. ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
  506. ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
  507. ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
  508. NEXT
  509. sys_ds_maininfo.SetFilter("")
  510. sys_ds_maininfo.Filter()
  511. FOR ls_i = 1 To count
  512. //
  513. IF is_sys_pwrstr_sys <> "" THEN
  514. IF Not Mid(is_sys_pwrstr_sys,ls_s_func[ls_i].funcid,1) = '1' THEN
  515. CONTINUE
  516. END IF
  517. END IF
  518. IF ls_s_func[ls_i].functype = 0 THEN
  519. arg_lp = 2
  520. ELSEIF ls_s_func[ls_i].functype = 8 THEN
  521. arg_lp = 3
  522. ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
  523. arg_lp = 10
  524. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  525. arg_lp = 4
  526. END IF
  527. ll_cnt = sys_ds_maininfo.Find('parentid='+String(ls_s_func[ls_i].funcid) &
  528. + " and if_use <> 0 " &
  529. + " and functype <> 2 "&
  530. + " and functype <> 9 ", 1, sys_ds_maininfo.RowCount())
  531. handl = tv_2.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
  532. // tv_func.ExpandItem(arg_handl)
  533. tv_2.GetItem(handl,tvi)
  534. tvi.StatePictureIndex = 2
  535. tvi.Data = ls_s_func[ls_i].funcid
  536. IF ll_cnt > 0 THEN
  537. tvi.Children = True
  538. ELSE
  539. tvi.Children = False
  540. END IF
  541. tv_2.SetItem(handl,tvi)
  542. // pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
  543. NEXT
  544. RETURN rslt
  545. end function
  546. public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag);Boolean lb_save = False
  547. IF arg_colflag = 1 THEN
  548. wf_save_dw_obj()
  549. END IF
  550. IF arg_winflag = 1 THEN
  551. IF tab_1.tabpage_2.dw_windw.GetNextModified(0, Primary!) <> 0 Or &
  552. tab_1.tabpage_2.dw_windw.GetNextModified(0, Filter!) <> 0 THEN
  553. IF MessageBox('系统提示','数据窗口内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
  554. lb_save = True
  555. IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
  556. ROLLBACK;
  557. ELSE
  558. COMMIT;
  559. END IF
  560. END IF
  561. END IF
  562. //IF arg_colflag = 1 THEN
  563. // IF tab_1.tabpage_2.dw_column.GetNextModified(0, Primary!) <> 0 Or &
  564. // tab_1.tabpage_2.dw_column.GetNextModified(0, Filter!) <> 0 THEN
  565. // IF not lb_save THEN
  566. // IF MessageBox('系统提示','数据窗口字段内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
  567. // END IF
  568. // IF tab_1.tabpage_2.dw_column.Update() = -1 THEN
  569. // ROLLBACK;
  570. // ELSE
  571. // COMMIT;
  572. // END IF
  573. //
  574. // END IF
  575. //END IF
  576. RETURN
  577. end subroutine
  578. public subroutine wf_retrieve_col (long currentrow);String ls_dwname
  579. Int li_dwstyle
  580. IF currentrow > 0 THEN
  581. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
  582. li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
  583. tab_1.tabpage_2.dw_column.Retrieve(ls_dwname, li_dwstyle,is_AllowVersion)
  584. ELSE
  585. tab_1.tabpage_2.dw_column.Reset()
  586. END IF
  587. RETURN
  588. end subroutine
  589. public subroutine wf_retrieve_allowversion (long currentrow);string ls_allowversion
  590. long ll_rowcnt
  591. long i
  592. //ll_rowcnt = tab_1.tabpage_2.dw_allowversion.rowcount()
  593. //IF currentrow > 0 THEN
  594. // ls_allowversion = tab_1.tabpage_2.dw_column.Object.allowversion[currentrow]
  595. //
  596. // for i = 1 to ll_rowcnt
  597. // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = long(mid(ls_allowversion, i, 1))
  598. // next
  599. //ELSE
  600. // for i = 1 to ll_rowcnt
  601. // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = 0
  602. // next
  603. //END IF
  604. RETURN
  605. end subroutine
  606. public subroutine wf_set_allowversion ();//String ls_allowversion
  607. //String ls_ch
  608. //Long i
  609. //Long ll_row
  610. //ls_allowversion = "111111111111111111"
  611. //IF tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Primary!) <> 0 Or &
  612. // tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Filter!) <> 0 THEN
  613. //
  614. // FOR i = 1 To tab_1.tabpage_2.dw_allowversion.RowCount()
  615. // ls_ch = String(tab_1.tabpage_2.dw_allowversion.Object.ch[i] )
  616. // ls_allowversion = Replace(ls_allowversion, i, 1, ls_ch)
  617. // NEXT
  618. //
  619. // ll_row = tab_1.tabpage_2.dw_column.GetRow()
  620. //
  621. // IF ll_row > 0 THEN
  622. // tab_1.tabpage_2.dw_column.Object.allowversion[ll_row] = ls_allowversion
  623. // END IF
  624. //
  625. //END IF
  626. RETURN
  627. end subroutine
  628. public subroutine wf_retrieve_dw_obj (long currentrow);String ls_dwname
  629. Int li_dwstyle
  630. String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
  631. String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
  632. String ls_mdfstr_text
  633. String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
  634. Int li_sys_development_ori
  635. IF currentrow > 0 THEN
  636. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
  637. li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
  638. IF li_dwstyle = 1 THEN //Grid
  639. tab_1.tabpage_2.dw_2.Visible = True
  640. tab_1.tabpage_2.dw_3.Visible = False
  641. //tab_1.tabpage_2.dw_2
  642. ////////////////////////////////////////////
  643. li_sys_development_ori = sys_development
  644. sys_development = 0
  645. tab_1.tabpage_2.dw_2.SetRedraw(False)
  646. tab_1.tabpage_2.dw_2.DataObject = ls_dwname
  647. tab_1.tabpage_2.dw_2.cur_developtype = 1
  648. tab_1.tabpage_2.dw_2.TriggerEvent(Constructor!)
  649. tab_1.tabpage_2.dw_2.InsertRow(0)
  650. tab_1.tabpage_2.dw_2.SetRedraw(True)
  651. sys_development = li_sys_development_ori
  652. ////////////////////////////////////////// //
  653. ELSE //freefrom
  654. tab_1.tabpage_2.dw_2.Visible = False
  655. tab_1.tabpage_2.dw_3.Visible = True
  656. //tab_1.tabpage_2.dw_3
  657. ////////////////////////////////////////////
  658. li_sys_development_ori = sys_development
  659. sys_development = 0
  660. tab_1.tabpage_2.dw_3.SetRedraw(False)
  661. tab_1.tabpage_2.dw_3.DataObject = ls_dwname
  662. tab_1.tabpage_2.dw_3.cur_developtype = 1
  663. tab_1.tabpage_2.dw_3.TriggerEvent(Constructor!)
  664. tab_1.tabpage_2.dw_3.InsertRow(0)
  665. tab_1.tabpage_2.dw_3.SetRedraw(True)
  666. sys_development = li_sys_development_ori
  667. ////////////////////////////////////////// //
  668. END IF
  669. tab_1.tabpage_2.dw_column.SetRedraw(False)
  670. tab_1.tabpage_2.dw_column.Reset()
  671. //读obj
  672. IF li_dwstyle = 1 THEN //Grid
  673. f_get_obj2dw_super(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_2)
  674. ELSE
  675. f_get_obj2dw_super(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_3)
  676. END IF
  677. tab_1.tabpage_2.dw_column.SetSort("objx")
  678. tab_1.tabpage_2.dw_column.Sort()
  679. tab_1.tabpage_2.dw_column.SetRedraw(True)
  680. ELSE
  681. tab_1.tabpage_2.dw_column.Reset()
  682. tab_1.tabpage_2.dw_2.Visible = False
  683. tab_1.tabpage_2.dw_3.Visible = False
  684. tab_1.tabpage_2.dw_2.SetRedraw(False)
  685. tab_1.tabpage_2.dw_2.DataObject = ""
  686. tab_1.tabpage_2.dw_2.SetRedraw(True)
  687. tab_1.tabpage_2.dw_3.SetRedraw(False)
  688. tab_1.tabpage_2.dw_3.DataObject = ""
  689. tab_1.tabpage_2.dw_3.SetRedraw(True)
  690. END IF
  691. RETURN
  692. end subroutine
  693. public subroutine wf_save_dw_obj ();
  694. IF not dw_edit_mode THEN return
  695. String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
  696. String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
  697. String ls_mdfstr_text
  698. String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
  699. String ls_dwname, ls_AllowVersion,ls_dbname
  700. String ls_coltype, ls_dftvalue
  701. Integer ll_objvisible
  702. Long ll_width
  703. Long ll_alignment
  704. Long ll_x, ll_y,ll_titlex,ll_titley
  705. Long i, ll_row
  706. IF tab_1.tabpage_2.dw_column.RowCount() <= 0 THEN RETURN
  707. ll_row = tab_1.tabpage_2.dw_windw.GetRow()
  708. IF ll_row <= 0 THEN RETURN
  709. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[ll_row]
  710. tab_1.tabpage_2.dw_column.AcceptText()
  711. FOR i = 1 To tab_1.tabpage_2.dw_column.RowCount()
  712. ls_object_col = tab_1.tabpage_2.dw_column.Object.objname[i]
  713. ll_objvisible = tab_1.tabpage_2.dw_column.Object.objvisible[i]
  714. ls_dftvalue = tab_1.tabpage_2.dw_column.Object.objdftvalue[i]
  715. ls_mdfstr_visible += ls_object_col+'.visible='+String(ll_objvisible)+'~t'
  716. ls_mdfstr_DftValue += ls_object_col+'.initial='+ls_dftvalue+'~t'
  717. NEXT
  718. ls_mdfstr_visible = ls_mdfstr_visible
  719. //sys_user_dwnSyntax
  720. UPDATE sys_user_dwnSyntax
  721. SET dwnSyntax_layout_column_visible = :ls_mdfstr_visible
  722. WHERE empid = -1
  723. And dwname = :ls_dwname;
  724. IF sqlca.SQLCode = 0 THEN
  725. IF sqlca.SQLNRows = 0 THEN
  726. INSERT INTO sys_user_dwnSyntax
  727. (empid, DwName, dwnSyntax_layout_column_visible)
  728. VALUES (-1,:ls_dwname,:ls_mdfstr_visible);
  729. IF sqlca.SQLCode <> 0 THEN
  730. ROLLBACK;
  731. ELSE
  732. COMMIT;
  733. END IF
  734. ELSE
  735. COMMIT;
  736. END IF
  737. ELSE
  738. ROLLBACK;
  739. END IF
  740. RETURN
  741. end subroutine
  742. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
  743. // function: pf_treegrowth()
  744. //--------------------------------------------------------------------
  745. // description:
  746. //--------------------------------------------------------------------
  747. // arguments:
  748. // value long arg_handl
  749. // value long arg_funcid
  750. // value integer arg_lp
  751. //--------------------------------------------------------------------
  752. // returns: integer
  753. //--------------------------------------------------------------------
  754. // author: lhd date: 2013.06.16
  755. //--------------------------------------------------------------------
  756. // modify history:
  757. //
  758. //====================================================================
  759. Int rslt = 1
  760. s_sys_func ls_s_func[]
  761. Long count = 0,ls_i
  762. Long handl
  763. treeviewitem tvi
  764. IF IsNull(arg_funcid) THEN RETURN 0
  765. deep++
  766. IF deep > 100000 THEN //防止死递归
  767. RETURN 0
  768. END IF
  769. String ls_filter
  770. IF sys_if_network = 1 THEN
  771. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
  772. ELSE
  773. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
  774. END IF
  775. IF sys_version_type = 0 THEN
  776. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  777. ELSEIF sys_version_type = 1 THEN
  778. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  779. ELSEIF sys_version_type = 2 THEN
  780. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  781. END IF
  782. ls_filter += " and if_use <> 0 and functype <> 2 "
  783. sys_ds_maininfo.SetFilter(ls_filter)
  784. sys_ds_maininfo.Filter()
  785. FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
  786. IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
  787. (sys_ds_maininfo.Object.funcid[ls_i] <> 263 And sys_ds_maininfo.Object.funcid[ls_i] <> 1573 And sys_ds_maininfo.Object.funcid[ls_i] <> 1889 ) THEN CONTINUE
  788. count++
  789. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  790. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  791. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  792. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  793. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  794. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  795. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  796. ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
  797. ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
  798. ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
  799. NEXT
  800. FOR ls_i = 1 To count
  801. //
  802. IF is_sys_pwrstr_sys <> "" THEN
  803. IF Not Mid(is_sys_pwrstr_sys,ls_s_func[ls_i].funcid,1) = '1' THEN
  804. CONTINUE
  805. END IF
  806. END IF
  807. IF ls_s_func[ls_i].functype = 0 THEN
  808. arg_lp = 2
  809. ELSEIF ls_s_func[ls_i].functype = 8 THEN
  810. arg_lp = 3
  811. ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
  812. arg_lp = 10
  813. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  814. arg_lp = 4
  815. END IF
  816. handl = tv_func.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
  817. // tv_func.ExpandItem(arg_handl)
  818. tv_func.GetItem(handl,tvi)
  819. tvi.StatePictureIndex = 2
  820. tvi.Data = ls_s_func[ls_i].funcid
  821. tv_func.SetItem(handl,tvi)
  822. pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
  823. NEXT
  824. RETURN rslt
  825. end function
  826. public subroutine wf_get_planstr (ref string arg_sys_pwrstr, ref string arg_sys_optionstr);String ls_sys_pwrstr,ls_sys_optionstr
  827. SELECT sys_pwrstr,sys_optionstr
  828. INTO :ls_sys_pwrstr,:ls_sys_optionstr
  829. FROM sys_DB_version;
  830. IF sqlca.SQLCode <> 0 THEN
  831. ls_sys_pwrstr = Fill('1',5000)
  832. ls_sys_optionstr = Fill('1',500)
  833. END IF
  834. IF ls_sys_pwrstr = '' THEN
  835. ls_sys_pwrstr = Fill('1',5000)
  836. END IF
  837. IF ls_sys_optionstr = '' THEN
  838. ls_sys_optionstr = Fill('1',5000)
  839. END IF
  840. arg_sys_pwrstr = ls_sys_pwrstr
  841. arg_sys_optionstr = ls_sys_optionstr
  842. end subroutine
  843. public subroutine wf_get_planstr_sys (ref string arg_sys_pwrstr);String ls_sys_pwrstr,ls_sys_optionstr
  844. SELECT sys_pwrstr_sys,sys_optionstr_sys
  845. INTO :ls_sys_pwrstr,:ls_sys_optionstr
  846. FROM sys_DB_version;
  847. IF sqlca.SQLCode <> 0 THEN
  848. ls_sys_pwrstr = ''
  849. ls_sys_optionstr = ''
  850. END IF
  851. arg_sys_pwrstr = ls_sys_pwrstr
  852. //arg_sys_optionstr = ls_sys_optionstr
  853. end subroutine
  854. on w_system_plan_super.create
  855. int iCurrent
  856. call super::create
  857. this.tab_1=create tab_1
  858. this.cb_edit=create cb_edit
  859. this.cb_save=create cb_save
  860. this.cb_in=create cb_in
  861. this.cb_out=create cb_out
  862. this.cb_select=create cb_select
  863. this.cb_3=create cb_3
  864. this.cb_retrieve=create cb_retrieve
  865. this.ln_bar=create ln_bar
  866. this.ln_bar2=create ln_bar2
  867. this.r_bar=create r_bar
  868. iCurrent=UpperBound(this.Control)
  869. this.Control[iCurrent+1]=this.tab_1
  870. this.Control[iCurrent+2]=this.cb_edit
  871. this.Control[iCurrent+3]=this.cb_save
  872. this.Control[iCurrent+4]=this.cb_in
  873. this.Control[iCurrent+5]=this.cb_out
  874. this.Control[iCurrent+6]=this.cb_select
  875. this.Control[iCurrent+7]=this.cb_3
  876. this.Control[iCurrent+8]=this.cb_retrieve
  877. this.Control[iCurrent+9]=this.ln_bar
  878. this.Control[iCurrent+10]=this.ln_bar2
  879. this.Control[iCurrent+11]=this.r_bar
  880. end on
  881. on w_system_plan_super.destroy
  882. call super::destroy
  883. destroy(this.tab_1)
  884. destroy(this.cb_edit)
  885. destroy(this.cb_save)
  886. destroy(this.cb_in)
  887. destroy(this.cb_out)
  888. destroy(this.cb_select)
  889. destroy(this.cb_3)
  890. destroy(this.cb_retrieve)
  891. destroy(this.ln_bar)
  892. destroy(this.ln_bar2)
  893. destroy(this.r_bar)
  894. end on
  895. event open;call super::open;//sys_development = 1
  896. tv_func = tab_1.tabpage_1.tv_1
  897. tv_2 = tab_1.tabpage_2.tv_2
  898. dw_sys_option = tab_1.tabpage_3.dw_1
  899. ds_func_tree = CREATE datastore
  900. ds_func_tree.DataObject = 'ds_sys_funcpwr'
  901. ds_func_tree.SetTransObject(sqlca)
  902. //ds_func_tree.Retrieve(-1)
  903. tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
  904. tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
  905. //SELECT sys_pwrstr_sys
  906. // INTO :is_sys_pwrstr_sys
  907. // FROM sys_DB_version;
  908. //IF sqlca.SQLCode <> 0 THEN
  909. // is_sys_pwrstr_sys = ""
  910. //END IF
  911. wf_get_planstr_sys(is_sys_pwrstr_sys)
  912. wf_build_functree()
  913. wf_build_functree2()
  914. ii_version_int = sys_version_int
  915. is_AllowVersion = fill("0", ii_version_int - 1 ) + "1"+fill("0", 20 - ii_version_int)
  916. wf_refresh_option()
  917. wf_retrieve_value()
  918. end event
  919. event resize;call super::resize;ln_bar.EndX = This.Width
  920. ln_bar2.EndX = This.Width
  921. r_bar.Width = This.Width
  922. tab_1.Width = This.Width - tab_1.X - 40
  923. tab_1.Height = This.Height - tab_1.Y - 150
  924. tab_1.tabpage_1.tv_1.Height = tab_1.tabpage_1.Height
  925. tab_1.tabpage_3.dw_1.Height = tab_1.tabpage_3.Height
  926. tab_1.tabpage_1.tv_1.Width = tab_1.tabpage_1.Width
  927. tab_1.tabpage_3.dw_1.Width = tab_1.tabpage_3.Width
  928. tab_1.tabpage_2.tv_2.Height = tab_1.tabpage_2.Height
  929. tab_1.tabpage_2.dw_windw.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  930. tab_1.tabpage_2.dw_windw.Y = tab_1.tabpage_2.tv_2.Y
  931. tab_1.tabpage_2.dw_windw.Width = tab_1.tabpage_2.Width - tab_1.tabpage_2.dw_windw.X - 40
  932. tab_1.tabpage_2.dw_windw.Height = tab_1.tabpage_2.Height / 3
  933. tab_1.tabpage_2.dw_column.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  934. tab_1.tabpage_2.dw_column.Y = tab_1.tabpage_2.dw_windw.Y + tab_1.tabpage_2.dw_windw.Height + 5
  935. tab_1.tabpage_2.dw_column.Width = tab_1.tabpage_2.dw_windw.Width
  936. //IF tab_1.tabpage_2.dw_2.Visible THEN
  937. // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - 400
  938. //
  939. // tab_1.tabpage_2.dw_2.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  940. // tab_1.tabpage_2.dw_2.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
  941. // tab_1.tabpage_2.dw_2.Width = tab_1.tabpage_2.dw_windw.Width
  942. // tab_1.tabpage_2.dw_2.Height = 380
  943. //ELSE
  944. // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3
  945. //END IF
  946. long ll_dw_column_height = 600
  947. tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
  948. tab_1.tabpage_2.dw_2.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  949. tab_1.tabpage_2.dw_2.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
  950. tab_1.tabpage_2.dw_2.Width = tab_1.tabpage_2.dw_windw.Width
  951. tab_1.tabpage_2.dw_2.Height = ll_dw_column_height - 10
  952. // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
  953. //
  954. tab_1.tabpage_2.dw_3.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  955. tab_1.tabpage_2.dw_3.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
  956. tab_1.tabpage_2.dw_3.Width = tab_1.tabpage_2.dw_windw.Width
  957. tab_1.tabpage_2.dw_3.Height = ll_dw_column_height - 10
  958. end event
  959. event key;call super::key;IF KeyDown(KeyControl!) And KeyDown(KeyF9!) THEN
  960. //刷新权限树
  961. is_sys_pwrstr_sys = ""
  962. wf_build_functree()
  963. wf_build_functree2()
  964. wf_retrieve_value()
  965. END IF
  966. end event
  967. type cb_func from w_publ_base`cb_func within w_system_plan_super
  968. boolean visible = false
  969. end type
  970. type cb_exit from w_publ_base`cb_exit within w_system_plan_super
  971. integer x = 2034
  972. integer width = 165
  973. integer height = 164
  974. integer picsize = 16
  975. toolbaralignment pic_align = alignattop!
  976. boolean border = false
  977. end type
  978. type tab_1 from tab within w_system_plan_super
  979. integer y = 184
  980. integer width = 3584
  981. integer height = 1984
  982. integer taborder = 20
  983. boolean bringtotop = true
  984. integer textsize = -9
  985. integer weight = 400
  986. fontcharset fontcharset = gb2312charset!
  987. fontpitch fontpitch = variable!
  988. string facename = "宋体"
  989. long backcolor = 134217739
  990. boolean raggedright = true
  991. boolean focusonbuttondown = true
  992. integer selectedtab = 1
  993. tabpage_1 tabpage_1
  994. tabpage_3 tabpage_3
  995. tabpage_2 tabpage_2
  996. end type
  997. on tab_1.create
  998. this.tabpage_1=create tabpage_1
  999. this.tabpage_3=create tabpage_3
  1000. this.tabpage_2=create tabpage_2
  1001. this.Control[]={this.tabpage_1,&
  1002. this.tabpage_3,&
  1003. this.tabpage_2}
  1004. end on
  1005. on tab_1.destroy
  1006. destroy(this.tabpage_1)
  1007. destroy(this.tabpage_3)
  1008. destroy(this.tabpage_2)
  1009. end on
  1010. type tabpage_1 from userobject within tab_1
  1011. integer x = 18
  1012. integer y = 96
  1013. integer width = 3547
  1014. integer height = 1872
  1015. long backcolor = 134217739
  1016. string text = "系统菜单"
  1017. long tabtextcolor = 33554432
  1018. long tabbackcolor = 134217739
  1019. long picturemaskcolor = 536870912
  1020. tv_1 tv_1
  1021. end type
  1022. on tabpage_1.create
  1023. this.tv_1=create tv_1
  1024. this.Control[]={this.tv_1}
  1025. end on
  1026. on tabpage_1.destroy
  1027. destroy(this.tv_1)
  1028. end on
  1029. type tv_1 from treeview within tabpage_1
  1030. event afterclicked ( long handle, boolean arg_changed )
  1031. integer width = 3269
  1032. integer height = 1976
  1033. integer taborder = 30
  1034. integer textsize = -9
  1035. integer weight = 400
  1036. fontcharset fontcharset = gb2312charset!
  1037. fontpitch fontpitch = variable!
  1038. string facename = "宋体"
  1039. long textcolor = 33554432
  1040. borderstyle borderstyle = stylelowered!
  1041. boolean disabledragdrop = false
  1042. boolean hideselection = false
  1043. boolean tooltips = false
  1044. boolean checkboxes = true
  1045. boolean trackselect = true
  1046. string picturename[] = {"application.ico","graphics\Shell32 005.bmp","graphics\task.bmp","graphics\Shell32 025.ico","graphics\guide.ico","graphics\plan.bmp","graphics\define.bmp","graphics\report.bmp","graphics\system.bmp","graphics\reportfold2.jpg","graphics\Window 08.ico"}
  1047. long picturemaskcolor = 536870912
  1048. long statepicturemaskcolor = 536870912
  1049. end type
  1050. event afterclicked(long handle, boolean arg_changed);treeviewitem tvi
  1051. long laststate
  1052. laststate = wf_gethandlestate(handle)
  1053. if laststate = 0 then return
  1054. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1055. IF arg_changed THEN // 状态更改
  1056. IF NOT dw_edit_mode THEN
  1057. tvi.StatePictureIndex = lastState
  1058. THIS.SetItem(Handle, tvi)
  1059. ELSE
  1060. IF Handle > 0 THEN
  1061. IF lastState = 2 THEN //孩子全部取消
  1062. wf_set_tvchild(Handle)
  1063. ELSEIF lastState = 1 THEN //父亲选定
  1064. wf_set_tvparent(Handle)
  1065. END IF
  1066. END IF
  1067. END IF
  1068. wf_sethandlestate(handle, 0)
  1069. END IF
  1070. END IF
  1071. end event
  1072. event clicked;Int ls_state
  1073. treeviewitem tvi
  1074. Boolean lb_changed = FALSE
  1075. IF GetCursor() = LoadCursor(0, 32649) THEN
  1076. lb_changed = TRUE
  1077. END IF
  1078. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1079. ls_state = tvi.StatePictureIndex
  1080. IF wf_gethandlestate(Handle) = 0 THEN
  1081. wf_sethandlestate(Handle, ls_state)
  1082. END IF
  1083. THIS.EVENT POST afterclicked(Handle, lb_changed)
  1084. END IF
  1085. end event
  1086. event key;Int ls_state
  1087. treeviewitem tvi
  1088. Long Handle
  1089. IF Key = keyspacebar! THEN
  1090. Handle = tv_func.FindItem(CurrentTreeItem!, 0)
  1091. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1092. ls_state = tvi.StatePictureIndex
  1093. IF wf_gethandlestate(Handle) = 0 THEN
  1094. wf_sethandlestate(Handle, ls_state)
  1095. END IF
  1096. THIS.EVENT POST afterclicked(Handle, TRUE)
  1097. END IF
  1098. END IF
  1099. end event
  1100. type tabpage_3 from userobject within tab_1
  1101. integer x = 18
  1102. integer y = 96
  1103. integer width = 3547
  1104. integer height = 1872
  1105. long backcolor = 134217739
  1106. string text = "系统选项"
  1107. long tabtextcolor = 33554432
  1108. long tabbackcolor = 134217739
  1109. long picturemaskcolor = 536870912
  1110. dw_1 dw_1
  1111. end type
  1112. on tabpage_3.create
  1113. this.dw_1=create dw_1
  1114. this.Control[]={this.dw_1}
  1115. end on
  1116. on tabpage_3.destroy
  1117. destroy(this.dw_1)
  1118. end on
  1119. type dw_1 from u_dw_rbtnfilter within tabpage_3
  1120. integer width = 3547
  1121. integer height = 1984
  1122. integer taborder = 20
  1123. string dataobject = "dw_sys_option_systemplan"
  1124. boolean hscrollbar = true
  1125. boolean vscrollbar = true
  1126. boolean hsplitscroll = true
  1127. boolean rbutton_filter_use = true
  1128. boolean rbutton_setposition_use = true
  1129. boolean titleclick_sort_use = true
  1130. end type
  1131. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1132. THIS.SelectRow(0,FALSE)
  1133. THIS.SelectRow(currentrow,TRUE)
  1134. THIS.SetRow(currentrow)
  1135. END IF
  1136. end event
  1137. event clicked;call super::clicked;IF row > 0 THEN
  1138. THIS.SelectRow(0,FALSE)
  1139. THIS.SelectRow(row,TRUE)
  1140. THIS.SetRow(row)
  1141. END IF
  1142. end event
  1143. type tabpage_2 from userobject within tab_1
  1144. integer x = 18
  1145. integer y = 96
  1146. integer width = 3547
  1147. integer height = 1872
  1148. long backcolor = 134217739
  1149. string text = "数据窗口"
  1150. long tabtextcolor = 33554432
  1151. long tabbackcolor = 134217739
  1152. long picturemaskcolor = 536870912
  1153. dw_3 dw_3
  1154. dw_2 dw_2
  1155. dw_column dw_column
  1156. dw_windw dw_windw
  1157. tv_2 tv_2
  1158. end type
  1159. on tabpage_2.create
  1160. this.dw_3=create dw_3
  1161. this.dw_2=create dw_2
  1162. this.dw_column=create dw_column
  1163. this.dw_windw=create dw_windw
  1164. this.tv_2=create tv_2
  1165. this.Control[]={this.dw_3,&
  1166. this.dw_2,&
  1167. this.dw_column,&
  1168. this.dw_windw,&
  1169. this.tv_2}
  1170. end on
  1171. on tabpage_2.destroy
  1172. destroy(this.dw_3)
  1173. destroy(this.dw_2)
  1174. destroy(this.dw_column)
  1175. destroy(this.dw_windw)
  1176. destroy(this.tv_2)
  1177. end on
  1178. type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
  1179. integer x = 2290
  1180. integer y = 1112
  1181. integer taborder = 30
  1182. boolean hscrollbar = true
  1183. boolean vscrollbar = true
  1184. boolean hsplitscroll = true
  1185. boolean cur_usekey = true
  1186. boolean cur_autosave_wh = false
  1187. end type
  1188. type dw_2 from u_dw_rbtnfilter within tabpage_2
  1189. integer x = 1097
  1190. integer y = 1020
  1191. integer taborder = 20
  1192. boolean hscrollbar = true
  1193. boolean vscrollbar = true
  1194. boolean hsplitscroll = true
  1195. end type
  1196. event ue_setlayout;call super::ue_setlayout;wf_retrieve_dw_obj(dw_windw.getrow())
  1197. end event
  1198. type dw_column from u_dw_rbtnfilter within tabpage_2
  1199. integer x = 1175
  1200. integer y = 628
  1201. integer width = 1157
  1202. integer taborder = 20
  1203. string dataobject = "dw_system_plan_dw_obj"
  1204. boolean hscrollbar = true
  1205. boolean vscrollbar = true
  1206. boolean hsplitscroll = true
  1207. boolean rbutton_filter_use = true
  1208. boolean titleclick_sort_use = true
  1209. end type
  1210. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1211. this.setrow(currentrow)
  1212. this.selectrow(0,false)
  1213. this.selectrow(currentrow,true)
  1214. END IF
  1215. //wf_retrieve_allowversion(currentrow)
  1216. end event
  1217. event clicked;call super::clicked;IF dw_edit_mode THEN
  1218. IF row > 0 THEN
  1219. This.SetRow(row)
  1220. This.SelectRow(0,False)
  1221. This.SelectRow(row,True)
  1222. END IF
  1223. // wf_retrieve_allowversion(row)
  1224. END IF
  1225. end event
  1226. type dw_windw from u_dw_rbtnfilter within tabpage_2
  1227. integer x = 1019
  1228. integer y = 4
  1229. integer width = 1888
  1230. integer height = 508
  1231. integer taborder = 20
  1232. string dataobject = "dw_sys_win_dw_systemplan"
  1233. boolean hscrollbar = true
  1234. boolean vscrollbar = true
  1235. boolean hsplitscroll = true
  1236. boolean rbutton_filter_use = true
  1237. boolean titleclick_sort_use = true
  1238. end type
  1239. event rowfocuschanged;call super::rowfocuschanged;//IF dw_edit_mode THEN
  1240. // wf_check_modify(0,1)
  1241. //END IF
  1242. IF currentrow > 0 THEN
  1243. This.SetRow(currentrow)
  1244. This.SelectRow(0,False)
  1245. This.SelectRow(currentrow,True)
  1246. END IF
  1247. wf_retrieve_dw_obj(currentrow)
  1248. //wf_retrieve_col(currentrow)
  1249. end event
  1250. event clicked;call super::clicked;IF dw_edit_mode THEN
  1251. wf_check_modify(0,1)
  1252. IF row > 0 THEN
  1253. This.SetRow(row)
  1254. This.SelectRow(0,False)
  1255. This.SelectRow(row,True)
  1256. END IF
  1257. // wf_retrieve_col(row)
  1258. wf_retrieve_dw_obj(row)
  1259. END IF
  1260. end event
  1261. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  1262. String ls_dwobject, ls_winname
  1263. Int li_dwstyle
  1264. string ls_mod_arr[]
  1265. string arg_msg
  1266. long uc_width, uc_height
  1267. f_set_nomod(ls_dwobject, ls_mod_arr, arg_msg)
  1268. ls_dwobject = This.Object.dwname[row]
  1269. li_dwstyle = This.Object.dwstyle[row]
  1270. ls_winname = This.Object.winname[row]
  1271. //读出UC高度与宽度
  1272. uc_width = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "width",'0'))
  1273. uc_height = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "height",'0'))
  1274. s_dw_uc_modify s_modify
  1275. IF li_dwstyle = 0 THEN //freeform
  1276. //ue_modify()调用修改UC布局窗口
  1277. s_modify.datawinname_uc = ls_dwobject
  1278. s_modify.nomod = ls_mod_arr
  1279. s_modify.uc_column_int = 20 //uc_column_int
  1280. s_modify.uc_width = uc_width
  1281. s_modify.uc_height = uc_height
  1282. s_modify.win = ls_winname
  1283. s_modify.mainid = il_dw_mainid
  1284. OpenWithParm(w_sysplan_dw_freeform_edit,s_modify)
  1285. ELSE
  1286. s_modify.datawinname_uc = ls_dwobject
  1287. s_modify.nomod = ls_mod_arr
  1288. s_modify.uc_column_int = 20 //uc_column_int
  1289. s_modify.uc_width = uc_width
  1290. s_modify.uc_height = uc_height
  1291. s_modify.win = ls_winname
  1292. s_modify.mainid = il_dw_mainid
  1293. OpenWithParm(w_sysplan_dw_edit,s_modify)
  1294. END IF
  1295. END IF
  1296. end event
  1297. type tv_2 from treeview within tabpage_2
  1298. event afterclicked ( long handle, boolean arg_changed )
  1299. integer width = 1015
  1300. integer height = 1976
  1301. integer taborder = 10
  1302. integer textsize = -9
  1303. integer weight = 400
  1304. fontcharset fontcharset = gb2312charset!
  1305. fontpitch fontpitch = variable!
  1306. string facename = "宋体"
  1307. long textcolor = 33554432
  1308. borderstyle borderstyle = stylelowered!
  1309. boolean disabledragdrop = false
  1310. boolean hideselection = false
  1311. boolean tooltips = false
  1312. boolean trackselect = true
  1313. string picturename[] = {"application.ico","graphics\Shell32 005.bmp","graphics\task.bmp","graphics\Shell32 025.ico","graphics\guide.ico","graphics\plan.bmp","graphics\define.bmp","graphics\report.bmp","graphics\system.bmp","graphics\reportfold2.jpg","graphics\Window 08.ico"}
  1314. long picturemaskcolor = 536870912
  1315. long statepicturemaskcolor = 536870912
  1316. end type
  1317. event clicked;Long ll_funcid
  1318. Long ll_mainid
  1319. Long ll_row
  1320. String ls_winname
  1321. treeviewitem tvi
  1322. IF this.GetItem(Handle,tvi) = 1 THEN
  1323. ll_funcid = Long(tvi.Data)
  1324. ll_row = ds_func_tree.Find("funcid = "+String(ll_funcid), 1, ds_func_tree.RowCount())
  1325. IF ll_row > 0 THEN
  1326. ll_mainid = ds_func_tree.Object.mainid[ll_row]
  1327. IF ll_mainid > 0 THEN
  1328. il_dw_mainid = ll_mainid
  1329. ls_winname = s_sys_win_open[ll_mainid].Name
  1330. wf_check_modify(1,1)
  1331. dw_windw.Retrieve(ls_winname)
  1332. END IF
  1333. END IF
  1334. END IF
  1335. end event
  1336. event itempopulate;
  1337. treeviewitem tvi
  1338. Long ll_funcid
  1339. IF Handle > 0 THEN
  1340. This.GetItem(Handle,tvi)
  1341. ll_funcid = Long(tvi.Data)
  1342. pf_treegrowth2(Handle,ll_funcid,1) //下级生成树
  1343. END IF
  1344. end event
  1345. type cb_edit from uo_imflatbutton within w_system_plan_super
  1346. integer x = 187
  1347. integer width = 187
  1348. integer height = 164
  1349. integer taborder = 30
  1350. boolean bringtotop = true
  1351. string text = "修改"
  1352. string normalpicname = "open.bmp"
  1353. integer picsize = 16
  1354. toolbaralignment pic_align = alignattop!
  1355. boolean border = false
  1356. end type
  1357. event clicked;call super::clicked;IF NOT sys_power_issuper THEN
  1358. MessageBox("系统提示","非管理员不可以操作")
  1359. RETURN
  1360. END IF
  1361. IF dw_edit_mode THEN
  1362. IF MessageBox ("IF","是否确定要放弃保存当前内容?",Question!,YesNo! ) = 2 THEN RETURN
  1363. wf_retrieve_value()
  1364. END IF
  1365. dw_edit_mode = NOT dw_edit_mode
  1366. wf_face()
  1367. end event
  1368. type cb_save from uo_imflatbutton within w_system_plan_super
  1369. integer x = 375
  1370. integer width = 178
  1371. integer height = 164
  1372. integer taborder = 10
  1373. boolean bringtotop = true
  1374. boolean enabled = false
  1375. string text = "保存"
  1376. string normalpicname = "save.bmp"
  1377. integer picsize = 16
  1378. toolbaralignment pic_align = alignattop!
  1379. boolean border = false
  1380. end type
  1381. event clicked;call super::clicked;IF NOT sys_power_issuper THEN
  1382. MessageBox("系统提示","非管理员不可以操作")
  1383. RETURN
  1384. END IF
  1385. String ls_pwrstr,ls_optionstr
  1386. ls_pwrstr = wf_getright()
  1387. ls_optionstr = wf_getoption()
  1388. UPDATE sys_DB_version
  1389. SET sys_pwrstr = :ls_pwrstr,
  1390. sys_optionstr = :ls_optionstr;
  1391. IF sqlca.SQLCode <> 0 THEN
  1392. ROLLBACK;
  1393. MessageBox('Error','更新系统解决方案失败,'+sqlca.SQLErrText)
  1394. RETURN
  1395. END IF
  1396. IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
  1397. ROLLBACK;
  1398. MessageBox('Error','更新数据窗口内容失败,'+sqlca.SQLErrText)
  1399. RETURN
  1400. END IF
  1401. wf_save_dw_obj()
  1402. COMMIT;
  1403. dw_edit_mode = NOT dw_edit_mode
  1404. wf_face()
  1405. MessageBox('系统提示','保存成功!请重启系统使方案生效')
  1406. end event
  1407. type cb_in from uo_imflatbutton within w_system_plan_super
  1408. integer x = 718
  1409. integer width = 439
  1410. integer height = 164
  1411. integer taborder = 30
  1412. boolean bringtotop = true
  1413. string text = "导入管理员方案"
  1414. string normalpicname = "mx1.BMP"
  1415. integer picsize = 16
  1416. toolbaralignment pic_align = alignattop!
  1417. boolean border = false
  1418. end type
  1419. event clicked;call super::clicked;
  1420. Open(w_sysplan_import)
  1421. wf_get_planstr_sys(is_sys_pwrstr_sys)
  1422. //SELECT sys_pwrstr_sys
  1423. // INTO :is_sys_pwrstr_sys
  1424. // FROM sys_DB_version;
  1425. //IF sqlca.SQLCode <> 0 THEN
  1426. // is_sys_pwrstr_sys = ""
  1427. //END IF
  1428. //String ls_sys_pwrstr,ls_sys_optionstr
  1429. //wf_get_planstr(ls_sys_pwrstr, ls_sys_optionstr)
  1430. wf_build_functree()
  1431. wf_build_functree2()
  1432. wf_retrieve_value()
  1433. end event
  1434. type cb_out from uo_imflatbutton within w_system_plan_super
  1435. integer x = 1157
  1436. integer width = 439
  1437. integer height = 164
  1438. integer taborder = 20
  1439. boolean bringtotop = true
  1440. string text = "导出管理员方案"
  1441. string normalpicname = "mx2.BMP"
  1442. integer picsize = 16
  1443. toolbaralignment pic_align = alignattop!
  1444. boolean border = false
  1445. end type
  1446. event clicked;call super::clicked;Open(w_sysplan_export)
  1447. end event
  1448. type cb_select from uo_imflatbutton within w_system_plan_super
  1449. integer x = 553
  1450. integer width = 165
  1451. integer height = 164
  1452. integer taborder = 20
  1453. boolean bringtotop = true
  1454. boolean enabled = false
  1455. string text = "全选"
  1456. string normalpicname = "ok.bmp"
  1457. integer picsize = 16
  1458. toolbaralignment pic_align = alignattop!
  1459. boolean border = false
  1460. end type
  1461. event clicked;call super::clicked;IF NOT dw_edit_mode THEN RETURN
  1462. Long ll_handl
  1463. String ls_sys_pwrstr,ls_sys_optionstr
  1464. ls_sys_pwrstr = Fill('1',5000)
  1465. ls_sys_optionstr = Fill('1',1000)
  1466. IF tab_1.SelectedTab = 1 THEN
  1467. IF MessageBox('询问','是否确定要全选系统菜单?',question!,yesno!) = 2 THEN RETURN
  1468. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  1469. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
  1470. ELSEIF tab_1.SelectedTab = 2 THEN
  1471. IF MessageBox('询问','是否确定要全选系统选项?',question!,yesno!) = 2 THEN RETURN
  1472. wf_setvalue_option(ls_sys_optionstr)
  1473. END IF
  1474. end event
  1475. type cb_3 from uo_imflatbutton within w_system_plan_super
  1476. integer x = 1595
  1477. integer width = 439
  1478. integer height = 164
  1479. integer taborder = 20
  1480. boolean bringtotop = true
  1481. string text = "导入解决方案"
  1482. string normalpicname = "mx1.BMP"
  1483. integer picsize = 16
  1484. toolbaralignment pic_align = alignattop!
  1485. boolean border = false
  1486. end type
  1487. event clicked;call super::clicked;
  1488. Openwithparm(w_system_plan_import, is_AllowVersion)
  1489. //wf_retrieve_value()
  1490. SELECT sys_pwrstr_sys
  1491. INTO :is_sys_pwrstr_sys
  1492. FROM sys_DB_version;
  1493. IF sqlca.SQLCode <> 0 THEN
  1494. is_sys_pwrstr_sys = ""
  1495. END IF
  1496. wf_build_functree()
  1497. wf_build_functree2()
  1498. wf_retrieve_value()
  1499. end event
  1500. type cb_retrieve from uo_imflatbutton within w_system_plan_super
  1501. integer width = 187
  1502. integer height = 164
  1503. integer taborder = 10
  1504. boolean bringtotop = true
  1505. string text = "刷新"
  1506. string normalpicname = "refresh.bmp"
  1507. integer picsize = 16
  1508. toolbaralignment pic_align = alignattop!
  1509. boolean border = false
  1510. end type
  1511. event clicked;call super::clicked;
  1512. wf_refresh_option()
  1513. wf_retrieve_value()
  1514. end event
  1515. type ln_bar from line within w_system_plan_super
  1516. long linecolor = 268435456
  1517. integer linethickness = 4
  1518. integer beginy = 172
  1519. integer endx = 2007
  1520. integer endy = 172
  1521. end type
  1522. type ln_bar2 from line within w_system_plan_super
  1523. long linecolor = 16777215
  1524. integer linethickness = 4
  1525. integer beginy = 176
  1526. integer endx = 2039
  1527. integer endy = 176
  1528. end type
  1529. type r_bar from rectangle within w_system_plan_super
  1530. long linecolor = 16777215
  1531. integer linethickness = 4
  1532. long fillcolor = 1073741824
  1533. integer x = 2811
  1534. integer width = 146
  1535. integer height = 68
  1536. end type
  1537. event constructor;this.fillcolor = 14215660
  1538. this.linecolor = 14215660
  1539. this.x = -1
  1540. this.y = -1
  1541. this.height = ln_bar.beginy - 5
  1542. end event