日期:2014-05-20 浏览次数:20861 次
</head>
<body>
<center>
<div>
<form action="servlet/distribute_Updategs" method="post">
<% List<distribute_sordata> averdata =(List<distribute_sordata>)request.getAttribute("averdata");%>
<table id="table_1">
<tbody>
<tr><td style="padding-left:20px"><%out.println("操作工号");%></td>
<td style="padding-left:20px"><%out.println("号码");%> </td>
<td style="padding-left:20px"><%out.println("姓名");%> </td>
<td style="padding-left:20px"><%out.println("溢出费用");%> </td>
<%out.println("<br/>");%></tr>
<%for(int i=0;i<averdata.size();i++)
{%>
<tr>
<td style="padding-left:20px"><%out.println(averdata.get(i).getSelect_agent());%></td>
<td style="padding-left:20px"><%out.println(averdata.get(i).getNUMN());%></td>
<td style="padding-left:20px"><%out.println(averdata.get(i).getNAMEN());%></td>
<td style="padding-left:20px"><input type="text" size="5" name="YC_AMT" value="<%=averdata.get(i).getYC_AMT()%>" style="text-align:center;" /></td>
<td style="padding-left:20px"><input type="text" name="NOTENO" value="<%=averdata.get(i).getNOTENO() %>"/>
<td style="padding-left:20px"><input type="submit" value="修改"/
<input type="hidden" name="Select_agent" value="<%=averdata.get(i).getSelect_agent()%>" />
</tr>
<%
//out.println("<br/>");
//averdata.remove(averdata.get(i));
}
%>
</tbody>
</table>
</form>
</div>
</body>
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("utf-8");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
int Select_agent=Integer.parseInt(request.getParameter("Select_agent"));
// String agent_id=request.getParameter("agent_id");
String YC_AMT=request.getParameter("YC_AMT");
String NOTENO=request.getParameter("NOTENO");
// int LIUC_FLAG=Integer.parseInt(request.getParameter("LIUC_FLAG"));
distribute_dodata dodata=new distribute_dodata();
dodata.update(YC_AMT,NOTENO, Select_agent);
//System.out.println("执行成功");
List<distribute_sordata> listdata=dodata.averdata(Select_agent);
request.setAttribute("averdata", listdata);
request.getRequestDispatcher("../distribute_second.jsp").forward(request, response);
}