-
Notifications
You must be signed in to change notification settings - Fork 0
/
results.aspx
88 lines (82 loc) · 6.43 KB
/
results.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="results.aspx.cs" Inherits="results" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="articlePlaceHolder" Runat="Server">
<div class="row">
<div class="span12">
<h1>Search Results</h1>
</div>
</div>
<hr />
<div class="row">
<div>
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:GridView ID="GridView1"
runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1"
GridLines="None"
CssClass="table table-hover table-striped"
DataKeyNames="RegistrantID"
OnRowCommand="GridView1_RowCommand"
SelectCommand="SELECT [FirstName], [LastName], [MidInitial], [Gender], [DOB], [Height], [Weight], [HairColor], [EyeColor], [Race], [Complexion], [Build], [Active], [RegistrantID] FROM [Registrant] WHERE (([FirstName] LIKE '%' + @FirstName + '%') AND ([LastName] LIKE '%' + @LastName + '%') AND ([MidInitial] LIKE '%' + @MidInitial + '%') AND ([Weight] >= @Weight) AND ([Height] >= @Height) AND ([Gender] LIKE '%' + @Gender + '%') AND ([EyeColor] LIKE '%' + @EyeColor + '%') AND ([HairColor] LIKE '%' + @HairColor + '%') AND ([Build] LIKE '%' + @Build + '%') AND ([Race] LIKE '%' + @Race + '%') AND ([Complexion] LIKE '%' + @Complexion + '%') AND ([DOB] LIKE '%' + @DOB + '%') AND ([RegistrantID] >= @RegistrantID))">
<AlternatingRowStyle BackColor="#CCCCCC" />
<Columns>
<%-- <asp:BoundField DataField="RegistrantID" HeaderText="RegistrantID" SortExpression="RegistrantID" InsertVisible="False" ReadOnly="True" />--%>
<asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" />
<asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName" />
<asp:BoundField DataField="MidInitial" HeaderText="Mid" SortExpression="MidInitial" />
<asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender" />
<asp:BoundField DataField="DOB" HeaderText="DoB" SortExpression="DOB" />
<asp:BoundField DataField="Height" HeaderText="Height" SortExpression="Height" />
<asp:BoundField DataField="Weight" HeaderText="Weight" SortExpression="Weight" />
<asp:BoundField DataField="HairColor" HeaderText="Hair Color" SortExpression="HairColor" />
<asp:BoundField DataField="EyeColor" HeaderText="Eye Color" SortExpression="EyeColor" />
<asp:BoundField DataField="Race" HeaderText="Race" SortExpression="Race" />
<asp:BoundField DataField="Complexion" HeaderText="Complexion" SortExpression="Complexion" />
<asp:BoundField DataField="Build" HeaderText="Build" SortExpression="Build" />
<%-- <asp:BoundField DataField="Active" HeaderText="Active" SortExpression="Active" />--%>
<asp:ButtonField HeaderText="Profile" Text="View Profile" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [RegistrantID], [FirstName], [LastName], [MidInitial], [Gender], [DOB], [Height], [Weight], [HairColor], [EyeColor], [Race], [Complexion], [Build], [Active] FROM [Registrant] WHERE (([FirstName] LIKE '%' + @FirstName + '%') AND ([LastName] LIKE '%' + @LastName + '%') AND ([Weight] >= @Weight) AND ([Height] >= @Height) AND ([Gender] = @Gender) AND ([EyeColor] LIKE '%' + @EyeColor + '%') AND ([HairColor] LIKE '%' + @HairColor + '%') AND ([Build] LIKE '%' + @Build + '%') AND ([Race] LIKE '%' + @Race + '%') AND ([Complexion] LIKE '%' + @Complexion + '%') AND ([DOB] LIKE '%' + @DOB + '%') AND ([RegistrantID] >= @RegistrantID))">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="%" Name="FirstName" QueryStringField="firstName" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="LastName" QueryStringField="lastName" Type="String" />
<asp:QueryStringParameter DefaultValue="0" Name="Weight" QueryStringField="weight" Type="Int32" />
<asp:QueryStringParameter DefaultValue="0" Name="Height" QueryStringField="height" Type="Int32" />
<asp:QueryStringParameter DefaultValue="Male" Name="Gender" QueryStringField="gender" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="EyeColor" QueryStringField="eyeColor" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="HairColor" QueryStringField="hairColor" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="Build" QueryStringField="build" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="Race" QueryStringField="race" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="Complexion" QueryStringField="complexion" Type="String" />
<asp:QueryStringParameter DefaultValue="%" Name="DOB" QueryStringField="dateOfBirth" />
<asp:QueryStringParameter DefaultValue="0" Name="RegistrantID" QueryStringField="registrantID" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
<hr />
<div class="row">
<div class="span2">
<asp:HyperLink ID="hylSearch"
runat="server"
NavigateUrl="~/search.aspx"
Text="Back to Search"
CssClass="btn btn-primary btn-block">
</asp:HyperLink>
</div>
<div class="span2 offset1">
<asp:HyperLink ID="hylGallery"
runat="server"
NavigateUrl="~/gallery.aspx"
Text="Search by Image"
CssClass="btn btn-primary btn-block">
</asp:HyperLink>
</div>
</div>
</asp:Content>