<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="Invoices.aspx.cs" Inherits="PirTickets.Invoices" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Outstanding Invoices</h2>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataInvoice" Width="690px" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            AutoGenerateSelectButton="True" DataKeyNames="ID" CellPadding="4" 
            ForeColor="#333333" AllowPaging="True" ShowFooter="True" 
            AllowSorting="True" PageSize="20">
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="Inv. No." SortExpression="ID" >
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Customer" HeaderText="Customer" 
                    SortExpression="Customer" />
                <asp:BoundField DataField="gendate" HeaderText="Gen. Date" 
                    SortExpression="gendate" />
                <asp:CheckBoxField DataField="printed" HeaderText="Printed" 
                    SortExpression="printed" />
                <asp:CheckBoxField DataField="paid" HeaderText="Paid" SortExpression="paid" />
            </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="SqlDataInvoice" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
            SelectCommand="SELECT ID, [OrganizationName] + ' ' + [FirstName] + ' ' + [LastName] as Customer, [gendate], [printed], [paid] FROM [vwInvoice]">
        </asp:SqlDataSource>

    </p>

</asp:Content>
