📄 applyamendaction.java
字号:
package com.caigou.action;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.bean.DAO.FundapplyDAO;
import com.bean.DAO.RefundDAO;
import com.bean.DTO.FundapplyDTO;
import com.bean.DTO.RefundDTO;
import com.database.DataSourceFactory;
import com.servlet.AbstractAction;
public class ApplyamendAction extends AbstractAction {
private String forward="";
public String process(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
FundapplyDTO dto = new FundapplyDTO();
String fund = request.getParameter("fund");
String applyID = request.getParameter("applyID");
String reason = request.getParameter("reason");
String applytime = request.getParameter("applytime");
String page = request.getParameter("curpage");
int curpage = Integer.parseInt(page);
dto.setApplyID(Integer.parseInt(applyID));
dto.setFund(Float.parseFloat(fund));
dto.setReason(reason);
dto.setApplytime(applytime);
try {
Connection con = DataSourceFactory.getDataSource().getConnection();
FundapplyDAO dao = new FundapplyDAO(con);
dao.update2(dto);
forward = "applyedit.do?curpage=<%=curpage%>";
con.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return forward;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -