<%@ Page Title="" Language="C#" MasterPageFile="~/eosWinkartWeb/eosWinkartWeb.Master"
    AutoEventWireup="true" CodeBehind="PersonelsShow.aspx.cs" Inherits="WebKart.eosWinkartWeb.PersonelsShow" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%">
        <tr>
            <td class="RightTD" colspan="2">
                <img src="../App_Themes/eosMainThem/icons/users.png" alt="" />
                <asp:Image ID="Image1" runat="server" SkinID="imgsectionPersonelLabel" />
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <asp:DropDownList runat="server" ID="ddlSections" AutoPostBack="True" OnSelectedIndexChanged="ddlSections_OnSelectedIndexChanged"
                    SkinID="ddlYellow" Width="200px" />
                <asp:Button ID="btnSearchPersonel" runat="server" Text="جستجو" SkinID="btnOrange"
                    OnClick="btnSearchPersonel_Click" />
            </td>
            <td class="LeftTD" style="width: 250px">
                قسمت کاری:
            </td>
        </tr>
        <tr>
            <td colspan="2" class="CenterTD">
                <hr style="size: 1; color: Yellow; width: 500px">
            </td>
        </tr>
        <tr>
            <td class="CenterTD" colspan="2">
                <telerik:radgrid allowcustompaging="True" id="grdPersons" runat="server" skin="WebBlue"
                    gridlines="None" autogeneratecolumns="False" groupingenabled="False" font-names="Tahoma"
                    font-size="10pt" onitemcommand="grdPersonels_ItemCommand" datasourceid="personODS" 
                    allowpaging="true" pagesize="20" onpageindexchanged="grdPersons_OnPageIndexChanged"
                    onsortcommand="grdPersonels_SortCommand"  OnPageSizeChanged="grdPersons_OnPageSizeChanged" AllowSorting="False">
                    <mastertableview nodetailrecordstext="" nomasterrecordstext="اطلاعاتی برای نمایش موجود نمی باشد" AllowCustomSorting="True">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="SECTION" HeaderText="" UniqueName="SECTION" Display="false" AllowSorting="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="WorkGroupName" HeaderText="گروه کاری" UniqueName="WorkGroupName"
                                    AllowSorting="True">
                                    <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                    <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="SECTION" HeaderText="قسمت کاری" UniqueName="SECTION"
                                    AllowSorting="True">
                                    <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                    <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="PersonName" HeaderText="نام خانوادگی و نام" UniqueName="PersonName"
                                    AllowSorting="True">
                                    <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                    <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="perno" HeaderText="شماره پرسنلی" UniqueName="perno"
                                    AllowSorting="True">
                                    <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                    <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                </telerik:GridBoundColumn>
                            </Columns>
                        </mastertableview>
                    <clientsettings reordercolumnsonclient="True" enablerowhoverstyle="true" enablepostbackonrowclick="true"
                        allowautoscrollondragdrop="False">
                            <Selecting EnableDragToSelectRows="False" />
                        </clientsettings>
                </telerik:radgrid>
                <asp:ObjectDataSource runat="server" ID="personODS" EnablePaging="True" StartRowIndexParameterName="startRecord"
                    MaximumRowsParameterName="maxRecords" SelectCountMethod="GetCount" SelectMethod="GetPersonels"
                    TypeName="Eos.WebKart.Domain.Personels"></asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td class="LeftTD" colspan="2">
                <asp:HyperLink runat="server" ImageUrl="~/App_Themes/eosMainThem/icons/45491.png"
                    ID="hlPrint" Target="_blank" Visible="false"></asp:HyperLink>
            </td>
        </tr>
    </table>
    <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" skin="Default"
        initialdelaytime="2" mindisplaytime="100" width="184px">
    </telerik:radajaxloadingpanel>
    <telerik:radajaxmanager id="RadAjaxManager1" runat="server" defaultloadingpanelid="RadAjaxLoadingPanel1">
        <ajaxsettings>

            <telerik:AjaxSetting AjaxControlID="ddlSections">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPersons" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSearchPersonel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPersons" />


                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdPersons">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPersons" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="hlPrint">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="hlPrint" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:radajaxmanager>
</asp:Content>
