1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948 |
- $PBExportHeader$w_system_plan_super.srw
- forward
- global type w_system_plan_super from w_publ_base
- end type
- type tab_1 from tab within w_system_plan_super
- end type
- type tabpage_1 from userobject within tab_1
- end type
- type tv_1 from treeview within tabpage_1
- end type
- type tabpage_1 from userobject within tab_1
- tv_1 tv_1
- end type
- type tabpage_3 from userobject within tab_1
- end type
- type dw_1 from u_dw_rbtnfilter within tabpage_3
- end type
- type tabpage_3 from userobject within tab_1
- dw_1 dw_1
- end type
- type tabpage_2 from userobject within tab_1
- end type
- type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
- end type
- type dw_2 from u_dw_rbtnfilter within tabpage_2
- end type
- type dw_column from u_dw_rbtnfilter within tabpage_2
- end type
- type dw_windw from u_dw_rbtnfilter within tabpage_2
- end type
- type tv_2 from treeview within tabpage_2
- end type
- type tabpage_2 from userobject within tab_1
- dw_3 dw_3
- dw_2 dw_2
- dw_column dw_column
- dw_windw dw_windw
- tv_2 tv_2
- end type
- type tab_1 from tab within w_system_plan_super
- tabpage_1 tabpage_1
- tabpage_3 tabpage_3
- tabpage_2 tabpage_2
- end type
- type cb_edit from uo_imflatbutton within w_system_plan_super
- end type
- type cb_save from uo_imflatbutton within w_system_plan_super
- end type
- type cb_in from uo_imflatbutton within w_system_plan_super
- end type
- type cb_out from uo_imflatbutton within w_system_plan_super
- end type
- type cb_select from uo_imflatbutton within w_system_plan_super
- end type
- type cb_3 from uo_imflatbutton within w_system_plan_super
- end type
- type cb_retrieve from uo_imflatbutton within w_system_plan_super
- end type
- type ln_bar from line within w_system_plan_super
- end type
- type ln_bar2 from line within w_system_plan_super
- end type
- type r_bar from rectangle within w_system_plan_super
- end type
- end forward
- global type w_system_plan_super from w_publ_base
- integer width = 3611
- integer height = 2380
- string title = "系统解决方案-管理员模式"
- boolean maxbox = true
- windowstate windowstate = maximized!
- tab_1 tab_1
- cb_edit cb_edit
- cb_save cb_save
- cb_in cb_in
- cb_out cb_out
- cb_select cb_select
- cb_3 cb_3
- cb_retrieve cb_retrieve
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- end type
- global w_system_plan_super w_system_plan_super
- type prototypes
- subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
- Function long GetCursor () Library "user32.dll" Alias for "GetCursor"
- Function long LoadCursor (long hInstance, long lpCursorName) Library "user32.dll" Alias for "LoadCursorW"
- end prototypes
- type variables
- treeview tv_func, tv_2
- datawindow dw_sys_option
- Long deep = 0
- Long il_handle_arr[], il_state_arr[]
- Long il_max = 0
- datastore ds_func_tree
- long il_dw_mainid
- //tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
- //tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
- string is_AllowVersion
- string is_dwname
- int ii_version_int
- string is_sys_pwrstr_sys
- end variables
- forward prototypes
- public function integer wf_build_functree ()
- public subroutine wf_refresh_option ()
- public subroutine wf_sethandlestate (long arg_handle, long arg_state)
- public function long wf_gethandlestate (long arg_handle)
- public subroutine wf_set_tvchild (long arg_handl)
- public subroutine wf_set_tvnext (long arg_handl)
- public subroutine wf_set_tvparent (long arg_handl)
- public function integer wf_face ()
- public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr)
- public subroutine wf_setvalue_option (string arg_str)
- public subroutine wf_retrieve_value ()
- public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr)
- public function string wf_getright ()
- public function string wf_getoption ()
- public function integer wf_build_functree2 ()
- public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp)
- public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag)
- public subroutine wf_retrieve_col (long currentrow)
- public subroutine wf_retrieve_allowversion (long currentrow)
- public subroutine wf_set_allowversion ()
- public subroutine wf_retrieve_dw_obj (long currentrow)
- public subroutine wf_save_dw_obj ()
- public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp)
- public subroutine wf_get_planstr (ref string arg_sys_pwrstr, ref string arg_sys_optionstr)
- public subroutine wf_get_planstr_sys (ref string arg_sys_pwrstr)
- end prototypes
- public function integer wf_build_functree ();//====================================================================
- // Function: wf_build_functree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:(None)
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: lhd Date: 2013.06.14
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- Long hand
- deep = 1
- Long tvi_hdl = 0
- DO UNTIL tv_func.FindItem(roottreeitem!, 0) = -1
- tv_func.DeleteItem(tvi_hdl)
- LOOP
- hand = tv_func.InsertItemLast(0,sys_message_title,1)
- pf_treegrowth(hand,0,2)
- tv_func.ExpandAll(hand)
- tv_func.SelectItem(hand)
- RETURN 1
- end function
- public subroutine wf_refresh_option ();Long i
- Long ll_row
- String ls_kind
- String ls_value,arg_msg
- dw_sys_option.SetRedraw(FALSE)
- dw_sys_option.Reset()
- FOR i = 1 TO UpperBound(s_sys_opt)
- IF s_sys_opt[i].optionname = '' THEN CONTINUE
- IF s_sys_opt[i].module = '' THEN CONTINUE
-
- ll_row = dw_sys_option.InsertRow(0)
-
- dw_sys_option.Object.module[ll_row] = s_sys_opt[i].module
- dw_sys_option.Object.optionid[ll_row] = s_sys_opt[i].optionid
- dw_sys_option.Object.optionname[ll_row] = s_sys_opt[i].optionname
-
- dw_sys_option.Object.itype[ll_row] = s_sys_opt[i].itype
- // dw_sys_option.Object.Kindid[ll_row] = s_sys_opt[i].Kind
- // dw_sys_option.Object.printid[ll_row] = s_sys_opt[i].printid
-
- // IF s_sys_opt[i].Kind = 0 THEN
- ls_kind = '流程类'
- // ELSEIF s_sys_opt[i].Kind = 1 THEN
- // ls_kind = '参数类'
- // ELSEIF s_sys_opt[i].Kind = 2 THEN
- // ls_kind = '限制类'
- // ELSEIF s_sys_opt[i].Kind = 3 THEN
- // ls_kind = '界面类'
- // END IF
- //
- // dw_sys_option.Object.Kind[ll_row] = ls_kind
-
- dw_sys_option.Object.module_int[ll_row] = s_sys_opt[i].module_int
- dw_sys_option.Object.dscrp[ll_row] = s_sys_opt[i].dscrp
-
- NEXT
- dw_sys_option.SetSort('module_int asc, kindid asc ,printid asc')
- dw_sys_option.Sort()
- dw_sys_option.SetRedraw(TRUE)
- end subroutine
- public subroutine wf_sethandlestate (long arg_handle, long arg_state);long i
- for i = 1 to il_max
- if il_handle_arr[i] = arg_handle then
- il_state_arr[i] = arg_state
- return
- end if
- next
- il_max ++
- il_handle_arr[il_max] = arg_handle
- il_state_arr[il_max] = arg_state
- end subroutine
- public function long wf_gethandlestate (long arg_handle);long i
- for i = 1 to il_max
- if il_handle_arr[i] = arg_handle then
- return il_state_arr[i]
- end if
- next
- return 0
- end function
- public subroutine wf_set_tvchild (long arg_handl);//====================================================================
- // Function: wf_find_childtree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 1
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvnext(ll_handl)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvnext (long arg_handl);//====================================================================
- // Function: wf_find_childtree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 1
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvchild(ll_handl)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvparent (long arg_handl);//====================================================================
- // Function: wf_find_parenttree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: (none)
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
- loop
- end subroutine
- public function integer wf_face ();IF dw_edit_mode THEN
- cb_in.Enabled = FALSE
- cb_out.Enabled = FALSE
- cb_select.Enabled = TRUE
- cb_save.Enabled = TRUE
- cb_edit.Text = "放弃&E"
-
- cb_edit.normalpicname = 'Undo.bmp'
-
- dw_sys_option.SetTabOrder('ch',10)
-
- tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',10)
- tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',20)
-
- tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',10)
- tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',20)
-
- // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',10)
- ELSE
- cb_in.Enabled = TRUE
- cb_out.Enabled = TRUE
- cb_select.Enabled = FALSE
- cb_save.Enabled = FALSE
-
- cb_edit.Text = "修改&E"
-
- cb_edit.normalpicname = 'OPEN.bmp'
-
- dw_sys_option.SetTabOrder('ch',0)
-
- tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',0)
- tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',0)
-
- tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',0)
- tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',0)
-
- // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',0)
- END IF
- cb_edit.of_init_draw()
- cb_edit.of_paint()
- cb_edit.TriggerEvent('ue_textchange')
- RETURN 1
- end function
- public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr);Long ll_handl
- Long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_func.GetItem(ll_handl,tvi)
- ll_funcid = tvi.Data
- IF NOT ll_funcid = 0 THEN
- IF Mid(arg_rightstr,ll_funcid,1) = '0' or Mid(arg_rightstr,ll_funcid,1) = '' THEN
- tvi.StatePictureIndex = 1
- ELSE
- tvi.StatePictureIndex = 2
- END IF
- END IF
- tv_func.SetItem(ll_handl,tvi)
-
- wf_refresh_tvchild(ll_handl,arg_rightstr)
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_setvalue_option (string arg_str);Long ll_i
- Long ll_optionid
- dw_sys_option.AcceptText()
- dw_sys_option.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_sys_option.RowCount()
- ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
-
- IF Mid(arg_str,ll_optionid,1) = '0' OR Mid(arg_str,ll_optionid,1) = '' THEN
- dw_sys_option.Object.ch[ll_i] = 0
- ELSE
- dw_sys_option.Object.ch[ll_i] = 1
- END IF
- NEXT
- dw_sys_option.SetRedraw(TRUE)
- end subroutine
- public subroutine wf_retrieve_value ();
- String ls_sys_pwrstr,ls_sys_optionstr
- wf_get_planstr(ls_sys_pwrstr, ls_sys_optionstr)
- //SELECT sys_pwrstr,sys_optionstr
- // INTO :ls_sys_pwrstr,:ls_sys_optionstr
- // FROM sys_DB_version;
- //IF sqlca.SQLCode <> 0 THEN
- // ls_sys_pwrstr = Fill('1',5000)
- // ls_sys_optionstr = Fill('1',500)
- //END IF
- //
- //IF ls_sys_pwrstr = '' THEN
- // ls_sys_pwrstr = Fill('1',5000)
- //END IF
- //
- //
- //
- //IF ls_sys_optionstr = '' THEN
- // ls_sys_optionstr = Fill('1',1000)
- //END IF
- Long ll_handl
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
- wf_setvalue_option(ls_sys_optionstr)
- end subroutine
- public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr);Long ll_handl
- Long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_func.GetItem(ll_handl,tvi)
- ll_funcid = tvi.Data
- IF NOT ll_funcid = 0 THEN
- IF tvi.StatePictureIndex = 2 THEN
- arg_rightstr = Replace(arg_rightstr,ll_funcid,1,"1")
- END IF
- END IF
-
- wf_getright_tvchild(ll_handl,arg_rightstr)
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public function string wf_getright ();string ls_ret
- ls_ret=fill("0",5000)
- long ll_handl
- ll_handl = tv_func.finditem(RootTreeItem!,0)
- if ll_handl > 0 then wf_getright_tvchild(ll_handl,ls_ret)
- return ls_ret
- end function
- public function string wf_getoption ();String ls_ret
- Long ll_i,ll_optionid
- ls_ret = Fill("0",500)
- dw_sys_option.SetFilter('')
- dw_sys_option.Filter()
- dw_sys_option.AcceptText()
- FOR ll_i = 1 TO dw_sys_option.RowCount()
- ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
-
- IF dw_sys_option.Object.ch[ll_i] = 1 THEN
- ls_ret = Replace(ls_ret,ll_optionid,1,"1")
- END IF
-
- NEXT
- RETURN ls_ret
- end function
- public function integer wf_build_functree2 ();//====================================================================
- // Function: wf_build_functree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:(None)
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: lhd Date: 2013.06.14
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- Long hand
- deep = 1
- Long tvi_hdl = 0
- DO UNTIL tv_2.FindItem(roottreeitem!, 0) = -1
- tv_2.DeleteItem(tvi_hdl)
- LOOP
- hand = tv_2.InsertItemLast(0,sys_message_title,1)
- pf_treegrowth2(hand,0,2)
- tv_2.ExpandItem(hand)
- RETURN 1
- end function
- public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
- // function: pf_treegrowth()
- //--------------------------------------------------------------------
- // description:
- //--------------------------------------------------------------------
- // arguments:
- // value long arg_handl
- // value long arg_funcid
- // value integer arg_lp
- //--------------------------------------------------------------------
- // returns: integer
- //--------------------------------------------------------------------
- // author: lhd date: 2013.06.16
- //--------------------------------------------------------------------
- // modify history:
- //
- //====================================================================
- Int rslt = 1
- s_sys_func ls_s_func[]
- Long count = 0,ls_i, ll_cnt
- Long handl
- treeviewitem tvi
- IF IsNull(arg_funcid) THEN RETURN 0
- deep++
- IF deep > 100000 THEN //防止死递归
- RETURN 0
- END IF
- String ls_filter
- IF sys_if_network = 1 THEN
- ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
- ELSE
- ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
- END IF
- IF sys_version_type = 0 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
- ELSEIF sys_version_type = 1 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
- ELSEIF sys_version_type = 2 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
- END IF
- ls_filter += " and if_use <> 0 and functype <> 2 and functype <> 9 "
- sys_ds_maininfo.SetFilter(ls_filter)
- sys_ds_maininfo.Filter()
- FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
- // IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
- // (sys_ds_maininfo.Object.funcid[ls_i] <> 263 And sys_ds_maininfo.Object.funcid[ls_i] <> 1573) THEN CONTINUE
-
- count++
- ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
- ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
- ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
- ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
- ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
- ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
- ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
- ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
- ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
- ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
- NEXT
- sys_ds_maininfo.SetFilter("")
- sys_ds_maininfo.Filter()
- FOR ls_i = 1 To count
-
- //
- IF is_sys_pwrstr_sys <> "" THEN
- IF Not Mid(is_sys_pwrstr_sys,ls_s_func[ls_i].funcid,1) = '1' THEN
- CONTINUE
- END IF
- END IF
- IF ls_s_func[ls_i].functype = 0 THEN
- arg_lp = 2
- ELSEIF ls_s_func[ls_i].functype = 8 THEN
- arg_lp = 3
- ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
- arg_lp = 10
- ELSEIF ls_s_func[ls_i].functype = 9 THEN
- arg_lp = 4
- END IF
-
- ll_cnt = sys_ds_maininfo.Find('parentid='+String(ls_s_func[ls_i].funcid) &
- + " and if_use <> 0 " &
- + " and functype <> 2 "&
- + " and functype <> 9 ", 1, sys_ds_maininfo.RowCount())
-
- handl = tv_2.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
- // tv_func.ExpandItem(arg_handl)
- tv_2.GetItem(handl,tvi)
- tvi.StatePictureIndex = 2
- tvi.Data = ls_s_func[ls_i].funcid
- IF ll_cnt > 0 THEN
- tvi.Children = True
- ELSE
- tvi.Children = False
- END IF
-
- tv_2.SetItem(handl,tvi)
-
- // pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
- NEXT
- RETURN rslt
- end function
- public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag);Boolean lb_save = False
- IF arg_colflag = 1 THEN
- wf_save_dw_obj()
- END IF
- IF arg_winflag = 1 THEN
- IF tab_1.tabpage_2.dw_windw.GetNextModified(0, Primary!) <> 0 Or &
- tab_1.tabpage_2.dw_windw.GetNextModified(0, Filter!) <> 0 THEN
- IF MessageBox('系统提示','数据窗口内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
-
- lb_save = True
-
- IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
- ROLLBACK;
- ELSE
- COMMIT;
- END IF
-
- END IF
- END IF
- //IF arg_colflag = 1 THEN
- // IF tab_1.tabpage_2.dw_column.GetNextModified(0, Primary!) <> 0 Or &
- // tab_1.tabpage_2.dw_column.GetNextModified(0, Filter!) <> 0 THEN
- // IF not lb_save THEN
- // IF MessageBox('系统提示','数据窗口字段内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
- // END IF
- // IF tab_1.tabpage_2.dw_column.Update() = -1 THEN
- // ROLLBACK;
- // ELSE
- // COMMIT;
- // END IF
- //
- // END IF
- //END IF
- RETURN
- end subroutine
- public subroutine wf_retrieve_col (long currentrow);String ls_dwname
- Int li_dwstyle
- IF currentrow > 0 THEN
- ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
- li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
-
- tab_1.tabpage_2.dw_column.Retrieve(ls_dwname, li_dwstyle,is_AllowVersion)
- ELSE
- tab_1.tabpage_2.dw_column.Reset()
- END IF
- RETURN
- end subroutine
- public subroutine wf_retrieve_allowversion (long currentrow);string ls_allowversion
- long ll_rowcnt
- long i
- //ll_rowcnt = tab_1.tabpage_2.dw_allowversion.rowcount()
- //IF currentrow > 0 THEN
- // ls_allowversion = tab_1.tabpage_2.dw_column.Object.allowversion[currentrow]
- //
- // for i = 1 to ll_rowcnt
- // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = long(mid(ls_allowversion, i, 1))
- // next
- //ELSE
- // for i = 1 to ll_rowcnt
- // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = 0
- // next
- //END IF
- RETURN
- end subroutine
- public subroutine wf_set_allowversion ();//String ls_allowversion
- //String ls_ch
- //Long i
- //Long ll_row
- //ls_allowversion = "111111111111111111"
- //IF tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Primary!) <> 0 Or &
- // tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Filter!) <> 0 THEN
- //
- // FOR i = 1 To tab_1.tabpage_2.dw_allowversion.RowCount()
- // ls_ch = String(tab_1.tabpage_2.dw_allowversion.Object.ch[i] )
- // ls_allowversion = Replace(ls_allowversion, i, 1, ls_ch)
- // NEXT
- //
- // ll_row = tab_1.tabpage_2.dw_column.GetRow()
- //
- // IF ll_row > 0 THEN
- // tab_1.tabpage_2.dw_column.Object.allowversion[ll_row] = ls_allowversion
- // END IF
- //
- //END IF
- RETURN
- end subroutine
- public subroutine wf_retrieve_dw_obj (long currentrow);String ls_dwname
- Int li_dwstyle
- String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
- String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
- String ls_mdfstr_text
- String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
- Int li_sys_development_ori
- IF currentrow > 0 THEN
- ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
- li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
-
- IF li_dwstyle = 1 THEN //Grid
- tab_1.tabpage_2.dw_2.Visible = True
- tab_1.tabpage_2.dw_3.Visible = False
- //tab_1.tabpage_2.dw_2
- ////////////////////////////////////////////
- li_sys_development_ori = sys_development
- sys_development = 0
- tab_1.tabpage_2.dw_2.SetRedraw(False)
- tab_1.tabpage_2.dw_2.DataObject = ls_dwname
- tab_1.tabpage_2.dw_2.cur_developtype = 1
-
- tab_1.tabpage_2.dw_2.TriggerEvent(Constructor!)
-
- tab_1.tabpage_2.dw_2.InsertRow(0)
- tab_1.tabpage_2.dw_2.SetRedraw(True)
- sys_development = li_sys_development_ori
- ////////////////////////////////////////// //
-
- ELSE //freefrom
- tab_1.tabpage_2.dw_2.Visible = False
- tab_1.tabpage_2.dw_3.Visible = True
- //tab_1.tabpage_2.dw_3
- ////////////////////////////////////////////
- li_sys_development_ori = sys_development
- sys_development = 0
- tab_1.tabpage_2.dw_3.SetRedraw(False)
- tab_1.tabpage_2.dw_3.DataObject = ls_dwname
- tab_1.tabpage_2.dw_3.cur_developtype = 1
-
-
- tab_1.tabpage_2.dw_3.TriggerEvent(Constructor!)
-
- tab_1.tabpage_2.dw_3.InsertRow(0)
- tab_1.tabpage_2.dw_3.SetRedraw(True)
- sys_development = li_sys_development_ori
- ////////////////////////////////////////// //
- END IF
-
- tab_1.tabpage_2.dw_column.SetRedraw(False)
- tab_1.tabpage_2.dw_column.Reset()
- //读obj
- IF li_dwstyle = 1 THEN //Grid
- f_get_obj2dw_super(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_2)
- ELSE
- f_get_obj2dw_super(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_3)
- END IF
- tab_1.tabpage_2.dw_column.SetSort("objx")
- tab_1.tabpage_2.dw_column.Sort()
- tab_1.tabpage_2.dw_column.SetRedraw(True)
- ELSE
- tab_1.tabpage_2.dw_column.Reset()
-
-
- tab_1.tabpage_2.dw_2.Visible = False
- tab_1.tabpage_2.dw_3.Visible = False
-
- tab_1.tabpage_2.dw_2.SetRedraw(False)
- tab_1.tabpage_2.dw_2.DataObject = ""
- tab_1.tabpage_2.dw_2.SetRedraw(True)
-
- tab_1.tabpage_2.dw_3.SetRedraw(False)
- tab_1.tabpage_2.dw_3.DataObject = ""
- tab_1.tabpage_2.dw_3.SetRedraw(True)
- END IF
- RETURN
- end subroutine
- public subroutine wf_save_dw_obj ();
- IF not dw_edit_mode THEN return
- String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
- String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
- String ls_mdfstr_text
- String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
- String ls_dwname, ls_AllowVersion,ls_dbname
- String ls_coltype, ls_dftvalue
- Integer ll_objvisible
- Long ll_width
- Long ll_alignment
- Long ll_x, ll_y,ll_titlex,ll_titley
- Long i, ll_row
- IF tab_1.tabpage_2.dw_column.RowCount() <= 0 THEN RETURN
- ll_row = tab_1.tabpage_2.dw_windw.GetRow()
- IF ll_row <= 0 THEN RETURN
- ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[ll_row]
- tab_1.tabpage_2.dw_column.AcceptText()
- FOR i = 1 To tab_1.tabpage_2.dw_column.RowCount()
-
- ls_object_col = tab_1.tabpage_2.dw_column.Object.objname[i]
- ll_objvisible = tab_1.tabpage_2.dw_column.Object.objvisible[i]
- ls_dftvalue = tab_1.tabpage_2.dw_column.Object.objdftvalue[i]
-
- ls_mdfstr_visible += ls_object_col+'.visible='+String(ll_objvisible)+'~t'
-
- ls_mdfstr_DftValue += ls_object_col+'.initial='+ls_dftvalue+'~t'
- NEXT
- ls_mdfstr_visible = ls_mdfstr_visible
- //sys_user_dwnSyntax
- UPDATE sys_user_dwnSyntax
- SET dwnSyntax_layout_column_visible = :ls_mdfstr_visible
- WHERE empid = -1
- And dwname = :ls_dwname;
-
- IF sqlca.SQLCode = 0 THEN
- IF sqlca.SQLNRows = 0 THEN
- INSERT INTO sys_user_dwnSyntax
- (empid, DwName, dwnSyntax_layout_column_visible)
- VALUES (-1,:ls_dwname,:ls_mdfstr_visible);
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK;
- ELSE
- COMMIT;
- END IF
- ELSE
- COMMIT;
- END IF
- ELSE
- ROLLBACK;
- END IF
- RETURN
- end subroutine
- public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
- // function: pf_treegrowth()
- //--------------------------------------------------------------------
- // description:
- //--------------------------------------------------------------------
- // arguments:
- // value long arg_handl
- // value long arg_funcid
- // value integer arg_lp
- //--------------------------------------------------------------------
- // returns: integer
- //--------------------------------------------------------------------
- // author: lhd date: 2013.06.16
- //--------------------------------------------------------------------
- // modify history:
- //
- //====================================================================
- Int rslt = 1
- s_sys_func ls_s_func[]
- Long count = 0,ls_i
- Long handl
- treeviewitem tvi
- IF IsNull(arg_funcid) THEN RETURN 0
- deep++
- IF deep > 100000 THEN //防止死递归
- RETURN 0
- END IF
- String ls_filter
- IF sys_if_network = 1 THEN
- ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
- ELSE
- ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
- END IF
- IF sys_version_type = 0 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
- ELSEIF sys_version_type = 1 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
- ELSEIF sys_version_type = 2 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
- END IF
- ls_filter += " and if_use <> 0 and functype <> 2 "
-
- sys_ds_maininfo.SetFilter(ls_filter)
- sys_ds_maininfo.Filter()
- FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
- IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
- (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
-
- count++
- ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
- ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
- ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
- ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
- ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
- ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
- ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
- ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
- ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
- ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
- NEXT
- FOR ls_i = 1 To count
- //
- IF is_sys_pwrstr_sys <> "" THEN
- IF Not Mid(is_sys_pwrstr_sys,ls_s_func[ls_i].funcid,1) = '1' THEN
- CONTINUE
- END IF
- END IF
- IF ls_s_func[ls_i].functype = 0 THEN
- arg_lp = 2
- ELSEIF ls_s_func[ls_i].functype = 8 THEN
- arg_lp = 3
- ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
- arg_lp = 10
- ELSEIF ls_s_func[ls_i].functype = 9 THEN
- arg_lp = 4
- END IF
-
-
- handl = tv_func.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
- // tv_func.ExpandItem(arg_handl)
- tv_func.GetItem(handl,tvi)
- tvi.StatePictureIndex = 2
- tvi.Data = ls_s_func[ls_i].funcid
- tv_func.SetItem(handl,tvi)
-
- pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
- NEXT
- RETURN rslt
- end function
- public subroutine wf_get_planstr (ref string arg_sys_pwrstr, ref string arg_sys_optionstr);String ls_sys_pwrstr,ls_sys_optionstr
- SELECT sys_pwrstr,sys_optionstr
- INTO :ls_sys_pwrstr,:ls_sys_optionstr
- FROM sys_DB_version;
- IF sqlca.SQLCode <> 0 THEN
- ls_sys_pwrstr = Fill('1',5000)
- ls_sys_optionstr = Fill('1',500)
- END IF
- IF ls_sys_pwrstr = '' THEN
- ls_sys_pwrstr = Fill('1',5000)
- END IF
- IF ls_sys_optionstr = '' THEN
- ls_sys_optionstr = Fill('1',5000)
- END IF
- arg_sys_pwrstr = ls_sys_pwrstr
- arg_sys_optionstr = ls_sys_optionstr
- end subroutine
- public subroutine wf_get_planstr_sys (ref string arg_sys_pwrstr);String ls_sys_pwrstr,ls_sys_optionstr
- SELECT sys_pwrstr_sys,sys_optionstr_sys
- INTO :ls_sys_pwrstr,:ls_sys_optionstr
- FROM sys_DB_version;
- IF sqlca.SQLCode <> 0 THEN
- ls_sys_pwrstr = ''
- ls_sys_optionstr = ''
- END IF
- arg_sys_pwrstr = ls_sys_pwrstr
- //arg_sys_optionstr = ls_sys_optionstr
- end subroutine
- on w_system_plan_super.create
- int iCurrent
- call super::create
- this.tab_1=create tab_1
- this.cb_edit=create cb_edit
- this.cb_save=create cb_save
- this.cb_in=create cb_in
- this.cb_out=create cb_out
- this.cb_select=create cb_select
- this.cb_3=create cb_3
- this.cb_retrieve=create cb_retrieve
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.tab_1
- this.Control[iCurrent+2]=this.cb_edit
- this.Control[iCurrent+3]=this.cb_save
- this.Control[iCurrent+4]=this.cb_in
- this.Control[iCurrent+5]=this.cb_out
- this.Control[iCurrent+6]=this.cb_select
- this.Control[iCurrent+7]=this.cb_3
- this.Control[iCurrent+8]=this.cb_retrieve
- this.Control[iCurrent+9]=this.ln_bar
- this.Control[iCurrent+10]=this.ln_bar2
- this.Control[iCurrent+11]=this.r_bar
- end on
- on w_system_plan_super.destroy
- call super::destroy
- destroy(this.tab_1)
- destroy(this.cb_edit)
- destroy(this.cb_save)
- destroy(this.cb_in)
- destroy(this.cb_out)
- destroy(this.cb_select)
- destroy(this.cb_3)
- destroy(this.cb_retrieve)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- end on
- event open;call super::open;//sys_development = 1
- tv_func = tab_1.tabpage_1.tv_1
- tv_2 = tab_1.tabpage_2.tv_2
- dw_sys_option = tab_1.tabpage_3.dw_1
- ds_func_tree = CREATE datastore
- ds_func_tree.DataObject = 'ds_sys_funcpwr'
- ds_func_tree.SetTransObject(sqlca)
- //ds_func_tree.Retrieve(-1)
- tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
- tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
- //SELECT sys_pwrstr_sys
- // INTO :is_sys_pwrstr_sys
- // FROM sys_DB_version;
- //IF sqlca.SQLCode <> 0 THEN
- // is_sys_pwrstr_sys = ""
- //END IF
- wf_get_planstr_sys(is_sys_pwrstr_sys)
- wf_build_functree()
- wf_build_functree2()
- ii_version_int = sys_version_int
- is_AllowVersion = fill("0", ii_version_int - 1 ) + "1"+fill("0", 20 - ii_version_int)
- wf_refresh_option()
- wf_retrieve_value()
- end event
- event resize;call super::resize;ln_bar.EndX = This.Width
- ln_bar2.EndX = This.Width
- r_bar.Width = This.Width
- tab_1.Width = This.Width - tab_1.X - 40
- tab_1.Height = This.Height - tab_1.Y - 150
- tab_1.tabpage_1.tv_1.Height = tab_1.tabpage_1.Height
- tab_1.tabpage_3.dw_1.Height = tab_1.tabpage_3.Height
- tab_1.tabpage_1.tv_1.Width = tab_1.tabpage_1.Width
- tab_1.tabpage_3.dw_1.Width = tab_1.tabpage_3.Width
- tab_1.tabpage_2.tv_2.Height = tab_1.tabpage_2.Height
- tab_1.tabpage_2.dw_windw.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
- tab_1.tabpage_2.dw_windw.Y = tab_1.tabpage_2.tv_2.Y
- tab_1.tabpage_2.dw_windw.Width = tab_1.tabpage_2.Width - tab_1.tabpage_2.dw_windw.X - 40
- tab_1.tabpage_2.dw_windw.Height = tab_1.tabpage_2.Height / 3
- tab_1.tabpage_2.dw_column.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
- tab_1.tabpage_2.dw_column.Y = tab_1.tabpage_2.dw_windw.Y + tab_1.tabpage_2.dw_windw.Height + 5
- tab_1.tabpage_2.dw_column.Width = tab_1.tabpage_2.dw_windw.Width
- //IF tab_1.tabpage_2.dw_2.Visible THEN
- // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - 400
- //
- // tab_1.tabpage_2.dw_2.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
- // tab_1.tabpage_2.dw_2.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
- // tab_1.tabpage_2.dw_2.Width = tab_1.tabpage_2.dw_windw.Width
- // tab_1.tabpage_2.dw_2.Height = 380
- //ELSE
- // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3
- //END IF
- long ll_dw_column_height = 600
- tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
-
- tab_1.tabpage_2.dw_2.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
- tab_1.tabpage_2.dw_2.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
- tab_1.tabpage_2.dw_2.Width = tab_1.tabpage_2.dw_windw.Width
- tab_1.tabpage_2.dw_2.Height = ll_dw_column_height - 10
-
- // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
- //
- tab_1.tabpage_2.dw_3.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
- tab_1.tabpage_2.dw_3.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
- tab_1.tabpage_2.dw_3.Width = tab_1.tabpage_2.dw_windw.Width
- tab_1.tabpage_2.dw_3.Height = ll_dw_column_height - 10
- end event
- event key;call super::key;IF KeyDown(KeyControl!) And KeyDown(KeyF9!) THEN
- //刷新权限树
- is_sys_pwrstr_sys = ""
-
- wf_build_functree()
- wf_build_functree2()
-
- wf_retrieve_value()
-
-
- END IF
- end event
- type cb_func from w_publ_base`cb_func within w_system_plan_super
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_system_plan_super
- integer x = 2034
- integer width = 165
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type tab_1 from tab within w_system_plan_super
- integer y = 184
- integer width = 3584
- integer height = 1984
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- boolean raggedright = true
- boolean focusonbuttondown = true
- integer selectedtab = 1
- tabpage_1 tabpage_1
- tabpage_3 tabpage_3
- tabpage_2 tabpage_2
- end type
- on tab_1.create
- this.tabpage_1=create tabpage_1
- this.tabpage_3=create tabpage_3
- this.tabpage_2=create tabpage_2
- this.Control[]={this.tabpage_1,&
- this.tabpage_3,&
- this.tabpage_2}
- end on
- on tab_1.destroy
- destroy(this.tabpage_1)
- destroy(this.tabpage_3)
- destroy(this.tabpage_2)
- end on
- type tabpage_1 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 3547
- integer height = 1872
- long backcolor = 134217739
- string text = "系统菜单"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- tv_1 tv_1
- end type
- on tabpage_1.create
- this.tv_1=create tv_1
- this.Control[]={this.tv_1}
- end on
- on tabpage_1.destroy
- destroy(this.tv_1)
- end on
- type tv_1 from treeview within tabpage_1
- event afterclicked ( long handle, boolean arg_changed )
- integer width = 3269
- integer height = 1976
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- boolean disabledragdrop = false
- boolean hideselection = false
- boolean tooltips = false
- boolean checkboxes = true
- boolean trackselect = true
- 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"}
- long picturemaskcolor = 536870912
- long statepicturemaskcolor = 536870912
- end type
- event afterclicked(long handle, boolean arg_changed);treeviewitem tvi
- long laststate
- laststate = wf_gethandlestate(handle)
- if laststate = 0 then return
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- IF arg_changed THEN // 状态更改
-
- IF NOT dw_edit_mode THEN
- tvi.StatePictureIndex = lastState
- THIS.SetItem(Handle, tvi)
- ELSE
- IF Handle > 0 THEN
- IF lastState = 2 THEN //孩子全部取消
- wf_set_tvchild(Handle)
- ELSEIF lastState = 1 THEN //父亲选定
- wf_set_tvparent(Handle)
- END IF
- END IF
- END IF
- wf_sethandlestate(handle, 0)
- END IF
- END IF
- end event
- event clicked;Int ls_state
- treeviewitem tvi
- Boolean lb_changed = FALSE
- IF GetCursor() = LoadCursor(0, 32649) THEN
- lb_changed = TRUE
- END IF
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- ls_state = tvi.StatePictureIndex
- IF wf_gethandlestate(Handle) = 0 THEN
- wf_sethandlestate(Handle, ls_state)
- END IF
- THIS.EVENT POST afterclicked(Handle, lb_changed)
- END IF
- end event
- event key;Int ls_state
- treeviewitem tvi
- Long Handle
- IF Key = keyspacebar! THEN
- Handle = tv_func.FindItem(CurrentTreeItem!, 0)
-
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- ls_state = tvi.StatePictureIndex
- IF wf_gethandlestate(Handle) = 0 THEN
- wf_sethandlestate(Handle, ls_state)
- END IF
- THIS.EVENT POST afterclicked(Handle, TRUE)
- END IF
- END IF
- end event
- type tabpage_3 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 3547
- integer height = 1872
- long backcolor = 134217739
- string text = "系统选项"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_1 dw_1
- end type
- on tabpage_3.create
- this.dw_1=create dw_1
- this.Control[]={this.dw_1}
- end on
- on tabpage_3.destroy
- destroy(this.dw_1)
- end on
- type dw_1 from u_dw_rbtnfilter within tabpage_3
- integer width = 3547
- integer height = 1984
- integer taborder = 20
- string dataobject = "dw_sys_option_systemplan"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- THIS.SetRow(currentrow)
- END IF
- end event
- event clicked;call super::clicked;IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
- THIS.SetRow(row)
- END IF
- end event
- type tabpage_2 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 3547
- integer height = 1872
- long backcolor = 134217739
- string text = "数据窗口"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_3 dw_3
- dw_2 dw_2
- dw_column dw_column
- dw_windw dw_windw
- tv_2 tv_2
- end type
- on tabpage_2.create
- this.dw_3=create dw_3
- this.dw_2=create dw_2
- this.dw_column=create dw_column
- this.dw_windw=create dw_windw
- this.tv_2=create tv_2
- this.Control[]={this.dw_3,&
- this.dw_2,&
- this.dw_column,&
- this.dw_windw,&
- this.tv_2}
- end on
- on tabpage_2.destroy
- destroy(this.dw_3)
- destroy(this.dw_2)
- destroy(this.dw_column)
- destroy(this.dw_windw)
- destroy(this.tv_2)
- end on
- type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
- integer x = 2290
- integer y = 1112
- integer taborder = 30
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean cur_usekey = true
- boolean cur_autosave_wh = false
- end type
- type dw_2 from u_dw_rbtnfilter within tabpage_2
- integer x = 1097
- integer y = 1020
- integer taborder = 20
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- end type
- event ue_setlayout;call super::ue_setlayout;wf_retrieve_dw_obj(dw_windw.getrow())
- end event
- type dw_column from u_dw_rbtnfilter within tabpage_2
- integer x = 1175
- integer y = 628
- integer width = 1157
- integer taborder = 20
- string dataobject = "dw_system_plan_dw_obj"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
-
- this.setrow(currentrow)
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
-
-
- END IF
- //wf_retrieve_allowversion(currentrow)
- end event
- event clicked;call super::clicked;IF dw_edit_mode THEN
- IF row > 0 THEN
- This.SetRow(row)
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- END IF
-
- // wf_retrieve_allowversion(row)
- END IF
- end event
- type dw_windw from u_dw_rbtnfilter within tabpage_2
- integer x = 1019
- integer y = 4
- integer width = 1888
- integer height = 508
- integer taborder = 20
- string dataobject = "dw_sys_win_dw_systemplan"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;//IF dw_edit_mode THEN
- // wf_check_modify(0,1)
- //END IF
- IF currentrow > 0 THEN
-
- This.SetRow(currentrow)
- This.SelectRow(0,False)
- This.SelectRow(currentrow,True)
-
- END IF
- wf_retrieve_dw_obj(currentrow)
- //wf_retrieve_col(currentrow)
- end event
- event clicked;call super::clicked;IF dw_edit_mode THEN
-
- wf_check_modify(0,1)
-
- IF row > 0 THEN
- This.SetRow(row)
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- END IF
-
- // wf_retrieve_col(row)
- wf_retrieve_dw_obj(row)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
- String ls_dwobject, ls_winname
- Int li_dwstyle
- string ls_mod_arr[]
- string arg_msg
- long uc_width, uc_height
-
- f_set_nomod(ls_dwobject, ls_mod_arr, arg_msg)
-
- ls_dwobject = This.Object.dwname[row]
- li_dwstyle = This.Object.dwstyle[row]
- ls_winname = This.Object.winname[row]
-
- //读出UC高度与宽度
- uc_width = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "width",'0'))
- uc_height = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "height",'0'))
-
- s_dw_uc_modify s_modify
-
- IF li_dwstyle = 0 THEN //freeform
- //ue_modify()调用修改UC布局窗口
-
-
- s_modify.datawinname_uc = ls_dwobject
- s_modify.nomod = ls_mod_arr
- s_modify.uc_column_int = 20 //uc_column_int
- s_modify.uc_width = uc_width
- s_modify.uc_height = uc_height
- s_modify.win = ls_winname
- s_modify.mainid = il_dw_mainid
-
- OpenWithParm(w_sysplan_dw_freeform_edit,s_modify)
-
- ELSE
-
- s_modify.datawinname_uc = ls_dwobject
- s_modify.nomod = ls_mod_arr
- s_modify.uc_column_int = 20 //uc_column_int
- s_modify.uc_width = uc_width
- s_modify.uc_height = uc_height
- s_modify.win = ls_winname
- s_modify.mainid = il_dw_mainid
-
- OpenWithParm(w_sysplan_dw_edit,s_modify)
-
-
-
- END IF
- END IF
- end event
- type tv_2 from treeview within tabpage_2
- event afterclicked ( long handle, boolean arg_changed )
- integer width = 1015
- integer height = 1976
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- boolean disabledragdrop = false
- boolean hideselection = false
- boolean tooltips = false
- boolean trackselect = true
- 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"}
- long picturemaskcolor = 536870912
- long statepicturemaskcolor = 536870912
- end type
- event clicked;Long ll_funcid
- Long ll_mainid
- Long ll_row
- String ls_winname
- treeviewitem tvi
- IF this.GetItem(Handle,tvi) = 1 THEN
- ll_funcid = Long(tvi.Data)
- ll_row = ds_func_tree.Find("funcid = "+String(ll_funcid), 1, ds_func_tree.RowCount())
-
- IF ll_row > 0 THEN
- ll_mainid = ds_func_tree.Object.mainid[ll_row]
- IF ll_mainid > 0 THEN
- il_dw_mainid = ll_mainid
- ls_winname = s_sys_win_open[ll_mainid].Name
- wf_check_modify(1,1)
- dw_windw.Retrieve(ls_winname)
- END IF
- END IF
- END IF
- end event
- event itempopulate;
- treeviewitem tvi
- Long ll_funcid
- IF Handle > 0 THEN
- This.GetItem(Handle,tvi)
-
- ll_funcid = Long(tvi.Data)
-
- pf_treegrowth2(Handle,ll_funcid,1) //下级生成树
- END IF
- end event
- type cb_edit from uo_imflatbutton within w_system_plan_super
- integer x = 187
- integer width = 187
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "修改"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT sys_power_issuper THEN
- MessageBox("系统提示","非管理员不可以操作")
- RETURN
- END IF
- IF dw_edit_mode THEN
- IF MessageBox ("IF","是否确定要放弃保存当前内容?",Question!,YesNo! ) = 2 THEN RETURN
- wf_retrieve_value()
- END IF
- dw_edit_mode = NOT dw_edit_mode
- wf_face()
- end event
- type cb_save from uo_imflatbutton within w_system_plan_super
- integer x = 375
- integer width = 178
- integer height = 164
- integer taborder = 10
- boolean bringtotop = true
- boolean enabled = false
- string text = "保存"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT sys_power_issuper THEN
- MessageBox("系统提示","非管理员不可以操作")
- RETURN
- END IF
- String ls_pwrstr,ls_optionstr
- ls_pwrstr = wf_getright()
- ls_optionstr = wf_getoption()
- UPDATE sys_DB_version
- SET sys_pwrstr = :ls_pwrstr,
- sys_optionstr = :ls_optionstr;
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK;
- MessageBox('Error','更新系统解决方案失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
- ROLLBACK;
- MessageBox('Error','更新数据窗口内容失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- wf_save_dw_obj()
- COMMIT;
- dw_edit_mode = NOT dw_edit_mode
- wf_face()
- MessageBox('系统提示','保存成功!请重启系统使方案生效')
- end event
- type cb_in from uo_imflatbutton within w_system_plan_super
- integer x = 718
- integer width = 439
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "导入管理员方案"
- string normalpicname = "mx1.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- Open(w_sysplan_import)
- wf_get_planstr_sys(is_sys_pwrstr_sys)
- //SELECT sys_pwrstr_sys
- // INTO :is_sys_pwrstr_sys
- // FROM sys_DB_version;
- //IF sqlca.SQLCode <> 0 THEN
- // is_sys_pwrstr_sys = ""
- //END IF
- //String ls_sys_pwrstr,ls_sys_optionstr
- //wf_get_planstr(ls_sys_pwrstr, ls_sys_optionstr)
- wf_build_functree()
- wf_build_functree2()
- wf_retrieve_value()
- end event
- type cb_out from uo_imflatbutton within w_system_plan_super
- integer x = 1157
- integer width = 439
- integer height = 164
- integer taborder = 20
- boolean bringtotop = true
- string text = "导出管理员方案"
- string normalpicname = "mx2.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Open(w_sysplan_export)
- end event
- type cb_select from uo_imflatbutton within w_system_plan_super
- integer x = 553
- integer width = 165
- integer height = 164
- integer taborder = 20
- boolean bringtotop = true
- boolean enabled = false
- string text = "全选"
- string normalpicname = "ok.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT dw_edit_mode THEN RETURN
- Long ll_handl
- String ls_sys_pwrstr,ls_sys_optionstr
- ls_sys_pwrstr = Fill('1',5000)
- ls_sys_optionstr = Fill('1',1000)
- IF tab_1.SelectedTab = 1 THEN
- IF MessageBox('询问','是否确定要全选系统菜单?',question!,yesno!) = 2 THEN RETURN
-
-
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
-
- ELSEIF tab_1.SelectedTab = 2 THEN
- IF MessageBox('询问','是否确定要全选系统选项?',question!,yesno!) = 2 THEN RETURN
- wf_setvalue_option(ls_sys_optionstr)
- END IF
- end event
- type cb_3 from uo_imflatbutton within w_system_plan_super
- integer x = 1595
- integer width = 439
- integer height = 164
- integer taborder = 20
- boolean bringtotop = true
- string text = "导入解决方案"
- string normalpicname = "mx1.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- Openwithparm(w_system_plan_import, is_AllowVersion)
- //wf_retrieve_value()
- SELECT sys_pwrstr_sys
- INTO :is_sys_pwrstr_sys
- FROM sys_DB_version;
- IF sqlca.SQLCode <> 0 THEN
- is_sys_pwrstr_sys = ""
- END IF
- wf_build_functree()
- wf_build_functree2()
- wf_retrieve_value()
- end event
- type cb_retrieve from uo_imflatbutton within w_system_plan_super
- integer width = 187
- integer height = 164
- integer taborder = 10
- boolean bringtotop = true
- string text = "刷新"
- string normalpicname = "refresh.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- wf_refresh_option()
- wf_retrieve_value()
- end event
- type ln_bar from line within w_system_plan_super
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 172
- integer endx = 2007
- integer endy = 172
- end type
- type ln_bar2 from line within w_system_plan_super
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 176
- integer endx = 2039
- integer endy = 176
- end type
- type r_bar from rectangle within w_system_plan_super
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 2811
- integer width = 146
- integer height = 68
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar.beginy - 5
- end event
|