PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/beta/Inquiry/include_SelectOrder.asp

http://github.com/khaneh/Orders
ASP | 71 lines | 58 code | 3 blank | 10 comment | 4 complexity | 8560d8b3e687c148a880c5633065ae13 MD5 | raw file
 1<%
 2'		This Include File Needs Following Variables to have values:
 3'
 4'		SO_Action				(the Action of the submit button onclick)
 5'		SO_Customer				(AccountTitle or Name to be searched)
 6'		SO_StepText				(e.g. '��� ��� : ������ ����� ��� ������')
 7'
 8'
 9%>
10		<div dir='rtl'><B><%=SO_StepText%></B>
11		</div><br>
12<!-- ������ ����� ��� ������ -->
13<%
14	
15	SO_mySQL="SELECT * From Accounts WHERE (ID='"& SO_Customer & "')"
16	Set SO_RS1 = conn.Execute(SO_mySQL)
17	if (SO_RS1.eof) then
18		response.write "Error ! No such customer"
19		response.end
20	else
21		SO_AccountTitle=SO_RS1("AccountTitle")
22	end if
23
24'	SO_mySQL="SELECT * From Orders WHERE (Customer='"& SO_Customer & "') ORDER BY ID"
25'	SO_mySQL="SELECT Orders.ID, Orders.CreatedDate FROM Orders LEFT OUTER JOIN InvoiceOrderRelations ON Orders.ID = InvoiceOrderRelations.[Order] WHERE (InvoiceOrderRelations.Invoice IS NULL) AND (Orders.Customer = '"& SO_Customer & "') ORDER BY Orders.ID"
26' Changed By Kid 82/08/18 
27	SO_mySQL="SELECT * From Orders WHERE (Customer='"& SO_Customer & "') AND (Closed=0) ORDER BY ID"
28	Set SO_RS1 = conn.Execute(SO_mySQL)
29
30	if (SO_RS1.eof) then 		' Not Found	%>
31		<table class="RcpTable" align='center' cellpadding='5'><tr><td bgcolor='#FFCCCC' dir='rtl' align='center'>��� ������ ���� ���<br></td></tr></table><br>
32<%	else
33%>
34	<br>
35	<TABLE class="RcpTable" align="center" border="1" cellspacing="1" cellpadding="5" dir="RTL">
36		<tr bgcolor='#DDDDEE'>
37			<td align='center' colspan="3">����� ��� ����� �� <br>'<%=SO_AccountTitle%>'<br>�� ���� ������ ���� ���</td>
38		</tr>
39		<tr bgcolor='#C3C3FF'>
40			<td align='center' width="30"> <input type="checkbox" disabled checked> </td>
41			<td align='center' width="70"> ����� ������</td>
42			<td align='center' width="80"> ����� </td>
43		</tr>
44<%		SO_tempCounter=0
45		while Not (SO_RS1.EOF)
46			SO_tempCounter=SO_tempCounter+1
47			if (SO_tempCounter Mod 2 = 1)then
48				SO_tempColor="#FFFFFF"
49			else
50				SO_tempColor="#DDDDEE"
51			end if
52%>				<tr bgcolor='<%=SO_tempColor%>'>
53					<td align='center'><input type="checkbox" name="selectedOrders" value="<%=SO_RS1("ID")%>">&nbsp;</td>
54					<td dir='ltr' align='center'><%=Link2Trace(SO_RS1("ID"))%>&nbsp;</td>
55					<td dir='ltr' align='center'><%=SO_RS1("CreatedDate")%>&nbsp;</td>
56				</tr>
57<%			SO_RS1.movenext
58		wend
59%>
60		<tr bgcolor='#C3C3FF'>
61			<td align='center' colspan="4"><input name="SO_SelectButton" class="GenButton" type="submit" value="������" onclick="<%=SO_Action%>" >&nbsp;<input name="selectedCustomer" type="hidden" value="<%=SO_Customer%>"></td>
62		</tr>
63	</TABLE>
64	<SCRIPT LANGUAGE="JavaScript">
65	<!--
66	//document.all.SO_SelectButton.focus();
67	//-->
68	</SCRIPT>
69<%
70	end if
71%>