|
Account Access
|
<%
Dim LaunConn
Dim CookCartID
Dim objFSO
Set LaunConn=Server.CreateObject("ADODB.Connection")
LaunConn.Open "DSN=LaundryCarts;"
CookCartID = Session("CookCartID")
CustID = Session("CustID")
%>
| Customer
History |
<%
if request.querystring("custid") <> CustID AND Session("level") < 4 then
response.redirect("http://www.laundry-carts.com")
end if
%>
<%
Set RsCust = Server.CreateObject("ADODB.Recordset")
if Session("level") >=4 then
custid = request.querystring("custid")
end if
With RsCust
.Source= "SELECT BFirstName, BLastName FROM Customer WHERE CustomerID LIKE '" & CustID & "'"
.ActiveConnection = "DSN=LaundryCarts;"
.Open
.Movefirst
End With
%>
| <%= RsCust("BFirstName")%> |
<%= RsCust("BLastName")%> |
<%
RsCust.Close
Set RsCust = Nothing
Set RsCart = Server.CreateObject("ADODB.Recordset")
StrSQL = "SELECT Cart.OrderDate, Cart.Comments, OrdStat.StatusName, Cart.CustID, Cart.OrderDate, Cart.OrderDate, Cart.Ordered, Cart.TotalPrice, Cart.TotalQuant, Cart.CartID, Cart.SpecInst"
strSQL = strSQL & " FROM OrdStat INNER JOIN Cart ON OrdStat.OrdStatID = Cart.Status"
strSQL = strSQL & " WHERE (((Cart.CustID)LIKE '" & CustID &"'))"
strSQL = strSQL & " ORDER BY OrdStat.StatusOrder,Cart.OrderDate DESC;"
With RsCart
'.Source= "SELECT * FROM Cart WHERE Cart.CustID LIKE '" & CustID & "' ORDER BY Cart.Status, Cart.OrderDate"
'.Source = "SELECT Cart.OrderDate, OrdStat.StatusName, Cart.CustID, Cart.ShipCost, Cart.OrderDate, Cart.OrderDate, Cart.Ordered,strSQL = strSQL & Cart.TotalPrice, Cart.TotalQuant, Cart.CartID FROM OrdStat INNER JOIN Cart ON OrdStat.OrdStatID = Cart.Status WHERE Cart.CustID LIKE '"& CustID & "' ORDER BY OrdStat.StatusOrder,Cart.OrderDate;"
.Source = strSQL
.ActiveConnection = "DSN=LaundryCarts;"
.Open
End With
'Response.Write strSQL
If NOT RsCart.EOF Then
RsCart.MoveFirst
Do While Not RsCart.EOF
Response.Write ("")
Response.Write ("| Order Number: | " & RsCart("CartID") & " | ")
Response.Write ("Ordered On: | " & RsCart("OrderDate") & " | ")
Response.Write "Status: | " & RsCart("StatusName") &" | "
Response.Write ("| Special Instructions: | ")
Response.Write ("| ")
Response.write RsCart("SpecInst")
Response.Write (" | ")
Response.Write ("| Comments: | ")
Response.Write ("| ")
Response.write RsCart("comments")
Response.Write (" | ")
Response.Write (" ")
' Start the shopping cart table
Response.Write ""
Response.Write "| Part Number | "
Response.Write "Description | "
Response.Write "Quantity | "
Response.Write "Item Status | "
Response.Write "Price | "
' Start the form for updating the cart
'Response.Write " | " & RsCartItem("PartID") &" | "
Response.Write "" & RsCartItem("PartDesc") &" | "
' Set these next form inputs to be named spesifically to the part they are for.
' Refer higher up to read about how this is my favorite work.
Response.Write "" & RsCartItem("Quantity") & " | "
if rscartitem("status") = " " then
Response.Write " | "
else
Response.Write "" & RsCartItem("Status") & " | "
end if
Response.Write "$" & formatnumber(RsCartItem("Price"),2) &" " & QuantUpdate & " | "
RsCartItem.MoveNext
Loop
RsCartItem.Close
Set RsCartItem = Nothing
' If there are no items in the cart, say so!
'strSQL = "SELECT TotalPrice FROM Cart WHERE CustID LIKE '" & Request.Cookies("costcookie")("CustID") & " AND Ordered LIKE 'TRUE' ORDER BY OrderDate"
'Set Costls1 = CostConn.Execute(strSQL)
Response.Write " | | | Price: | $" & formatnumber(RsCart("TotalPrice"),2) & " | "
Response.Write "| | | | Total Price: | $" & formatnumber(RsCart("TotalPrice"), 2) & " | "
Response.Write " "
RsCart.MoveNext
Loop
RsCart.Close
Set RsCart = Nothing
Else
Response.Write "Sorry, We have no record of orders placed."
End If
LaunConn.Close
Set LaunConn = Nothing
%>
Return
to Menu
|
|
|
|
|
|
|