PageRenderTime 32ms CodeModel.GetById 29ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/beta/inventory/dialog_selectInvItem.asp

http://github.com/khaneh/Orders
ASP | 97 lines | 89 code | 8 blank | 0 comment | 7 complexity | 02dddee3dcb05aa13fc6ceb975d8d47f MD5 | raw file
 1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%>
 2<!--#include file="../config.asp" -->
 3<HTML>
 4<HEAD>
 5<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
 6<meta http-equiv="Content-Language" content="fa">
 7<style>
 8	Table { font-size: 9pt;}
 9	Input { font-family:tahoma; font-size: 9pt;}
10</style>
11<TITLE>������� �����</TITLE>
12<script language="JavaScript">
13<!--
14var Arguments = new Array(2)
15
16function documentKeyDown() {
17	var theKey = event.keyCode;
18	if (theKey == 27) { 
19		window.close();
20	}
21}
22
23document.onkeydown = documentKeyDown;
24
25
26//-->
27</script>
28</HEAD>
29
30<BODY>
31<font face="tahoma">
32<%
33
34	mySQL="SELECT * From InventoryItems WHERE (REPLACE([Name], ' ', '') LIKE REPLACE(N'%"& sqlSafe(request("name")) & "%', ' ', '')) ORDER BY Name"
35
36	Set RS1 = conn.Execute(mySQL)
37
38	if (RS1.eof) then %>
39		<br><br><br><hr>
40		<table align='center'>
41			<tr><td bgcolor='#FFCCCC' dir='rtl' align='center'> ����� �� ��� ������ ���� ���</td>
42			</tr>
43		</table>
44		<hr>
45<%	else 
46%>
47	<TABLE ID="InvoiceItems" border="1" width="100%" cellspacing="1" cellpadding="5" dir="RTL">
48		<tr bgcolor='#C3C3FF'>
49			<td align='center' width="5%"> <input type="radio" disabled> </td>
50			<td align='center' width="15%"> �� ���� </td>
51			<td align='center'> ����� </td>
52		</tr>
53<%		tempCounter=0
54		while Not (RS1.EOF)
55			tempCounter=tempCounter+1
56			if (tempCounter Mod 2 = 1)then
57				tempColor="#FFFFFF"
58			else
59				tempColor="#DDDDEE"
60			end if
61%>				<tr bgcolor='<%=tempColor%>'>
62					<td align='center'><input type="radio" name="selectedItem" value="<%=RS1("ID")%>" onclick="selectItem(this)">&nbsp;</td>
63					<td dir='ltr'><%=RS1("OldItemID") %>&nbsp;</td>
64					<td><%=RS1("Name")%>&nbsp;</td>
65				</tr>
66<%			RS1.movenext
67		wend
68%>
69		<tr bgcolor='#C3C3FF'>
70			<td align='center' colspan="3"><input type="submit" style="font-family:Tahoma" value="������" onclick="selectAndClose();">&nbsp;</td>
71		</tr>
72	</TABLE>
73	<BR>
74	<HR>
75	<BR>
76<%	end if    
77conn.Close
78%>
79</font>
80</BODY>
81</HTML>
82<script language="JavaScript">
83<!--
84function selectItem(src){
85	rowNo=src.parentNode.parentNode.rowIndex;
86//	thePrice=document.getElementsByName("selectedItem")[rowNo-1].value
87	myRow=document.getElementById("InvoiceItems").getElementsByTagName("tr")[rowNo];
88	Arguments[0]=myRow.getElementsByTagName("td")[1].innerText;
89	Arguments[1]=myRow.getElementsByTagName("td")[2].innerText;
90}
91function selectAndClose(){
92myString=Arguments.join("#");
93window.dialogArguments.value=myString
94window.close();
95}
96//-->
97</script>