📄 modifypaymentaction.java
字号:
package com.ICT.AFC.contractmoney.payment;
import org.apache.struts.action.*;
import javax.servlet.ServletContext;
import javax.sql.*;
import com.ICT.AFC.DB.*;
import java.sql.ResultSet;
import javax.servlet.http.*;
public class modifyPaymentAction extends Action
{
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
{String PageForward="modifyPayment";
/**@todo: complete the business logic here, this is just a skeleton.*/
//throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");
String pid=httpServletRequest.getParameter("pid");
ServletContext context=servlet.getServletContext();
DataSource dataSource=(DataSource)context.getAttribute("contract");
DB db=new DB(dataSource);
String strSql="SELECT * FROM M_MONEY WHERE payid='"+pid+"'";
ResultSet rs=db.OpenSql(strSql);
try
{
for(;rs.next();)
{//Vector ls=new Vector();
httpServletRequest.setAttribute("CONTRACTID","");
httpServletRequest.setAttribute("PAYDATE",rs.getString("PAYDATE"));
if(rs.getString("UPLOADPATH")==null)
httpServletRequest.setAttribute("UPLOADPATH", "nullnull");
else
httpServletRequest.setAttribute("UPLOADPATH",rs.getString("UPLOADPATH"));
httpServletRequest.setAttribute("PAYID",rs.getString("PAYID"));
httpServletRequest.setAttribute("MONEY",rs.getString("MONEY"));
httpServletRequest.setAttribute("RECORDTIME",rs.getString("RECORDTIME"));
if (rs.getString("REMARK") == null) {
httpServletRequest.setAttribute("REMARK", "");
}
else {
httpServletRequest.setAttribute("REMARK", rs.getString("REMARK"));
}
httpServletRequest.setAttribute("WRITER",rs.getString("WRITER"));
}
rs.close();
}
catch(Exception e){}
finally{}
return(actionMapping.findForward(PageForward));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -