<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="CustomerList.aspx.cs" Inherits="PirTickets.CustomerList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Customer List
    </h2>
        <asp:Button ID="btAdd" runat="server" onclick="btAdd_Click" 
            Text="Add New Customer" />
    <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">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="CustomerID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" 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>

<asp:SqlDataSource ID="SqlDataCustomers" runat="server" 
    ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
    SelectCommand="SELECT [CustomerID], [OrganizationName], [Username], [FirstName], [LastName], [City], [Trader] FROM [Customers]">
</asp:SqlDataSource>

</asp:Content>
