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

<%@ 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">
    <table width="100%">
        <tr>
            <td class="CenterTD">
                <asp:Label ID="lblMsg" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="CenterTD">
                <hr style="color: Yellow; width: 500px" />
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <asp:Label ID="lblChangeMsg" runat="server" Text="" Style="color: red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel runat="server" ID="pnlSections">
                    <table width="100%">
                        <tr>
                            <td class="RightTD">
                                <asp:DropDownList ID="ddlSections" runat="server" SkinID="ddlYellow" Width="400px"
                                    AutoPostBack="True" OnSelectedIndexChanged="SectionsSelectedIndexChanged">
                                </asp:DropDownList>
                            </td>
                            <td class="LeftTD" style="width: 250px">
                                قسمت:
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="CenterTD">
                <hr style="color: Yellow; width: 500px" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel runat="server" ID="Panel2">
                    <table width="100%">
                        <tr>
                            <td class="RightTD">
                                <asp:DropDownList ID="ddlZone" runat="server" SkinID="ddlYellow" Width="400px" AutoPostBack="True"
                                    OnSelectedIndexChanged="ZonesSelectedIndexChanged" DataValueField="ID" DataTextField="Name" >
                                </asp:DropDownList>
                            </td>
                            <td class="LeftTD" style="width: 250px">
                                 گروهبندی گزارشات:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD" colspan="2">
                                <br/>
                                <asp:CheckBoxList ID="chkReport" runat="server" DataTextField="ReportName" DataValueField="ID"
                                    RepeatColumns="3" RepeatDirection="Vertical" Width="100%">
                                </asp:CheckBoxList>
                                <br />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td class="CenterTD">
                <hr style="color: Yellow; width: 500px" />
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <telerik:RadGrid ID="grdPersonel" runat="server" AutoGenerateColumns="False" AllowMultiRowSelection="True" dir="rtl" OnNeedDataSource="PersonelNeedDataSource" Visible="False"
                    OnItemCommand="PersonelItemCommand" GridLines="None">
                    <MasterTableView DataKeyNames="PerNo" GroupLoadMode="Client" GroupsDefaultExpanded="true"
                        AllowSorting="False">
                        <Columns>
                            <telerik:GridClientSelectColumn DataTextField="PersonName" HeaderText="نام پرسنل">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridBoundColumn DataField="PerNo" HeaderText="کد پرسنل">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="PersonName" HeaderText="نام پرسنل">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true"
                        AllowAutoScrollOnDragDrop="False">
                        <Selecting EnableDragToSelectRows="False" AllowRowSelect="True" />
                    </ClientSettings>
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td class="LeftTD">
                <asp:Button ID="btnSetPermission" runat="server" Text="ثبت دسترسی ها" OnClick="SetPermissionClick"
                    SkinID="btnOrange" />
                    <asp:Button ID="btnDeletePermission" runat="server" Text="حذف دسترسی ها" OnClick="DeletePermissionClick"
                    SkinID="btnOrange" />
            </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="grdPersonel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="chkReport" />
                     <telerik:AjaxUpdatedControl ControlID="ddlZone" />
                     <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlSections">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPersonel" />
                    <telerik:AjaxUpdatedControl ControlID="chkReport" />
                     <telerik:AjaxUpdatedControl ControlID="ddlZone" />
                     <telerik:AjaxUpdatedControl ControlID="chkResetAll" />
                     <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlZone">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="chkReport" />
                    <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="DeletePermissionClick">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="SetPermissionClick">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
