003.
<head>
004.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
005.
<title>Untitled Document</title>
006.
<style type=
"text/css"
>
007.
<!--
008.
body {
009.
margin-left: 0px;
010.
margin-top: 0px;
011.
margin-right: 0px;
012.
margin-bottom: 0px;
013.
}
014.
.style7 {
015.
color: #7200A8;
016.
font-size: 14px;
017.
}
018.
body,td,th {
019.
font-family: Microsoft Sans Serif;
020.
font-size: 14px;
021.
color: #660000;
022.
}
023.
.style10 {font-family: Microsoft Sans Serif; font-weight: bold;}
024.
.style12 {font-family: Microsoft Sans Serif}
025.
a:link {
026.
color: #0000FF;
027.
}
028.
a:visited {
029.
color: #0000FF;
030.
}
031.
a:hover {
032.
color: #0000FF;
033.
}
034.
a:active {
035.
color: #0000FF;
036.
}
037.
.style13 {font-family:Microsoft Sans Serif; font-size: 14px; font-weight: bold; color: #000000; }
038.
.style15 {font-family:Microsoft Sans Serif; font-weight: bold; color: #000000; }
039.
.style16 {color: #000000}
040.
-->
041.
</style>
042.
<style type=
"text/css"
>
043.
body
044.
{
045.
font:12px Verdana, Arial, Helvetica, sans-serif;
046.
margin-left: 0px;
047.
}
048.
.oddtr
049.
{
050.
background-color:#ECECFF;
051.
}
052.
.eventr
053.
{
054.
background-color:#DDDDFF;
055.
}
056.
.trover
057.
{
058.
background-color: #E4CBCB;
059.
}
060.
061.
.style20 {font-size: 9px}
062.
.style20 {font-size: 9px}
063.
.style29 {font-size: 14px}
064.
.style30 {font-weight: bold; font-family: Microsoft Sans Serif;}
065.
.style32 {
066.
font-family: Verdana, Arial, Helvetica, sans-serif;
067.
color: #333333;
068.
}
069.
</style>
070.
<script src=
"jquery.js"
></script>
071.
<script>
072.
$(function()
073.
{
074.
075.
// Developed by Roshan Bhattarai
077.
// This notice MUST stay intact for legal use
078.
079.
//these two line adds the color to each different row
080.
$(
"#mytable tr:even"
).addClass(
"eventr"
);;
081.
$(
"#mytable tr:odd"
).addClass(
"oddtr"
);;
082.
//handle the mouseover , mouseout and click event
083.
$(
"#mytable tr"
).mouseover(function() {$(this).addClass(
"trover"
);}).mouseout(function() {$(this).removeClass(
"trover"
);}).click(function() {$(this).toggleClass(
"trclick"
);});
084.
});
085.
</script></head>
086.
087.
<body>
088.
<form id=
"form1"
name=
"frmSearch"
method=
"get"
action=
"<%=Request.ServerVariables("
QUOTATION
")%>"
>
089.
<table width=
"1079"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
090.
<!--DWLayoutTable-->
091.
<tr>
092.
<td width=
"1079"
height=
"20"
valign=
"middle"
background=
"viewcustomer/p7.gif"
> <span class=
"style7"
> : : <span class=
"style10"
> VIEW ALL QUOTATION </span></span></td>
093.
</tr>
094.
<tr>
095.
<td height=
"25"
valign=
"top"
><!--DWLayoutEmptyCell--> </td>
096.
</tr>
097.
</table>
098.
<table width=
"1078"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
099.
<!--DWLayoutTable-->
100.
<tr>
101.
<td width=
"84"
rowspan=
"2"
valign=
"top"
><!--DWLayoutEmptyCell--> </td>
102.
<td width=
"88"
height=
"52"
valign=
"middle"
><div align=
"right"
class=
"style13"
>Quotation : </div></td>
103.
<td width=
"159"
valign=
"middle"
><label for=
"textfield"
></label>
104.
105.
<input type=
"text"
name=
"txtKeyword"
id=
"txtKeyword"
value=
"<%=Request.QueryString("
txtKeyword
")%>"
/></td>
106.
<td width=
"747"
align=
"left"
valign=
"middle"
>
107.
<label for=
"imageField"
></label>
108.
<input type=
"image"
name=
"imageField"
src=
"viewcustomer/p2.gif"
id=
"imageField"
/></td>
109.
</tr>
110.
<tr>
111.
<td height=
"18"
colspan=
"3"
valign=
"top"
><!--DWLayoutEmptyCell--> </td>
112.
</tr>
113.
</table>
114.
<%
115.
Dim
Conn,strSQL,objRec
116.
Set
Conn = Server.Createobject(
"ADODB.Connection"
)
117.
Conn.Open
"Driver={SQL Server};Server=localhost;Database=mydatabase;Uname=THAISINTO/ADMINISTRATION;PWD=;"
118.
119.
strSQL =
"select QUOTATION.*,cust_NAME.*,cust_add.* from QUOTATION,cust_NAME,cust_add where QUOTATION.customer_ID=cust_NAME.customer_ID and QUOTATION.add_ID=cust_add.add_ID and cust_NAME.cust_name LIKE '%"
& Request.QueryString(
"txtKeyword"
) &
"%' or QUOTATION.quote_no LIKE '%"
& Request.QueryString(
"txtKeyword"
) &
"%' "
120.
Set
objRec = Server.CreateObject(
"ADODB.Recordset"
)
121.
objRec.Open strSQL, Conn, 1,3
122.
123.
If
objRec.EOF
Then
124.
Response.write(
"<font color=red>Not found data!</font>"
)
125.
Else
126.
Dim
PageLen,PageNo,TotalRecord,TotalPage,No,intID
127.
PageLen = 5
128.
PageNo = Request.QueryString(
"Page"
)
129.
if PageNo =
""
Then
PageNo = 1
130.
TotalRecord = objRec.RecordCount
131.
objRec.PageSize = PageLen
132.
TotalPage = objRec.PageCount
133.
objRec.AbsolutePage = PageNo
134.
End
IF
135.
%>
136.
<table width=
"1072"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
137.
<!--DWLayoutTable-->
138.
<tr>
139.
<td width=
"7"
height=
"53"
></td>
140.
<td colspan=
"2"
valign=
"top"
><table width=
"100%"
border=
"1"
cellpadding=
"0"
cellspacing=
"0"
bordercolor=
"#666666"
id=
"mytable"
>
141.
<!--DWLayoutTable-->
142.
<tr>
143.
<td width=
"70"
height=
"25"
valign=
"middle"
background=
"viewcustomer/p3.gif"
><div align=
"center"
class=
"style13"
>View</div></td>
144.
<td width=
"112"
valign=
"middle"
background=
"viewcustomer/p3.gif"
><div align=
"center"
class=
"style13"
>Quotation</div></td>
145.
<td width=
"359"
valign=
"middle"
background=
"viewcustomer/p3.gif"
><div align=
"center"
class=
"style13"
>Customer</div></td>
146.
<td width=
"172"
valign=
"middle"
background=
"viewcustomer/p3.gif"
><div align=
"center"
class=
"style13"
>Model</div></td>
147.
<td width=
"347"
valign=
"middle"
background=
"viewcustomer/p3.gif"
><div align=
"center"
class=
"style13"
> Description</div></td>
148.
</tr>
149.
<%
150.
No=1
151.
While
Not
objRec.EOF and No <= PageLen
152.
%>
153.
<tr>
154.
<td height=
"25"
valign=
"middle"
><div align=
"center"
><a href=
"viewquotation1.asp?CusID=<%=objRec.Fields("
quote_no
").Value%>"
target=
"_top"
><img src=
"quotation/p1.gif"
alt=
"Edit"
width=
"56"
height=
"24"
border=
"0"
/></a></div></td>
155.
<td valign=
"middle"
> <%=objRec.Fields(
"quote_no"
).Value%></td>
156.
<td valign=
"middle"
> <%=objRec.Fields(
"cust_name"
).Value%></td>
157.
<td valign=
"middle"
> <%=objRec.Fields(
"model"
).Value%></td>
158.
<td valign=
"middle"
> <%=objRec.Fields(
"quote_title"
).Value%></td>
159.
</tr>
160.
161.
162.
<%
163.
164.
No = No + 1
165.
objRec.MoveNext
166.
Wend
167.
168.
%>
169.
</table></td>
170.
</tr>
171.
<tr>
172.
<td height=
"48"
></td>
173.
<td width=
"693"
valign=
"top"
> <span class=
"style15"
>Total</span><span class=
"style16"
> :</span> <%=TotalRecord%> <span class=
"style15"
>Page</span><br />
174.
<span class=
"style15"
>Go to <span class=
"style12"
>:</span></span>
175.
<%
For
intID = 1
To
TotalPage%>
176.
<% if intID = Cint(PageNo)
Then
%>
177.
<%=intID%>
178.
<%
Else
%>
179.
<a href=
"<%Request.ServerVariables("
QUOTATION
")%>?Page=<%=intID%>"
><%=intID%></a>
180.
<%
End
IF%>
181.
<%
Next
%>
182.
<%
183.
objRec.Close()
184.
Conn.Close()
185.
Set
objRec =
Nothing
186.
Set
Conn =
Nothing
187.
188.
%></td>
189.
<td width=
"372"
> </td>
190.
</tr>
191.
<tr>
192.
<td height=
"701"
></td>
193.
<td> </td>
194.
<td> </td>
195.
</tr>
196.
</table>
197.
198.
</form>
199.
200.
</body>
201.
</html>