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

<%@ 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 colspan="2" align="right">
                <asp:Image ID="Image1" runat="server" SkinID="imgApprovedVacation" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="CenterTD">
                <asp:Label ID="lblError" runat="server" SkinID="LblError"></asp:Label>
            </td>
        </tr>
        <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">
                <asp:DropDownList ID="ddlSections" runat="server" SkinID="ddlYellow" Width="250px"
                    AutoPostBack="True" OnSelectedIndexChanged="ddlSections_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:Button ID="btnSearchRequest" runat="server" Text="جستجو" SkinID="btnOrange"
                    OnClick="btnSearchRequest_Click" Style="height: 26px" />
            </td>
            <td class="LeftTD">
                قسمت کاری:
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                &nbsp;
            </td>
            <td class="LeftTD">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2" class="CenterTD">
                <hr style="size: 1; color: Yellow; width: 600px">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <telerik:radgrid runat="server" id="grdVacationList" skin="WebBlue" autogeneratecolumns="False"
                    gridlines="None" groupingenabled="False" font-names="Tahoma"  OnPageSizeChanged="grdVacationList_OnPageSizeChanged"                                 
                    font-size="10pt" onsortcommand="grdVacationList_SortCommand" DataSourceID="vacationODS"
                    AllowPaging="True" PageSize="20" OnPageIndexChanged="grdVacationList_OnPageIndexChanged">
                    
                    <mastertableview nodetailrecordstext="" nomasterrecordstext="اطلاعاتی برای نمایش موجود نمی باشد"
                        allowcustompaging="False" AllowCustomSorting="TRue">
        <Columns>
            <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="Name" HeaderText="نوع مرخصی" 
                UniqueName="Name" 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="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" 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="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" 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="sectionName" HeaderText="گروه" 
                UniqueName="sectionName" 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="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" />
        </clientsettings>
                </telerik:radgrid>
             <asp:ObjectDataSource runat="server" ID="vacationODS" EnablePaging="True" StartRowIndexParameterName="startRecord"
                    MaximumRowsParameterName="maxRecords" SelectCountMethod="GetCount" SelectMethod="GetVacations"
                    TypeName="Eos.WebKart.Domain.Vacation"></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="ddlSections">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdVacationList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSearchRequest">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdVacationList" />
   
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdVacationList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdVacationList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:radajaxmanager>
   
</asp:Content>
