顾客管理页面
function swapform()
{
document.form.submit();
}
//-->
function check()
{
if (isnan(go2to.page.value))
alert("请正确填写转到页数!");
else if (go2to.page.value=="")
{
alert("请输入转到页数!");
}
else
go2to.submit();
}
//-->
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
%>
尚未处理的订单
已经发货的订单
If Rs.Eof Then
Response.Write "没有此类订单。"
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 PageCount=1
End If
Rs.AbsolutePage=PageCount
%>
共有[]用户帐号
以下是[1~]个
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%>
共有[]用户帐号 以下是[~]
Response.Write "◆ "
If PageCount=1 Then
Response.Write "首页 上一页 "
Else
Response.Write "首页 "
Response.Write "?????? "
End If
If Rs.PageCount-PageCount Response.Write "下一页 末页"
Else
Response.Write "下一页 "
Response.Write "末页"
End If
Response.Write " 页次:"&pagecount&"/"&Rs.pagecount&"页"
Response.Write " 转到第页 "
Response.Write ""
%>
ORDERID
DATE
Customer
Price
处理订单
详细资料
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
%>
【处理】
【详细资料】
Rs.MoveNext
If i>=Rs.PageSize Then Exit Do
Loop
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>