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

📄 order_manage.asp

📁 Sellandsavingmanagementsystem是一个进销存管理系统,是用ASP编写的.集销售,管理与一体.可以对仓库情况进行查询管理.
💻 ASP
字号:
<!-- #include file="admin_protect.inc" -->
<!-- #include file="../opendb.inc" -->

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta Name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta Name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; chaRset=gb2312">
<title>顾客管理页面</title>
</head>

<body>

<script language="JavaScript">
<!--
function swapform()
{
	document.form.submit();
}
//-->
</script>

<script language="JavaScript">
<!--//
function check()
{
   if (isnan(go2to.page.value))
		alert("请正确填写转到页数!");
   else if (go2to.page.value=="") 
	     {
		alert("请输入转到页数!");
		 }
   else
		go2to.submit();
}
//-->
</script>
 
<%   
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open(sqlOpenDB)	 	'打开数据库
	 
Choise=0
If Request.Form.Count>0 Then Choise=Request.Form("Select")
%>

<%

	 Sql="Select OrderID,OrderDate,CustomerName From OrderFromCustomer Where  Done = '" &Choise& "' Order By OrderDate Desc"	
	 Set Rs=Server.CreateObject("ADODB.RecordSet")

	 Rs.Open Sql,Conn,1,3   
	 %>
 
 <form Name="form" method="POST" action="order_manage.asp" >
          <select Name="select" onChange="swapform()">
            <option value="0"<%If choise=0 Then%>selected<%End If%> selected>尚未处理的订单</option>
            <option value="1"<%If choise=1 Then%>selected<%End If%>>已经发货的订单</option>
          </select>
        </form>
     <% 
	 If Rs.Eof Then
		Response.Write "<p><Center><B>没有此类订单。</B></Center></p>"	
		
		Response.End
	 End If

%>

 <%
	 Rs.PageSize=10
     If Not IsEmpty(Request("Page")) Then   
     PageCount=Cint(Request("Page"))   
     Else   
     PageCount=1   
     End If
     
    
     If PageCount>Rs.PageCount Or PageCount<=0 Then              
     PageCount=1              
     End If              
     Rs.AbsolutePage=PageCount 
     %> 
     
 
   <table border="0" cellpadding="0" cellspacing="0" width="902" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" class=ver>
      
        <tr>
		    <% If Rs.pagecount=1 Then %>
      <td height="25" colspan="4"  class="ver" width="902"> <font class=ver>共有[<font color="#ff0000"><%=Rs.recordcount%></font>]用户帐号 
        以下是[<font color="red">1~<%=Rs.recordcount%></font>]个 </a></font></td>             
        </tr>
        
        <tr>
         

<td height="7" colspan="4" width="902" ></td>
        </tr><%else%>
		<tr>
		    
      <td height="25" colspan="4" width="902" ><font class=ver> <% 
            Page_Start=(PageCount-1)*Rs.PageSize
            If PageCount=1 Then Page_Start=1
		    Page_End=Rs.PageSize*PageCount
		    If PageCount*Rs.PageSize=>Rs.Recordcount Then Page_End=Rs.Recordcount End If%> 
        共有[<font color="#ff0000"><%=Rs.recordcount%></font>]用户帐号 以下是[<font color="red"><%=page_start%>~<%=page_end%></font>]</font></a></td>  

        </tr>
        <tr>
		    
      <td height="25" colspan="4" width="902" > <% Response.Write"<Form Name=Go2To Form Method=Post Action='customer_Manage.Asp?Key="+Key+"'>"
		     Response.Write "<Font Color=Ffffff>◆&nbsp;</font>"                                              
		     If PageCount=1 Then                                                        
			 Response.Write "<Font Class=Ver>首页 上一页</font>&nbsp;"
			 Else                                                        
             Response.Write "<A Href=Customer_Manage.Asp?Page=1&Key="+Key+"><Font Class=Ver>首页</font></a>&nbsp;" 
	         Response.Write "<A Href=Customer_Manage.Asp?Page="+Cstr(PageCount-1)+"&Key="+Key+"><Font Color='0000Be'>??????</Font></A>&nbsp;"
			 End If                                             
             If Rs.PageCount-PageCount<1 Then                                                        
             Response.Write "<Font Class=Ver>下一页 末页</font>"                                                    
			 Else                                                        
             Response.Write "<A Href=Customer_Manage.Asp?Page="+Cstr(PageCount+1)+"&Key="+Key+"><Font Class=Ver>下一页</Font></A>&nbsp;"
			 Response.Write "<A Href=Customer_Manage.Asp?Page="+Cstr(Rs.PageCount)+"&Key="+Key+"><Font Class=Ver>末页</Font></A>"           
             End If 
			 Response.Write "<Font Class=Ver>&nbsp;页次:<font class=ver>"&pagecount&"</font>/"&Rs.pagecount&"页</font>" 
			Response.Write "<Font Class=Ver> 转到第<input type='text' Name='page' size=2 maxLength=3 style='font-size: 9pt; color:#00006A; position: relative; height: 18' value="&PageCount&">页</font>&nbsp;&nbsp;&nbsp;&nbsp;"                               
			Response.Write "<Input Class=ButtOn1 Type='button' Value='确 定' onclick=check() style='font-family: 宋体; font-size: 9pt; color: #000073; position: relative; height: 19'>" 
%> 
      </td>

        </tr>
        <%End If%>
	</table> 

  
 
 
 <table border="1" cellspacing="1" width="100%" id="AutoNumber1">
    <tr>
      <td width="9%"><font face="Impact">ORDERID</font></td>
      <td width="9%"><font face="Impact">DATE</font></td>
      <td width="9%"><font face="Impact">Customer</font></td>
      <td width="9%"><font face="Impact">Price</font></td>
      <%If choise=0 Then%>
      <td width="9%"><span lang="zh-cn"><b>处理订单</b></span></td>
      <%else%>
      <td width="9%"><span lang="zh-cn"><b>详细资料</b></span></td>
      <%End If%>
    </tr>
  
 
    <% Do While Not Rs.Eof %> 
    <%
	Sql="Select ProductID,UnitsOrdered From OrderLine Where OrderID='" & Rs("OrderID") & "'"
	Set RsOrder=Conn.Execute(Sql)
    Total=0
    While Not RsOrder.Eof 
	   Sql="Select Name,UnitPrice From Product Where ProductID='" & RsOrder("ProductID") & "'"
	   Set RsProduct=Conn.Execute(Sql)
     
       Total=Total+RsProduct("UnitPrice")*RsOrder("UnitsOrdered")
       RsOrder.MoveNext 
    Wend
    %>
    <tr>
      <td width="9%"><%=Rs("OrderID")%> </td>
      <td width="9%"><%=Rs("OrderDate")%> </td>
      <td width="9%"><%=Rs("CustomerName")%> </td>
      <td width="9%"><%=FormatCurrency(total)%> </td>
      <td width="10%">
      <p align="center"><b><span lang="zh-cn"></font>
      
      <a href="order_edit.asp?orderid=<%=Rs("OrderID")%>" style="text-decoration: none">
      <%If Choise=0 Then %>
      <font color="#000000">【处理】</font></a></span></b></td>
      <%else%>
      <font color="#000000">【详细资料】</font></a></span></b></td>
	<%End If%>
    </tr>
    <% i=i+1                                                                                                  
          Rs.MoveNext                                                                                                  
          If i>=Rs.PageSize Then Exit Do   
		  Loop                                                                   
          Rs.Close                                                                                                
          Set Rs=Nothing                                                                                                
          Conn.Close                                                                                                
          Set Conn=Nothing 
    %>


</table>




<p align="right"> </p>       
  
</body>

</html>

⌨️ 快捷键说明

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