$PBExportHeader$w_system_plan_development.srw forward global type w_system_plan_development from w_publ_base end type type tab_1 from tab within w_system_plan_development 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_development tabpage_1 tabpage_1 tabpage_3 tabpage_3 tabpage_2 tabpage_2 end type type cb_edit from uo_imflatbutton within w_system_plan_development end type type cb_save from uo_imflatbutton within w_system_plan_development end type type cb_select from uo_imflatbutton within w_system_plan_development end type type st_1 from statictext within w_system_plan_development end type type ddlb_version from dropdownlistbox within w_system_plan_development end type type cb_1 from uo_imflatbutton within w_system_plan_development end type type cb_out from uo_imflatbutton within w_system_plan_development end type type cb_in from uo_imflatbutton within w_system_plan_development end type type cb_retrieve from uo_imflatbutton within w_system_plan_development end type type ln_bar from line within w_system_plan_development end type type ln_bar2 from line within w_system_plan_development end type type r_bar from rectangle within w_system_plan_development end type type ln_1 from line within w_system_plan_development end type type ln_2 from line within w_system_plan_development end type end forward global type w_system_plan_development 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_select cb_select st_1 st_1 ddlb_version ddlb_version cb_1 cb_1 cb_out cb_out cb_in cb_in cb_retrieve cb_retrieve ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar ln_1 ln_1 ln_2 ln_2 end type global w_system_plan_development w_system_plan_development 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 end variables forward prototypes public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp) 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_tvnext (long arg_handl, string arg_rightstr) 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_tvnext (long arg_handl, ref string arg_rightstr) 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_set_version () 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 () end prototypes 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) 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 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 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.ExpandItem(hand) tv_func.ExpandAll(hand) tv_func.SelectItem(hand) sys_ds_maininfo.SetFilter("") sys_ds_maininfo.Filter() 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_tvnext (long arg_handl, string arg_rightstr);Long ll_handl Long ll_funcid treeviewitem tvi ll_handl = arg_handl ll_handl = tv_func.FindItem(NextTreeItem!,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_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_tvnext(ll_handl,arg_rightstr) ll_handl = tv_func.FindItem(ChildTreeItem!,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 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_tvnext (long arg_handl, ref string arg_rightstr);Long ll_handl Long ll_funcid treeviewitem tvi ll_handl = arg_handl ll_handl = tv_func.FindItem(NextTreeItem!,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 tv_func.SetItem(ll_handl,tvi) wf_getright_tvchild(ll_handl,arg_rightstr) ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl) LOOP 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_tvnext(ll_handl,arg_rightstr) ll_handl = tv_func.FindItem(ChildTreeItem!,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) sys_ds_maininfo.SetFilter("") sys_ds_maininfo.Filter() 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 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_set_version ();String ls_version_arr[] ls_version_arr[1] = "商业版" ls_version_arr[2] = "工业版" ls_version_arr[3] = "工业版+" Long i, ll_row ddlb_version.Reset() FOR i = 1 To UpperBound(ls_version_arr) ddlb_version.InsertItem(ls_version_arr[i],i) NEXT //ddlb_version.SelectItem(ls_version_arr[1],0) //首次进入,锁定当前系统的版本 string ls_dft_version if sys_version = 802001 then ls_dft_version = "商业版" ddlb_version.SelectItem(ls_version_arr[1],0) elseif sys_version = 802002 then ls_dft_version = "工业版" ddlb_version.SelectItem(ls_version_arr[2],0) elseif sys_version = 802003 then ls_dft_version = "工业版+" ddlb_version.SelectItem(ls_version_arr[3],0) end if FOR i = 1 To UpperBound(sys_Version_arr) IF ddlb_version.Text = sys_Version_arr[i] THEN ii_version_int = i is_AllowVersion = Fill("0", i - 1) + "1" + Fill("0",20 - i) EXIT END IF NEXT 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 = 2 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 = 2 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_development(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_2) ELSE f_get_obj2dw_development(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 UPDATE sys_dwnSyntax_sys SET DwObjVisible = :ls_mdfstr_visible, DwObjDftValue = :ls_mdfstr_DftValue WHERE AllowVersion = :is_AllowVersion And dwname = :ls_dwname; IF sqlca.SQLCode = 0 THEN IF sqlca.SQLNRows = 0 THEN INSERT INTO sys_dwnSyntax_sys (AllowVersion, DwName, DwObjVisible, DwObjDftValue) VALUES (:ls_AllowVersion,:ls_dwname,:ls_mdfstr_visible, :ls_mdfstr_DftValue); IF sqlca.SQLCode <> 0 THEN ROLLBACK; ELSE COMMIT; END IF ELSE COMMIT; END IF ELSE ROLLBACK; END IF RETURN end subroutine on w_system_plan_development.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_select=create cb_select this.st_1=create st_1 this.ddlb_version=create ddlb_version this.cb_1=create cb_1 this.cb_out=create cb_out this.cb_in=create cb_in this.cb_retrieve=create cb_retrieve this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.ln_1=create ln_1 this.ln_2=create ln_2 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_select this.Control[iCurrent+5]=this.st_1 this.Control[iCurrent+6]=this.ddlb_version this.Control[iCurrent+7]=this.cb_1 this.Control[iCurrent+8]=this.cb_out this.Control[iCurrent+9]=this.cb_in this.Control[iCurrent+10]=this.cb_retrieve this.Control[iCurrent+11]=this.ln_bar this.Control[iCurrent+12]=this.ln_bar2 this.Control[iCurrent+13]=this.r_bar this.Control[iCurrent+14]=this.ln_1 this.Control[iCurrent+15]=this.ln_2 end on on w_system_plan_development.destroy call super::destroy destroy(this.tab_1) destroy(this.cb_edit) destroy(this.cb_save) destroy(this.cb_select) destroy(this.st_1) destroy(this.ddlb_version) destroy(this.cb_1) destroy(this.cb_out) destroy(this.cb_in) destroy(this.cb_retrieve) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) destroy(this.ln_1) destroy(this.ln_2) 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 tab_1.tabpage_2.dw_windw.SetTransObject(sqlca) tab_1.tabpage_2.dw_column.SetTransObject(sqlca) wf_set_version() wf_build_functree() wf_build_functree2() cb_retrieve.triggerevent(clicked!) //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 = 500 // 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 long ll_dw_column_height = 600 //long ll_row //integer li_dwstyle //ll_row = tab_1.tabpage_2.dw_windw.getrow() //if ll_row > 0 then // li_dwstyle = tab_1.tabpage_2.dw_windw.object.dwstyle[ll_row] //else // li_dwstyle = -1 //end if // //if li_dwstyle = 1 then // ll_dw_column_height = 300 //else // ll_dw_column_height = 900 //end if //IF tab_1.tabpage_2.dw_2.Visible THEN //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - ll_dw_column_height 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 //ELSEIF tab_1.tabpage_2.dw_3.Visible THEN //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - ll_dw_column_height 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 //ELSE // //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - 140 //END IF end event type cb_func from w_publ_base`cb_func within w_system_plan_development boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_system_plan_development integer x = 1925 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_development integer y = 296 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 = 20 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 boolean lb_reset = true IF this.GetItem(Handle,tvi) = 1 THEN ll_funcid = Long(tvi.Data) ll_row = sys_ds_maininfo.Find("funcid = "+String(ll_funcid), 1, sys_ds_maininfo.RowCount()) IF ll_row > 0 THEN ll_mainid = sys_ds_maininfo.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) if dw_windw.rowcount() > 1 then dw_windw.selectrow(0, false) dw_windw.setrow(1) dw_windw.selectrow(1, true) wf_retrieve_dw_obj(1) end if lb_reset = false END IF END IF if lb_reset then dw_windw.reset() wf_retrieve_dw_obj(0) // dw_column.reset() // dw_2.dataobject = '' 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_development 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 cb_retrieve.triggerevent(clicked!) END IF dw_edit_mode = NOT dw_edit_mode wf_face() end event type cb_save from uo_imflatbutton within w_system_plan_development 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() //IF tab_1.tabpage_2.dw_column.Update() = -1 THEN // ROLLBACK; // MessageBox('Error','更新数据窗口字段内容失败,'+sqlca.SQLErrText) // RETURN //END IF COMMIT; dw_edit_mode = NOT dw_edit_mode wf_face() wf_retrieve_dw_obj(tab_1.tabpage_2.dw_windw.getrow()) MessageBox('系统提示','保存成功!请重启系统使方案生效') end event type cb_select from uo_imflatbutton within w_system_plan_development 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) ELSEIF tab_1.SelectedTab = 3 THEN END IF end event type st_1 from statictext within w_system_plan_development integer x = 5 integer y = 204 integer width = 261 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "系统版本:" boolean focusrectangle = false end type type ddlb_version from dropdownlistbox within w_system_plan_development integer x = 274 integer y = 184 integer width = 480 integer height = 736 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type event selectionchanged; Long i FOR i = 1 To UpperBound(sys_Version_arr) IF This.Text = sys_Version_arr[i] THEN ii_version_int = i is_AllowVersion = Fill("0", i - 1) + "1" + Fill("0",20 - i) EXIT END IF NEXT end event type cb_1 from uo_imflatbutton within w_system_plan_development integer x = 1595 integer width = 329 integer height = 164 integer taborder = 20 boolean bringtotop = true string text = "管理员模式" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF dw_edit_mode THEN RETURN open(w_system_plan_super) end event type cb_out from uo_imflatbutton within w_system_plan_development 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; Openwithparm(w_system_plan_export, is_AllowVersion) //wf_retrieve_value() end event type cb_in from uo_imflatbutton within w_system_plan_development integer x = 1157 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) cb_retrieve.triggerevent(clicked!) end event type cb_retrieve from uo_imflatbutton within w_system_plan_development integer width = 187 integer height = 164 integer taborder = 30 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_development 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_development 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_development 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 type ln_1 from line within w_system_plan_development long linecolor = 268435456 integer linethickness = 4 integer beginy = 288 integer endx = 2007 integer endy = 288 end type type ln_2 from line within w_system_plan_development long linecolor = 16777215 integer linethickness = 4 integer beginy = 292 integer endx = 2039 integer endy = 292 end type