<%@ Page Title="" Language="C#" MasterPageFile="~/eosWinkartWeb/eosWinkartWeb.Master" AutoEventWireup="true" CodeBehind="approvedMission.aspx.cs" Inherits="WebKart.eosWinkartWeb.approvedMission" %>
<%@ 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="imgApprovedMission" />
</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 colspan="2" class="CenterTD">
<hr style="size:1;color:Yellow;width:600px">
</td>
</tr>

<tr>
<td colspan="2">
  <telerik:RadGrid runat="server" ID="grdMissionList" Skin="WebBlue" 
        AutoGenerateColumns="False" GridLines="None"  
        
        GroupingEnabled="False" Font-Names="Tahoma" Font-Size="10pt" 
        onsortcommand="grdMissionList_SortCommand"
        OnPageSizeChanged="grdMissionList_OnPageSizeChanged"                                 
                    OnPageIndexChanged="grdMissionList_OnPageIndexChanged" AllowPaging="True" PageSize="20" DataSourceID="missionODS">
    
    <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="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="missionODS" EnablePaging="True" StartRowIndexParameterName="startRecord"
                    MaximumRowsParameterName="maxRecords" SelectCountMethod="GetCount" SelectMethod="GetMissions"
                    TypeName="Eos.WebKart.Domain.Mission"></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="grdMissionList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSearchRequest">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdMissionList" />
   
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdMissionList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdMissionList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
  
</asp:Content>


