<%@ Page Title="" Language="C#" MasterPageFile="~/eosWinkartWeb/eosWinkartWeb.Master" AutoEventWireup="true" CodeBehind="ViewPersonExtraWork.aspx.cs" Inherits="WebKart.eosWinkartWeb.ViewPersonExtraWork" %>
<%@ 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" %>
<%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="shortcut icon" href="../App_Themes/eosMainThem/icons/flag_blue.ico" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
<table width="100%">
<tr>
<td align="right">
<asp:Image ID="Image1" runat="server" SkinID="imgExtraWorkByPerson" />
    <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"></asp:Label> 
</td>
</tr>

<cc1:CollapsiblePanelExtender ID="cpeSearch" runat="Server"
    TargetControlID="pnlSearch"
    CollapsedSize="0"
    ExpandedSize="130"
    ExpandControlID="pnlSearchHandler"
    CollapseControlID="pnlSearchHandler"
    AutoCollapse="False"
    AutoExpand="True"
    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 align="right" >
   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtbeginDate" Display="Dynamic"
        ErrorMessage=".تاریخ را صحیح وارد نمایید" ValidationExpression="\d\d\d\d[/](((0[1-6])[/](0[1-9]|[12][0-9]|3[01]))|((0[7-9]|1[012])[/](0[1-9]|[12][0-9]|3[0])))"
        ValidationGroup="dd"  Font-Names="tahoma" Font-Size="8pt"></asp:RegularExpressionValidator>
   
   <asp:TextBox ID="txtbeginDate" runat="server" Width="100px"></asp:TextBox>
   
   <cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" AutoComplete="false"
           Mask="9999/99/99" MaskType="Date" TargetControlID="txtbeginDate">
       </cc1:MaskedEditExtender>
   <cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="txtbeginDate"
        PopupControlID="pnlBeginDate" Position="Bottom"></cc1:PopupControlExtender>
   <asp:Panel runat="server" ID="pnlBeginDate">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
     <KingOfDotNet:PersianCalendar ID="beginDateCalander" runat="server"
              OnSelectionChanged="beginDateCalander_SelectionChanged">
    </KingOfDotNet:PersianCalendar>
    </ContentTemplate>
    </asp:UpdatePanel>
        </asp:Panel>
    </td>
<td class="LeftTD" valign="top">از تاریخ:
</td> 
</tr>
<tr>

<td align="right">
   <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEndDate" Display="Dynamic"
        ErrorMessage=".تاریخ را صحیح وارد نمایید" ValidationExpression="\d\d\d\d[/](((0[1-6])[/](0[1-9]|[12][0-9]|3[01]))|((0[7-9]|1[012])[/](0[1-9]|[12][0-9]|3[0])))"
        ValidationGroup="dd" Font-Names="tahoma" Font-Size="8pt"></asp:RegularExpressionValidator>
  
   <asp:TextBox ID="txtEndDate" runat="server"  Width="100px"></asp:TextBox>
   
   <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" AutoComplete="false"
           Mask="9999/99/99" MaskType="Date" TargetControlID="txtEndDate">
       </cc1:MaskedEditExtender>
   <cc1:PopupControlExtender ID="PopupControlExtender2" runat="server" TargetControlID="txtEndDate"
        PopupControlID="pnlEndDate" Position="Bottom"></cc1:PopupControlExtender>
   <asp:Panel runat="server" ID="pnlEndDate">
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>
     <KingOfDotNet:PersianCalendar ID="endDateCalander" runat="server" 
              OnSelectionChanged="endDateCalander_SelectionChanged" NextPrevStyle-ForeColor="White" >
    </KingOfDotNet:PersianCalendar>
    </ContentTemplate>
    </asp:UpdatePanel>
    </asp:Panel>
   
    </td>
<td  class="LeftTD" valign="top">تا تاریخ:</td> 
</tr>
<tr>
<td class="RightTD" style="width:500px">
    <telerik:radcombobox
                 ID="ddlPersons" runat="server"
                 Width="280px" Height="140px"
                 EmptyMessage="نام خانوادگی پرسنل مورد نظررا وارد کنید"
                  DataTextField="PersonName" DataValueField="perno"
                   AllowCustomText="True" 
                    Font-Names="Tahoma" Font-Size="10pt" MarkFirstMatch="True" 
                     Skin="Vista" ItemRequestTimeout="5000" 
        LoadingMessage="در حال بارگذاری..." ShowMoreResultsBox="false" Sort="Ascending" 
                    >
             </telerik:radcombobox></td>
<td class="LeftTD"  style="width:250px">انتخاب پرسنل بر اساس نام:</td>
</tr>
<tr>
<td class="RightTD" style="width:500px">
    <asp:TextBox ID="txtPerno" runat="server" Width="165px" ></asp:TextBox>
    &nbsp;</td>
<td class="LeftTD"  style="width:250px">انتخاب پرسنل بر اساس شماره پرسنلی:</td>
</tr>

<tr>
 
            <td class="RightTD" >
                <asp:DropDownList ID="ddlSerachKind" runat="server" SkinID="ddlYellow" 
                    Width="250px"  
>
                   <asp:ListItem  Value="1">درخواست های جدید یا در حال پیگیری </asp:ListItem>
                    <asp:ListItem Value="3">درخواست های پذیرفته نشده</asp:ListItem>
                    <asp:ListItem Value="4">درخواست های برگشت خورده</asp:ListItem>
                    <asp:ListItem Value="5">درخواست های تائید شده</asp:ListItem>
                    <asp:ListItem Value="6">تمامی درخواست ها</asp:ListItem>
                    <asp:ListItem Value="7">درخواست های در حالت تعلیق</asp:ListItem>
                </asp:DropDownList>
                &nbsp;<asp:Button ID="btnSearchRequest" runat="server" Text="جستجو" 
                    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>
   <telerik:RadGrid runat="server" ID="grdExtraWorkList" Skin="WebBlue" 
        AutoGenerateColumns="False" GridLines="None" onsortcommand="grdExtraWorkList_SortCommand"
        AllowSorting="True" GroupingEnabled="False" Font-Names="Tahoma" Font-Size="10pt" 
         >
    <MasterTableView NoDetailRecordsText="" 
        NoMasterRecordsText="اطلاعاتی برای نمایش موجود نمی باشد" 
        AllowCustomPaging="False">
        <Columns>
           <telerik:GridBoundColumn DataField="Year" HeaderText="سال" 
                UniqueName="Year" AllowSorting="true" Visible="false">
 
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="statusType" HeaderText="وضعیت" 
                UniqueName="statusType" 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="requestDate" HeaderText="تاریخ درخواست" 
                UniqueName="requestDate" 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="ENDTIME" HeaderText="ساعت پایان" 
                UniqueName="ENDTIME" 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="ENDDATE" HeaderText="تاریخ پایان" 
                UniqueName="ENDDATE">
                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="BEGINTIME" HeaderText="ساعت شروع" 
                UniqueName="BEGINTIME" 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="BEGINDATE" HeaderText="تاریخ شروع" 
                UniqueName="BEGINDATE">
                <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" AllowSorting="true" Visible="false">
              </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DBKIND" HeaderText="" 
                UniqueName="DBKIND" AllowSorting="true" Visible="false">
            </telerik:GridBoundColumn>
              <telerik:GridBoundColumn DataField="Year" HeaderText="" 
                UniqueName="Year" AllowSorting="true" Visible="false">
            </telerik:GridBoundColumn>
 
        </Columns>
    </MasterTableView>
   <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="True" 
            EnablePostBackOnRowClick="true" AllowAutoScrollOnDragDrop="False">
   <Selecting EnableDragToSelectRows="False" />
   <Scrolling AllowScroll="True" ScrollHeight="300px" UseStaticHeaders="true"  />
        </ClientSettings>
      
</telerik:RadGrid>
</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="ddlSerachKind">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdExtraWorkList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSearchRequest">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdExtraWorkList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="grdExtraWorkList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdExtraWorkList" />
                </UpdatedControls>
            </telerik:AjaxSetting>

        </AjaxSettings>
    </telerik:RadAjaxManager>
    
</asp:Content>

