<%@ LANGUAGE="VBScript" %>
<!--#include file="Inc/Conn.asp" -->
<!--#include file="Inc/Function.asp"-->
<%
OrderNum= Request("OrderNum")
IF Session("UserName")="" Then
response.redirect "Enuserserver.asp"
Else
set Rs3 = Server.CreateObject("ADODB.recordset")
sql3="select * from OrderList where OrderNum='"&OrderNum&"'"
rs3.open sql3,conn,1,1
IF  rs3.RecordCount >=1  then
IF Session("UserName")=rs3("UserName") Then
%>
<html>
<head>
<title>Customer Inquire</title>
<meta name="Contact" content="www.liAngjinG.net  良精软件工作室 QQ:65961930">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="mt_style.css" rel="stylesheet" type="text/css">
</head>
<%
id=Form_Id
set rs=server.createobject("adodb.recordset")
sqltext="select * from OrderList where OrderNum='"&OrderNum&"'"
rs.open sqltext,conn,1,1
%>

<body>
<br>    <div align="center">
<center>

  <TABLE cellSpacing=1 cellPadding=4 width=530 bgColor=#006699>
    <TBODY>
      <TR bgColor=#eeeeee> 
        <TD height="32"  colSpan=2><div align="center"><font color="#000000">Customer 
            order detailed</font></div></TD>
      </TR>
      <TR> 
        <TD  width=127 bgColor=#DBDBDB height=12 align="right"><font color="#000000">Inquire 
          number</font>:</TD>
        <TD  width=402 height=12 bgcolor="#eeeeee">&nbsp; <%=rs("OrderNum")%></TD>
      </TR>
      <TR> 
        <TD bgColor=#DBDBDB height=12 align="right">Company name<font color="#000000">&nbsp;</font>:</TD>
        <TD  width=402 height=12 bgcolor="#eeeeee">&nbsp; <%=rs("CompanyName")%></TD>
      </TR>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=25 align="right"><font color="#000000">Receiver 
          name:</font></TD>
        <TD  width=402 height=25 bgcolor="#eeeeee">&nbsp; <%=rs("Receiver")%></TD>
      </TR>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=25 align="right"><font color="#000000">Receiver 
          address:</font></TD>
        <TD  width=402 height=25 bgcolor="#eeeeee">&nbsp; <%=rs("Add")%></TD>
      </tr>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=12 align="right"><font color="#000000">Tel:</font></TD>
        <TD  width=402 height=12 bgcolor="#eeeeee">&nbsp; <%=rs("Phone")%></TD>
      </tr>
      <tr> 
        <TD bgColor=#DBDBDB height=12 align="right">Fax:</TD>
        <TD  width=402 height=12 bgcolor="#eeeeee">&nbsp; <%=rs("Fax")%></TD>
      </tr>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=25 align="right"><font color="#000000">E-mail:</font></TD>
        <TD  width=402 height=25 bgcolor="#eeeeee">&nbsp; <%=rs("EMail")%></TD>
      </tr>
      <tr> 
        <TD  width=127 height=25 align="right" bgColor=#DBDBDB><font color="#000000">Memo:</font></TD>
        <TD  width=402 height=25 bgcolor="#eeeeee">&nbsp; <%=rs("Notes")%></TD>
      </tr>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=24 align="right"><font color="#000000">date:</font></TD>
        <TD  width=402 height=24 bgcolor="#eeeeee">&nbsp; <%=rs("OrderTime")%></TD>
      </tr>
      <tr> 
        <TD  width=127 bgColor=#DBDBDB height=25 align="right">Order if already 
          process:</TD>
        <TD  width=402 height=25 bgcolor="#eeeeee">&nbsp;  <%If rs("Flag")="Yes" Then%>
          Disposal
<%else%>
          <font color="#FF0000"> Unsettled</font> 
          <%End If%> </TD>
      </tr>
      <TR> 
        <TD height="31"  colSpan=2 bgcolor="#eeeeee"> <p align="center">Goods 
            order of detail</p></TD>
      </TR>
      <%
set rs2=server.createobject("adodb.recordset")
sqltext2 = "select A.Productlj_Id,A.OrderNum,A.ProductUnit,C.EnTitle,C.Price,C.EnBigClassName,C.EnSmallClassName from OrderDetail A,Product C where A.OrderNum='"&OrderNum&"' and A.Productlj_Id=C.Productlj_Id"

'sqltext2="select * from OrderDetail where OrderNum='"&OrderNum&"'"
rs2.open sqltext2,conn,1,1
%>
      <TR> 
        <TD height="15"  colSpan=2 valign="top" bgcolor="#eeeeee"> <div align="center"> 
            <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#006699" bordercolordark="#eeeeee"  height="66">
              <tr> 
                <td width="18%" bgcolor="#DBDBDB" height="21" align="center">Product 
                  number</td>
                <td width="27%" bgcolor="#DBDBDB" height="21" align="center">Product 
                  name</td>
                <td width="30%" bgcolor="#DBDBDB" height="21" align="center">Class 
                  of type</td>
              </tr>
              <%			 
While Not rs2.EOF     
	   '计算总金额%>
              <tr> 
                <td width="18%" align="center" height="22"><%=rs2("Productlj_Id")%></td>
                <td width="27%" align="center" height="22"><%=rs2("EnTitle")%></td>
                <td width="30%" align="center" height="22"><%=rs2("EnBigClassName")%> => <%=rs2("EnSmallClassName")%></td>
              </tr>
              <%
rs2.MoveNext
Wend
%>
            </table>
          </div></TD>
      </TR><center>
    <TR> 
      <TD height="25"  colSpan=2 bgcolor="#eeeeee"> <p align="center"> 
          <input name="close" type="button" id="close" onclick="javascript:window.close()" value="Close">
      </TD>
    </TR>
  </TABLE>
</div>
</form>

<p>
<%
Else
	errmsg=errmsg+"<li>You can't look over that not for you Inquire detail; please re-input your Inquire numbers!</li>"
	call WriteErrMsg()
End If
Else
	errmsg=errmsg+"<li>Inquire number that you input nonexistent or format not correct, please re-input!</li>"
	call WriteErrMsg()
End IF
End if
rs3.close
conn.close
%>

</body>
</html>