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

📄 customer.jsp

📁 饲料公司销售管理系统是基于建立完善的饲料公司销售方面管理控制模型的基础上
💻 JSP
字号:
<html>
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>销售管理信息系统</title>
</head>
<jsp:useBean id="db" scope="page" class="sale.dbBean" />
<body>
<p align="center"><font size="7" color="#000080">销售管理信息系统</font></p>
<hr>
<%
String id=new String();
id=(String)session.getAttribute("id");

if(id==null)
	{
		response.sendRedirect("index.htm");
	}
%>
<%
String c_id=new String();
String name=new String();
String address=new String();
String postcode=new String();
String tax=new String();
String d_id=new String();
String tel=new String();

String sql=new String();
ResultSet rs=null;

int pageLine=10;//每页显示记录数
int totalRec=0;//总客户记录数
int totalSub=0;
int intPage=1;//初使页
if(request.getParameter("page")!=null)
intPage=Integer.parseInt(request.getParameter("page"));


sql="select count(*) as cnt from customer";
rs=db.executeQuery(sql);
if(rs.next())
	totalRec=rs.getInt("cnt");
rs.close();
		
//取得客户总页数
int intPageCount=0;
intPageCount=(totalRec+pageLine-1)/pageLine;
%>
<p align="center"><font size="5" color="#000080">客户信息</font></p>
<p align="center">
<form method="POST" action="customer_s.jsp">
<input type="submit" value="销售统计" style="position: absolute; left:178; top:161">
&nbsp;</form>
<table align="center" border="1" width="">	
<tr align="center">
<td width="80">客户id</td>
<td width="80">片区编号</td>
<td width="60">姓名</td>
<td width="80">地址</td>
<td width="80">邮编</td>
<td width="80">电话</td>
<td width="80">传真</td>
<td width="40">修改</td>
<td width="30" bgcolor="#99A6BF"><input type="submit" value="删除" name=submit></td>
</tr>
<%
//从数据库取得客户信息
int i;
int serial;

sql="select * from customer order by id";
rs=db.executeQuery(sql);
if(intPageCount>0)
{
	for(i=1;i<=(intPage-1)*pageLine;i++)
		rs.next();
	for(i=1;i<=pageLine;i++)
	{
		if(rs.next())
		{
		  c_id=rs.getString(1);
		  name=rs.getString(2);
			d_id=rs.getString(3);
			address=rs.getString(4);
			postcode=rs.getString(5);
			tel=rs.getString(6);
			tax=rs.getString(7);
%>
				<tr>
				<td width="80" align="center"><%=c_id%></td>
				<td width="80" align="center"><%=d_id%></td>
				<td width="60" align="center"><%=name%></td>
				<td width="80" align="center"><%=address%></td>
				<td width="80" align="center"><%=postcode%></td>
				<td width="80" align="center"><%=tel%></td>
				<td width="80" align="center"><%=tax%></td>
				<td width="40" align="center"><a href="update_c.jsp?c_id=<%=c_id%>"><font color="#000080">修改</font></a></td>
				<td width="30" align="center" bgcolor="#ffffff"><input type="checkbox" name="c_id" value="<%=c_id%>"></td>
				</tr>
		<%
		}
	}
	rs.next();
}
rs.close();
db.close();		
%>
</form>
<%--分页显示贴子--%>
<%
out.print("<TR>");
if(intPageCount*pageLine<totalRec)
	intPageCount++;
if(intPage>intPageCount)
	intPage=intPageCount;
if(intPage<1)
	intPage=1;
out.println("<form method=\"post\" name=fPageNum action=\"customer.jsp\">");
out.println("<center>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分页&nbsp;");
if(intPage<2)
	out.println("首页 上一页");
else
{
	out.println("<a href=\"customer.jsp?page=1\">首页</a>&nbsp;");
	out.println("<a href=\"customer.jsp?page="+(intPage-1)+"\">上一页</a>&nbsp;");
}
if(intPage-intPageCount>=0)
	out.println("下一页 尾页");
else
	out.println("<a href=\"customer.jsp?page="+(intPage+1)+"\">下一页</a>&nbsp;<a href=\"customer.jsp?page="+intPageCount+"\">尾页</a>");
out.print("&nbsp;页次:<strong>"+intPage+"/"+intPageCount+"</strong>页");
out.print("&nbsp;共<b>"+totalRec+"</b>人<b>"+pageLine+"</b>人/页");
out.print("&nbsp;&nbsp;转到第<input type=\"text\" name=\"page\" size=\"2\" class=smallInput value=\""+intPage+"\">");
out.print("页<input class=bottonface type=\"submit\" value=\"GO\" name=\"cndok\" ></span></p></form>");
out.print("</td>");
out.print("</td>");

%>
</table>





<form method="POST" action="customer_m.jsp">
<input type="submit" value="回款统计" style="position: absolute; left:345; top:160">
</form>

<form method="POST" action="customer_f.jsp">
<input type="submit" value="退货统计" style="position: absolute; left: 532; top: 158">
</form>

<form method="POST" action="join_c.jsp">
<input type="submit" value="添加客户">
</form>



<form method="POST" action="search_c.jsp">
[客户查询]
<input type="text" name="key">
<input type="submit" value="查询">
</form>



<form method="POST" action="user.jsp">
<input type="submit" value="返回">
</form>

</body>













⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -