<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="CustTickets.aspx.cs" Inherits="PirTickets.CustTickets" %>
<%@ 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">

    <asp:Label ID="Label1" runat="server" Text="These are the repairs you have outstanding:"></asp:Label>
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AutoGenerateSelectButton="True" DataKeyNames="OrderID" 
        onselectedindexchanged="GridView1_SelectedIndexChanged" 
    OnSorting ="GridView1_Sorting" Width="716px" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="SqlDataCustTickets" 
        EmptyDataText="You have no repairs to view" CellPadding="4" 
    ForeColor="Black" BackColor="White" BorderColor="#DEDFDE" 
        BorderStyle="None" BorderWidth="1px" PageSize="20" ShowFooter="True">
        <RowStyle BackColor="#F7F7DE" />
        <Columns>
            <asp:BoundField DataField="OrderID" HeaderText="ID" ReadOnly="True" 
                SortExpression="OrderID" />
            <asp:BoundField DataField="manufacturer" HeaderText="Make" 
                SortExpression="manufacturer" />
            <asp:BoundField DataField="ModelName" HeaderText="Model" 
                SortExpression="ModelName" />
            <asp:BoundField DataField="SerialNumber" HeaderText="Serial" SortExpression="SerialNumber" />
            <asp:BoundField DataField="Received" HeaderText="Received" ReadOnly="True" 
                SortExpression="Received" />
            <asp:CheckBoxField DataField="RepairCompleted" HeaderText="Complete?" 
                SortExpression="RepairCompleted" />
            <asp:BoundField DataField="priority_name" HeaderText="Priority" 
                SortExpression="priority_name" />
            <asp:BoundField DataField="status_name" HeaderText="Status" 
                SortExpression="status_name" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataCustTickets" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
        SelectCommand="SELECT [OrderID], [manufacturer], [ModelName], [SerialNumber], [Received], [RepairCompleted], [priority_name], [status_name] FROM [vwCustomerTickets] WHERE ([CustomerID] = @CustomerID)">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="custid" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
