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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="KingOf.Net.Web.UI.WebControls.PersianCalendar" Namespace="KingOf.Net.Web.UI.WebControls"
    TagPrefix="KingOfDotNet" %>
<%@ 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 align="right">
                <asp:Image ID="Image1" runat="server" SkinID="imgspesificExtraRequest" />
                <asp:Panel ID="pnlSearchHandler" runat="server">
                    <div class="searchTD">
                        <asp:Image ID="imgSearch" runat="server" ImageUrl="../App_Themes/eosMainThem/image/showSearch.png" />
                    </div>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td class="CenterTD">
                <asp:Label ID="lblError" runat="server" SkinID="LblError" EnableViewState="False"></asp:Label>
            </td>
        </tr>
        <cc1:CollapsiblePanelExtender ID="cpeSearch" runat="Server" TargetControlID="pnlSearch"
            CollapsedSize="0" ExpandedSize="110" Collapsed="True" ExpandControlID="pnlSearchHandler"
            CollapseControlID="pnlSearchHandler" AutoCollapse="False" AutoExpand="False"
            ScrollContents="False" TextLabelID="" CollapsedText="" ExpandedText="" ImageControlID="imgSearch"
            ExpandedImage="../App_Themes/eosMainThem/image/hideSearchPanel.png" CollapsedImage="../App_Themes/eosMainThem/image/showSearch.png"
            ExpandDirection="Vertical" />
        <tr>
            <td>
                <asp:Panel runat="server" ID="pnlSearch">
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="RightTD">
                                <asp:CheckBox ID="chkCanAcceptMode" runat="server" Text=" تنها مشاهده درخواست هایی که می توانم تائید کنم"
                                    Checked="true" AutoPostBack="true" OnCheckedChanged="chkCanAcceptMode_CheckedChanged" />
                            </td>
                            <td align="right">
                            </td>
                            <td class="LeftTD" valign="top">
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                                <asp:CheckBox ID="chkSearchMode" runat="server" Text="مشاهده درخواست هایی که توسط من بررسی شده است"
                                    Checked="false" AutoPostBack="true" OnCheckedChanged="chkSearchMode_CheckedChanged" />
                            </td>
                            <td class="RightTD">
                                <asp:DropDownList runat="server" Width="100px" Height="20px" ID="ddlPeriods" OnSelectedIndexChanged="ddlPeriods_SelectedIndexChanged"
                                    AutoPostBack="true">
                                    <asp:ListItem Text="تمامی دوره ها" Value="0">تمامی دوره ها </asp:ListItem>
                                    <asp:ListItem>1</asp:ListItem>
                                    <asp:ListItem>2</asp:ListItem>
                                    <asp:ListItem>3</asp:ListItem>
                                    <asp:ListItem>4</asp:ListItem>
                                    <asp:ListItem>5</asp:ListItem>
                                    <asp:ListItem>6</asp:ListItem>
                                    <asp:ListItem>7</asp:ListItem>
                                    <asp:ListItem>8</asp:ListItem>
                                    <asp:ListItem>9</asp:ListItem>
                                    <asp:ListItem>10</asp:ListItem>
                                    <asp:ListItem>11</asp:ListItem>
                                    <asp:ListItem>12</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td class="LeftTD" valign="top">
                                دوره:
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td class="RightTD">
                                <asp:DropDownList ID="ddlSections" runat="server" SkinID="ddlYellow" Width="250px"
                                    AutoPostBack="True" OnSelectedIndexChanged="ddlSections_SelectedIndexChanged">
                                </asp:DropDownList>
                            </td>
                            <td class="LeftTD">
                                قسمت کاری:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD" colspan="2">
                                <asp:DropDownList ID="ddlSerachKind" runat="server" SkinID="ddlYellow" Width="250px"
                                    AutoPostBack="True" OnSelectedIndexChanged="ddlSerachKind_SelectedIndexChanged">
                                    <asp:ListItem Value="1">درخواست های در حال پیگیری </asp:ListItem>
                                    <asp:ListItem Value="4">درخواست های برگشت خورده</asp:ListItem>
                                    <asp:ListItem Value="5">درخواست های تائید شده</asp:ListItem>
                                    <asp:ListItem Value="6">تمامی درخواست ها</asp:ListItem>
                                </asp:DropDownList>
                                &nbsp;<asp:Button ID="btnSearchRequest" runat="server" Text="جستجو" ValidationGroup="Search"
                                    SkinID="btnOrange" OnClick="btnSearchRequest_Click" Style="height: 26px" />
                            </td>
                            <td class="LeftTD">
                                نوع درخواست:
                            </td>
                        </tr>
                        <tr>
                            <td class="CenterTD" colspan="3">
                                <hr style="size: 1; color: Yellow; width: 600px" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel runat="server" Visible="false" ID="pnlExtraWorkDetail">
                    <table width="100%" cellpadding="3" cellspacing="4">
                        <tr>
                            <td class="RightTD">
                                <asp:Label ID="lblpageNo" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                شماره برگه:
                            </td>
                            <td class="RightTDltr">
                                <asp:Label ID="lblName" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                نام:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                                <asp:Label ID="lblAmount" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                مدت اضافه کار ویژه:
                            </td>
                            <td class="RightTDltr">
                                <asp:Label ID="lblBeginDate" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                &nbsp; تاریخ درخواست:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                                <asp:Label ID="lblStatus" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                وضعیت:
                            </td>
                            <td class="RightTDltr">
                                <asp:Label ID="lbllastChangeDate" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                تاریخ آخرین تغییرات:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                            </td>
                            <td class="LeftTD">
                            </td>
                            <td class="RightTDltr">
                                <asp:Label ID="lblPeriod" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                دوره:
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" class="CenterTD">
                                <hr style="size: 1px; color: Yellow; width: 600px" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" class="CenterTD">
                                <asp:Label ID="lblYear" runat="server" Text="" Visible="false"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <table width="100%" cellpadding="3" cellspacing="3">
                                    <tr>
                                        <td class="RightTD">
                                            <asp:Button ID="btnApprove" runat="server" Text="تائید درخواست" SkinID="btnOrange"
                                                OnClick="btnApprove_Click" Visible="False" />
                                        </td>
                                        <td class="LeftTD">
                                            <asp:Button ID="btnReturn" runat="server" Text="برگشت درخواست" SkinID="btnOrange"
                                                OnClick="btnReturn_Click" Visible="False" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="RightTD">
                                            <asp:Button ID="btnDelete" runat="server" Text="حذف درخواست" SkinID="btnOrange" OnClick="btnDelete_Click"
                                                Visible="False" />
                                        </td>
                                        <td class="LeftTD">
                                            <asp:Button ID="btnShowList" runat="server" Text="مشاهده لیست" SkinID="btnOrange"
                                                OnClick="btnShowList_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <telerik:RadGrid runat="server" ID="grdPageCommentList" Skin="WebBlue" AutoGenerateColumns="False"
                                    GridLines="None" AllowPaging="false" AllowSorting="false" GroupingEnabled="False"
                                    Font-Names="Tahoma" Font-Size="10pt">
                                    <MasterTableView NoDetailRecordsText="" NoMasterRecordsText="اطلاعاتی برای نمایش موجود نمی باشد"
                                        AllowCustomPaging="False">
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="comment" HeaderText="روند جریان برگه اضافه کار ویژه"
                                                UniqueName="comment">
                                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Right" />
                                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Right" />
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                    <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true"
                                        AllowAutoScrollOnDragDrop="False">
                                        <Selecting EnableDragToSelectRows="False" />
                                    </ClientSettings>
                                </telerik:RadGrid>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="left">
                <div>
                    <div style="float: left; margin-right: 3px">
                        <asp:Button ID="btnReturnAll" runat="server" Text="برگشت برگه های انتخاب شده" SkinID="btnOrangeFreeSize"
                            Visible="false" OnClick="btnReturnAll_Click" />
                    </div>
                    <div style="float: left;">
                        <asp:Button ID="btnApproveAll" runat="server" Text="تائید برگه های انتخاب شده" SkinID="btnOrangeFreeSize"
                            Visible="false" OnClick="btnApproveAll_Click" />
                    </div>
                    <div style="clear: both">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadGrid runat="server" ID="grdSpecificExtraworkList" Skin="WebBlue" AutoGenerateColumns="False"
                    GridLines="None" AllowMultiRowSelection="True" GroupingEnabled="False"
                    Font-Names="Tahoma" Font-Size="10pt" OnSortCommand="GridSortCommand" OnPageSizeChanged="GridOnPageSizeChanged"
                    OnPageIndexChanged="GridOnPageIndexChanged" AllowPaging="True" PageSize="20"
                    OnItemCreated="GridItemCreated" DataSourceID="SpecificExtraWorkODS" OnItemCommand="GridItemCommand"
                    OnItemDataBound="GridOnItemDataBound">
                    <MasterTableView NoDetailRecordsText="" DataKeyNames="PAGENO,Year" AllowCustomSorting="True"
                        NoMasterRecordsText="اطلاعاتی برای نمایش موجود نمی باشد">
                        <SortExpressions>
                            <telerik:GridSortExpression FieldName="perno" SortOrder="Ascending" />
                        </SortExpressions>
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" HeaderStyle-Width="30px"
                                ItemStyle-Width="30px">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True"
                                        runat="server"></asp:CheckBox>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True"
                                        runat="server"></asp:CheckBox>
                                </ItemTemplate>
                                <HeaderStyle Width="30px"></HeaderStyle>
                                <ItemStyle Width="30px"></ItemStyle>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="Year" HeaderText="سال" UniqueName="Year" Display="false"
                                AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Amount" HeaderText="اضافه کار ویژه" UniqueName="Amount"
                                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="Period" HeaderText="دوره/ماه" UniqueName="Period"
                                AllowSorting="false">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RecDate" HeaderText="تاریخ درخواست" UniqueName="RecDate"
                                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="Statustype" HeaderText="وضعیت" UniqueName="Statustype"
                                AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn Display="False" DataField="Status" HeaderText="وضعیت" UniqueName="Status"
                                AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn Display="False" DataField="section" HeaderText="قسمت" UniqueName="Section"
                                AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn Display="True" DataField="SectionName" HeaderText="قسمت"
                                UniqueName="SectionName" AllowSorting="False">
                                <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="ن خ و نام" HeaderTooltip="نام و نام خانوادگی"
                                UniqueName="personName" 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="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>
                            <telerik:GridBoundColumn DataField="PAGENO" HeaderText="ش.ب" UniqueName="PAGENO"
                                Display="false" AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true"
                        AllowAutoScrollOnDragDrop="False">
                        <Selecting EnableDragToSelectRows="False" AllowRowSelect="True" />
                    </ClientSettings>
                </telerik:RadGrid>
                <asp:ObjectDataSource runat="server" ID="SpecificExtraWorkODS" EnablePaging="True"
                    StartRowIndexParameterName="startRecord" MaximumRowsParameterName="maxRecords"
                    SelectCountMethod="GetCount" SelectMethod="GetSpecificExtraWork" TypeName="Eos.WebKart.Domain.EspecificExtraWork">
                </asp:ObjectDataSource>
            </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="chkSearchMode">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlSections">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlSerachKind">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSearchRequest">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnApprove">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnReturn">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnApproveAll">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnReturnAll" />
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnReturnAll">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                    <telerik:AjaxUpdatedControl ControlID="grdSpecificExtraworkList" />
                    <telerik:AjaxUpdatedControl ControlID="btnApproveAll" />
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdSpecificExtraworkList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="pnlExtraWorkDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
