<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Searches.Master" AutoEventWireup="true" CodeBehind="CustomerSearch.aspx.cs" Inherits="PirTickets.CustomerSearch" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    

    <asp:GridView ID="gvCustomers" runat="server" Width="720px"
        AutoGenerateSelectButton="True" DataKeyNames="CustomerID" 
        onselectedindexchanged="gvCustomers_SelectedIndexChanged" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    DataSourceID="SqlDataCustomers" CellPadding="4" ForeColor="#333333" 
    onpageindexchanged="gvCustomers_onPaging" 
            onrowdatabound="gvCustomers_RowDataBound">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
           <asp:BoundField DataField="CustomerID" HeaderText="ID" 
                SortExpression="CustomerID" />
            <asp:BoundField DataField="OrganizationName" HeaderText="Organization" 
                SortExpression="OrganizationName" />
            <asp:BoundField DataField="Username" HeaderText="Username" 
                SortExpression="Username" />
            <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="LastName" 
                SortExpression="LastName" />
            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
            <asp:CheckBoxField DataField="Trader" HeaderText="Trader" 
                SortExpression="Trader" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <b>Search:</b>
<table>
<tr><td>Organization:</td><td>
    <asp:TextBox ID="txtOrg" runat="server" AutoPostBack="True" 
        ontextchanged="txtOrg_TextChanged" Width="174px"></asp:TextBox></td><td>Name:</td><td>
    <asp:TextBox ID="txtName" runat="server" AutoPostBack="True" 
        ontextchanged="txtName_TextChanged" Width="158px"></asp:TextBox></td><td>City:</td><td>
    <asp:TextBox ID="txtCity" runat="server" AutoPostBack="True" 
        ontextchanged="txtCity_TextChanged" Width="115px" /></td><td>
       
            
            <asp:Button ID="btClear" runat="server" Text="Clear" Width="54px" 
                onclick="btClear_Click" />
       
            
            </td></tr>
<tr><td><asp:HiddenField ID="Hidden1" runat="server" /></td><td>&nbsp;</td><td>&nbsp;</td><td>
    </td><td>&nbsp;</td><td align="right">
    &nbsp;</td><td>
       
            <input ID="Button1" onclick="Cancel_Clicked();" type="button" value="Cancel" /></td></tr></table>
        
        <asp:SqlDataSource ID="SqlDataCustomers" runat="server" 
    ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
    SelectCommand="SELECT [CustomerID], [OrganizationName], [Username], [FirstName], [LastName], [City], [Trader] FROM [Customers]">
</asp:SqlDataSource>

    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
