?? commparamgr.java
字號:
CommParaMgr[] Optinfo = this.GetList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getParam_code()+" >" +
"["+Optinfo[i].getParam_code()+"]->" +
""+Optinfo[i].getPara_code1()+"</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-29 11:14:06
* @Method Name: GetDepartListArray
*/
public ArrayList GetDepartListArray(String X_Tag)
{
ResultSet rst =null;
String sql = "";
ArrayList ParaList = new ArrayList();
if (X_Tag.equalsIgnoreCase("SEL_BY_ALL"))
{
sql = "select * from departinfo order by order_no asc";
}
DBQuery.setStrQuery(sql);
rst = DBQuery.SelBizQuery();
try
{
while (rst.next())
{
DepartMgr ParaData=new DepartMgr();
ParaData.setDepart_id(commen.convetStrToWeb(rst.getString("depart_id")));
ParaData.setDepart_name(commen.convetStrToWeb(rst.getString("depart_name")));
ParaData.setDepart_kind_code(commen.convetStrToWeb(rst.getString("depart_kind_code")));
ParaData.setParent_depart_id(commen.convetStrToWeb(rst.getString("parent_depart_id")));
ParaData.setOrder_no(rst.getInt("order_no"));
ParaData.setDepart_level(rst.getInt("depart_level"));
ParaData.setRemark(commen.convetStrToWeb(rst.getString("remark")));
ParaData.setRsvalue1(commen.convetStrToWeb(rst.getString("rsvalue1")));
ParaData.setRsvalue2(commen.convetStrToWeb(rst.getString("rsvalue2")));
ParaData.setRsvalue3(commen.convetStrToWeb(rst.getString("rsvalue3")));
ParaData.setRsvalue4(commen.convetStrToWeb(rst.getString("rsvalue4")));
ParaData.setUpdate_time(commen.convetStrToWeb(rst.getString("update_time")));
ParaData.setUpdate_staff_id(commen.convetStrToWeb(rst.getString("update_staff_id")));
ParaData.setUpdate_depart_id(commen.convetStrToWeb(rst.getString("update_depart_id")));
ParaList.add(ParaData);
}
}
catch (SQLException e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
catch (Exception e)
{
System.out.println("ERROR:"+e.getMessage());
}
return ParaList;
}
/**
*
* @author: Wangrc
* @Date: 2006-6-9 14:33:58
* @Method Name:GetList
*/
public DepartMgr[] GetDepartList (ArrayList ParaItem)
{
DepartMgr[] ItemList=new DepartMgr[ParaItem.size()];
for(int i=0;i<ParaItem.size();i++)
{
DepartMgr Item=(DepartMgr)ParaItem.get(i);
ItemList[i]=Item;
}
return ItemList;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-25 15:43:10
* @Method Name: GenDepartOption
*/
public String GenDepartOption(String strParaAttr)
{
String strResulut = "";
ArrayList OptArry = this.GetDepartListArray("SEL_BY_ALL");
DepartMgr[] Optinfo = this.GetDepartList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getDepart_id()+" >" +
"["+Optinfo[i].getDepart_id()+"]->" +
""+Optinfo[i].getDepart_name()+"</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-25 15:43:10
* @Method Name: GenMenuOption
*/
public String GenMenuOption(String strParaAttr)
{
String strResulut = "";
MenuinfoMgr menu = new MenuinfoMgr();
menu.setMenu_class(strParaAttr);
ArrayList OptArry = menu.GetMenuList("SEL_BY_CLASS");
MenuinfoMgr[] Optinfo = menu.GetList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getMenu_id()+" >" +
"["+Optinfo[i].getMenu_id()+"]->" +
""+Optinfo[i].getMenu_name()+"</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-25 15:43:10
* @Method Name: GenModuleOption
*/
public String GenModuleOption()
{
String strResulut = "";
ModuleMgr module = new ModuleMgr();
ArrayList OptArry = module.GetModuleList("SEL_BY_ALL");
ModuleMgr[] Optinfo = module.GetList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getModule_id()+" >" +
"["+Optinfo[i].getModule_id()+"]->" +
""+Optinfo[i].getModule_name()+"["+Optinfo[i].getModule_file()+"]</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-25 15:43:10
* @Method Name: GenRightOption
*/
public String GenRightOption(String strParaAttr)
{
String strResulut = "";
MenuinfoMgr menu = new MenuinfoMgr();
menu.setRsrv_str0(strParaAttr);
ArrayList OptArry = menu.GetMenuList("SEL_BY_RIGHT");
MenuinfoMgr[] Optinfo = menu.GetList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getMenu_id()+" >" +
"["+commen.ConvertCodeToName("menuname",Optinfo[i].getUp_menu_id())+"]->" +
""+Optinfo[i].getMenu_name()+"</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
/**
*
* @author: Wangrc
* @Date: 2006-7-25 15:43:10
* @Method Name: GenStaffOption
*/
public String GenStaffOption(String strParaAttr)
{
String strResulut = "";
StaffMgr staff = new StaffMgr();
ArrayList OptArry = staff.GetUserList("SEL_BY_ALL");
StaffMgr[] Optinfo = staff.GetList(OptArry);
for (int i=0;i<Optinfo.length;i++)
{
strResulut = strResulut + "<option value="+Optinfo[i].getStaff_id()+" >" +
"["+commen.ConvertCodeToName("staffname",Optinfo[i].getStaff_id())+"]->" +
""+Optinfo[i].getStaff_name()+"</option> ";
}
/**
try
{
strResulut =new String(strResulut.getBytes("GB2312"),"ISO8859_1");
}
catch (Exception e)
{
System.out.println("SQLERROR:"+e.getMessage());
}
**/
return strResulut;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -