📄 documentkindtableaction.java
字号:
package com.stsc.archive.volumn;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import java.util.Properties;
import org.apache.struts.util.MessageResources;
import com.stsc.util.STPoolDataSet;
import com.stsc.util.STResultSet;
import com.stsc.archive.file.Constants;
public final class documentkindtableAction extends Action
{
public String Iso2Gb(String str)
{
String ret=(str==null) ? "" : str;
try
{
byte[] byteStr=str.getBytes("ISO-8859-1");
return new String(byteStr,"gb2312");
}
catch(Exception e)
{
return ret;
}
}
public ActionForward perform(ActionMapping mapping,ActionForm form,
HttpServletRequest req,HttpServletResponse res)
{
String[] enterName=req.getParameterValues("enterName");
Properties dbBase=new Properties();
dbBase.setProperty("dsJndiName", Constants.ARCHIVE_DBSOURCE_KEY);
STPoolDataSet data=new STPoolDataSet();
if(enterName!=null && enterName.length>0)
{
for(int i=0;i<enterName.length;i++)
{
String sql="DELETE * FROM fFileType WHERE TYPEID="+Integer.parseInt(enterName[i]);
data.executeSQL(sql,dbBase);
}
}
String sql1="SELECT * FROM fFileType";
FileKindList shore= new FileKindList();
STResultSet rs1=data.getSTResult(sql1,dbBase);
while(rs1!=null && rs1.next())
{
FileKind filename=new FileKind();
filename.setFiletype(rs1.getString("FileType"));
filename.setArchivetype(rs1.getString("ArchiveType"));
filename.setTypeid(rs1.getInt("typeid"));
//System.out.println("000000000000000000==="+rs1.getInt("typeid"));
shore.addFileName(filename);
}
HttpSession session=req.getSession();
session.setAttribute("myhashtable", shore);
//System.out.println("documentkindtableAction.java 123");
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -