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

📄 district1.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 4.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 d_id=new String();
String name=new String();
String address=new String();
String postcode=new String();
String tax=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 sale.district";
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>
<form action="delete_d.jsp" method=get name=form>
<table align="center" border="1" width="">	
<tr align="center">
<td width="80">片区编号</td>
<td width="80">地址</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 sale.district 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())
		{
		  d_id=rs.getString("id");
			name=rs.getString("name");
			address=rs.getString("address");
			postcode=rs.getString("postcode");
			tel=rs.getString("tel");
			tax=rs.getString("tax");
%>
				<tr>
				<td width="80" align="center"><%=d_id%></td>
				<td width="80" align="center"><%=address%></td>
				<td width="80" align="center"><%=postcode%></td>
				<td width="80" align="center"><%=name%></td>		
				<td width="80" align="center"><%=tel%></td>
				<td width="80" align="center"><%=tax%></td>
				<td width="40" align="center"><a href="update_d.jsp?d_id=<%=d_id%>"><font color="#000080">修改</font></a></td>
				<td width="30" align="center" bgcolor="#ffffff"><input type="checkbox" name="d_id" value="<%=d_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=\"district.jsp\">");
out.println("<center>&nbsp;&nbsp;分页&nbsp;");
if(intPage<2)
	out.println("首页 上一页");
else
{
	out.println("<a href=\"district.jsp?page=1\">首页</a>&nbsp;");
	out.println("<a href=\"district.jsp?page="+(intPage-1)+"\">上一页</a>&nbsp;");
}
if(intPage-intPageCount>=0)
	out.println("下一页 尾页");
else
	out.println("<a href=\"district.jsp?page="+(intPage+1)+"\">下一页</a>&nbsp;<a href=\"district.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>
<p align="center">
<form method="POST" action="search_d.jsp">
[片区查询]
<input type="text" name="key">
<input type="submit" value="查询">
</form>
<form method="POST" action="join_d.jsp">
<input type="submit" value="添加片区">
</form>

<form method="POST" action="district_r.jsp">
<input type="submit" value="收货统计">
</form>

<form method="POST" action="district_s.jsp">
<input type="submit" value="销售统计">
</form>

<form method="POST" action="district_f.jsp">
<input type="submit" value="退货统计">
</form>

<form method="POST" action="district_m.jsp">
<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 + -