⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modifygatheringaction.java

📁 完整的合同管理信息系统
💻 JAVA
字号:
package com.ICT.AFC.contractmoney.gathering;

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 modifyGatheringAction
    extends Action {
  public ActionForward execute(ActionMapping actionMapping,
                               ActionForm actionForm,
                               HttpServletRequest httpServletRequest,
                               HttpServletResponse httpServletResponse) {
    String PageForward = "modifyGathering";
    /**@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 + -