📄 billinfo.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*"%>
<%@page import="java.sql.*,java.lang.Double.*"%>
<%@include file="comm.jsp"%>
<html>
<body >
<div>
<table>
<tr>
<td width="236" align=center valign=top><br>
<p ><font color="#000080"><a href=SysuserInfo.jsp?action=mine>我的资料</a></font></p>
<p>帐单管理
<br> <a href="BillInfo.jsp?action=view&type=1">已汇款帐单</a>
<br> <a href="BillInfo.jsp?action=view&type=2">已确认帐单</a>
</p>
</td>
<%
String SysuserID=(String)session.getValue("sysuser");
String SysuserType=(String)session.getValue("sysuserType");
action=request.getParameter("action");
String Type=request.getParameter("type");
int iType=Integer.parseInt(Type);
if(SysuserID==null || SysuserType.compareTo("财务管理员")!=0)
{
%>
<jsp:forward page="SysuserLogin.htm"/>
<%
}
if(action.equals("update"))
{
String BillID=request.getParameter("BillID");
String CustomerID=request.getParameter("CustomerID");
String Amount=request.getParameter("Amount");
strSql="{call dbo.sp_UpdateBill(?,?)}";
cstmt=conn.prepareCall(strSql);
cstmt.setInt(1,Integer.parseInt(BillID));
cstmt.setString(2,SysuserID);
cstmt.executeUpdate();
strSql="{call dbo.sp_UpdateRemains(?,?,?,?)}";
cstmt=conn.prepareCall(strSql);
cstmt.registerOutParameter(4, java.sql.Types.INTEGER);
cstmt.setString(1,CustomerID);
cstmt.setDouble(2,Double.parseDouble(Amount));
cstmt.setInt(3,1);
cstmt.executeUpdate();
}
%>
<td align=center valign=top>
<p align=center>欢迎您:<%=SysuserID%></p>
<%
if(iType==1)
{
%>
<p align=left>已汇款帐单
<%
}
else if(iType==2)
{%>
<p align=left>已确认帐单
<%}
%>
<table>
<tr bgcolor=#E9E9D1>
<td width=70>帐单ID</td>
<td width=100>客户ID</td>
<td width=140>金额</td>
<td width=150>操作时间</td>
<td width=100>操作人</td>
<td width=70></td>
</tr>
<%
//根据类型值获取订单信息
strSql="{call dbo.sp_GetAllBill(?)}";
cstmt=conn.prepareCall(strSql);
cstmt.setInt(1,iType);
rs=cstmt.executeQuery();
while(rs.next())
{
%>
<tr bgcolor="#EAFfFff">
<td><%=rs.getInt(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getDouble(3)%></td>
<td><%=rs.getDate(6)%></td>
<td><%=rs.getString(7)%></td>
<%if(iType==1){%>
<td><a href="BillInfo.jsp?action=update&BillID=<%=rs.getInt(1)%>&CustomerID=<%=rs.getString(2)%>
&Amount=<%=rs.getDouble(3)%>&type=2">确认帐单</a></td>
<%}%>
</tr>
<tr>
<td>描述:</td>
<td><%=new String(rs.getString(5).getBytes("8859_1"),"gb2312")%></td>
</tr>
<%}%>
</table>
</td>
<%
rs.close();
cstmt.close();
conn.close();
%>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -