?? genmenulist.java
字號:
/*
* Created on 2006-9-5
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package com.ahbay.RightMgr;
import org.apache.struts.action.Action;
import com.ahbay.commenMgr.*;
import java.sql.*;
import java.util.*;
import com.ahbay.RightMgr.*;
/**
* @author: Wangrc
* @Date: 2006-9-5 18:20:44
* @Method Name:
*/
public class genMenuList extends Action
{
public String genStaffMenuList(String StaffId)
{
String resultMenu = "";
MenuinfoMgr menuInfo_1 = new MenuinfoMgr();
MenuinfoMgr menuInfo_2 = new MenuinfoMgr();
ModuleMgr module = new ModuleMgr();
menuInfo_1.setRsrv_str0(StaffId);
ArrayList menuArray = menuInfo_1.GetMenuList("SEL_BY_STAFF_RIGHT_1");
MenuinfoMgr[] menu = menuInfo_1.GetList(menuArray);
for (int i=0;i<menu.length;i++)
{
String menuId = menu[i].getMenu_id();
String menuName = menu[i].getMenu_name();
String tableId = String.valueOf(i);
resultMenu = resultMenu +
"<TR>" +
"<TD class=buttoncolor onclick=javascript:menu_display(table"+tableId+"); style=cursor:hand>" +
"<font color=ffffff>"+menuName+"</font>" +
"</TD>" +
"</TR>" +
"<TBODY id=table"+tableId+" style=display:none;>" +
"<TR>" +
"<TD align=center class=norightbuttonborder>" +
"<table border=0 cellspacing=1 cellpadding=5 width=100%>";
menuInfo_2.setRsrv_str0(StaffId);
menuInfo_2.setUp_menu_id(menuId);
ArrayList menu2Array = menuInfo_2.GetMenuList("SEL_BY_STAFF_RIGHT_UP");
MenuinfoMgr[] menu2 = menuInfo_2.GetList(menu2Array);
for (int j=0;j<menu2.length;j++)
{
String menu2Id = menu2[j].getMenu_id();
String menu2Name = menu2[j].getMenu_name();
String moduleId = menu2[j].getModule_id();
String inRsrv = "";
if (!menu2[j].getIn_param_code1().equalsIgnoreCase(""))
{
inRsrv = inRsrv + "?"+menu2[j].getIn_param_code1()+"="+menu2[j].getIn_param_value1();
}
if (!menu2[j].getIn_param_code2().equalsIgnoreCase(""))
{
inRsrv = inRsrv + "&"+menu2[j].getIn_param_code2()+"="+menu2[j].getIn_param_value2();
}
if (!menu2[j].getIn_param_code3().equalsIgnoreCase(""))
{
inRsrv = inRsrv + "&"+menu2[j].getIn_param_code3()+"="+menu2[j].getIn_param_value3();
}
module.setModule_id(moduleId);
module = module.GetModuleInfo("SEL_BY_ID");
resultMenu = resultMenu +
"<tr>" +
"<td class=grayD onMouseover=this.className='grayE'; onMouseout=this.className='grayD' align=left>" +
"<img src=img/aer1.gif> " +
" <a href="+module.getModule_dir()+"/"+module.getModule_file()+inRsrv+" target=right>"+menu2Name+"</a>" +
"</td>" +
"</tr>";
}
resultMenu = resultMenu + "</table></TD></TR></TBODY>";
}
return resultMenu;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -