modifypaymentaction.java

来自「完整的合同管理信息系统」· Java 代码 · 共 58 行

JAVA
58
字号
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 + =
减小字号Ctrl + -
显示快捷键?