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

<%@ 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">
   
    <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel1" runat="server" skin="Default"
        initialdelaytime="2" mindisplaytime="100" width="184px">
    </telerik:radajaxloadingpanel>
    <telerik:radajaxpanel id="rpnlAjax" runat="server" loadingpanelid="RadAjaxLoadingPanel1">
        <table width="100%">
            <tr>
                <td colspan="2" align="right">
                    <asp:Image ID="Image1" runat="server" SkinID="imgApprovedExtraWork" />
                </td>
            </tr>
            <tr>
                <td colspan="2" class="CenterTD">
                    <asp:Label ID="lblError" runat="server" SkinID="LblError" EnableViewState="False"></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="Report" 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">
                        <KingOfDotNet:PersianCalendar ID="beginDateCalander" runat="server" OnSelectionChanged="beginDateCalander_SelectionChanged">
                        </KingOfDotNet:PersianCalendar>
                    </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="Report" 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">
                        <KingOfDotNet:PersianCalendar ID="endDateCalander" runat="server" OnSelectionChanged="endDateCalander_SelectionChanged"
                            NextPrevStyle-ForeColor="White">
                        </KingOfDotNet:PersianCalendar>
                    </asp:Panel>
                </td>
                <td class="LeftTD" valign="top">
                    تا تاریخ:
                </td>
            </tr>
            <tr>
                <td class="RightTD">
                    <asp:DropDownList ID="ddlSections" runat="server" SkinID="ddlYellow" Width="250px">
                    </asp:DropDownList>
<%--                    <asp:RequiredFieldValidator ID="rfvSections" runat="server" ControlToValidate="ddlSections"
                        Display="Dynamic" Text="یک قسمت را انتخاب نمایید." InitialValue="0" ValidationGroup="Report"></asp:RequiredFieldValidator>--%>
                </td>
                <td class="LeftTD" style="width: 250px">
                    قسمت کاری:
                </td>
            </tr>
            <tr>
                <td class="RightTD">
                    <asp:Button ID="btnSearchRequest" runat="server" Text="جستجو" SkinID="btnOrange"
                        OnClick="btnSearchRequest_Click" Style="height: 26px" ValidationGroup="Report" />
                </td>
                <td class="LeftTD" style="width: 250px">
                </td>
            </tr>
        </table>
        <p>
        </p>
        <telerik:radgrid runat="server" id="grdExtraReqList" dir="rtl" onneeddatasource="grdExtraReqList_NeedDataSource"
            onitemcreated="grdExtraReqList_ItemCreated" visible="True" OnSortCommand="grdExtraReqList_OnSortCommand"
            OnPageSizeChanged="grdExtraReqList_OnPageSizeChanged"                                 
                    OnPageIndexChanged="grdExtraReqList_OnPageIndexChanged" AllowPaging="True" PageSize="20" DataSourceID="extraODS">
            <mastertableview hierarchydefaultexpanded="false" hierarchyloadmode="Client"  AllowCustomSorting="True">
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="PERNO" HeaderText="شماره پرسنلی" AllowSorting="True" />
                    <telerik:GridBoundColumn DataField="personName" HeaderText="نام خانوادگی و نام"  AllowSorting="True"/>
                    <telerik:GridBoundColumn DataField="BEGINDATE" HeaderText="تاریخ" AllowSorting="True" />
                    <telerik:GridBoundColumn DataField="BEGINTIME" HeaderText="ساعت شروع" AllowSorting="False"/>
                    <telerik:GridBoundColumn DataField="ENDTIME" HeaderText="ساعت پایان" AllowSorting="False" />
                    <telerik:GridBoundColumn DataField="requestDate" HeaderText="تاریخ ثبت" AllowSorting="False"/>
                    <telerik:GridBoundColumn DataField="statusType" HeaderText="وضعیت" AllowSorting="False"/>
                    <telerik:GridBoundColumn DataField="pageNo" Display="false" AllowSorting="False" />
                    <telerik:GridBoundColumn DataField="Year" Display="false" AllowSorting="False"/>
                </Columns>
                <NestedViewTemplate>
                    <table width="95%" cellpadding="3" cellspacing="4" style="background-color: #ADADAD;
                        font-family: Tahoma; font-size: 10pt; margin: 0 auto; text-align: right; direction: rtl;">
                        <tr>
                            <td>
                                نام:
                            </td>
                            <td>
                                <asp:Label ID="lblName" runat="server"></asp:Label>
                            </td>
                            <td>
                                شماره برگه:
                            </td>
                            <td>
                                <asp:Label ID="lblpageNo" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                تاریخ درخواست:
                            </td>
                            <td>
                                <asp:Label ID="lblRegDate" runat="server"></asp:Label>
                            </td>
                            <td>
                                درخواست برای تاریخ:
                            </td>
                            <td>
                                <asp:Label ID="lblDate" runat="server" Font-Bold="true"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ساعت پایان:
                            </td>
                            <td>
                                <asp:Label ID="lblEndTime" runat="server" Font-Bold="true"></asp:Label>
                            </td>
                            <td>
                                ساعت شروع:
                            </td>
                            <td>
                                <asp:Label ID="lblBeginTime" runat="server" Font-Bold="true"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                نوع درخواست:
                            </td>
                            <td>
                                <asp:Label ID="lblRequestType" runat="server"></asp:Label>
                            </td>
                            <td>
                                تاریخ آخرین تغییرات:
                            </td>
                            <td>
                                <asp:Label ID="lbllastChangeDate" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table cellpadding="3" cellspacing="4" style="background-color: #ADADAD; font-family: Tahoma;
                        font-size: 10pt; margin: 0 auto; text-align: right; direction: rtl;" width="95%">
                        <tr>
                            <td>
                                وضعیت:
                            </td>
                            <td>
                                <asp:Label ID="lblStatus" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                توضیحات:
                            </td>
                            <td>
                                <asp:Label ID="lblDesc" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table cellpadding="3" cellspacing="4" style="background-color: #ADADAD; font-family: Tahoma;
                        font-size: 10pt; margin: 0 auto; text-align: right; direction: rtl;" width="95%">
                        <tr>
                            <td>
                                <asp:Label ID="lblpersonelList" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </NestedViewTemplate>
            </mastertableview>
        </telerik:radgrid>
   
                <asp:ObjectDataSource runat="server" ID="extraODS" EnablePaging="True" StartRowIndexParameterName="startRecord"
                    MaximumRowsParameterName="maxRecords" SelectCountMethod="GetCount" SelectMethod="GetExtraWorks"
                    TypeName="Eos.WebKart.Domain.ExtraWork"></asp:ObjectDataSource>
    </telerik:radajaxpanel>
 
</asp:Content>
