<%@ Page Title="" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" CodeBehind="Employee_List.aspx.cs" Inherits="PirTickets.Employee_List" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <h1>Employee List</h1>
    <asp:Button ID="btAddNew" OnClick="btAddNew_Click" runat="server" 
        Text="Add New Employee" />


    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        DataKeyNames="EmployeeID" AutoGenerateSelectButton="True" 
        onselectedindexchanged="GridView1_SelectedIndexChanged" 
        OnSorting="GridView1_Sorting" OnPageIndexChanging="GridView1_PageIndexChanging" 
        Width="720px" AutoGenerateColumns="False" DataSourceID="SqlDataEmployees" 
        ShowFooter="True" ShowHeaderWhenEmpty="True" AllowSorting="True" 
         EmptyDataText="No Employees have been created" CellPadding="4" 
    ForeColor="#333333">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="EmployeeID" HeaderText="ID" 
                ReadOnly="True" SortExpression="EmployeeID" >
                </asp:BoundField>
            <asp:BoundField DataField="UserName" HeaderText="User Name" 
                SortExpression="UserName">
            <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="name" HeaderText="Name" 
                SortExpression="name" ReadOnly="True">
            <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>

            <asp:BoundField DataField="sitename" HeaderText="Site" 
                SortExpression="sitename">
            <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="security_level_description" HeaderText="Security Level" 
                SortExpression="security_level_description">
            <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
        </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="SqlDataEmployees" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PirTickets %>" 
        
         SelectCommand="SELECT [EmployeeID], [UserName], [name], [sitename], [security_level_description] FROM [vwEmployees]">
    </asp:SqlDataSource>
</asp:Content>
