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

<%@ 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 Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="InnerTablewithAllBorder" width="100%">
        <tr>
            <td colspan="2" class="CenterTD">
                <asp:Label ID="lblError" runat="server" Text="" SkinID="LblError"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="RightTD" colspan="2">
                مشاهده کارکرد روزانه :: لطفا بازه تاریخی مورد نظر را انتخاب کنید
                <br />
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 600px">
                <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:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtbeginDate"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                <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 style="width: 250px" class="LeftTD" valign="top">
                از تاریخ:
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 600px">
                <asp:Button ID="btnSubmit" runat="server" Text="مشاهده" SkinID="btnOrange" OnClick="btnSubmit_Click" />
                <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:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEndDate"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                <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">
                            </KingOfDotNet:PersianCalendar>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
            </td>
            <td style="width: 250px" class="LeftTD" valign="top">
                تا تاریخ:
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="100%">
                    <tr>
                        <td class="CenterTD" style="background-color: #6b8e23; width: 50%">
                            روز های تعطیل رسمی یا تعطیل توافقی
                        </td>
                        <td class="CenterTD" style="background-color: #f08080; width: 50%">
                            غیبت
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <telerik:RadGrid runat="server" ID="grdWorkDetail" Skin="WebBlue" AutoGenerateColumns="False"
                    GridLines="None" OnItemCommand="grdWorkDetail_ItemCommand" AllowSorting="True"
                    ShowStatusBar="True" Font-Names="Tahoma" Font-Size="10pt" 
                    OnSortCommand="grdWorkDetail_SortCommand" 
                    onitemdatabound="grdWorkDetail_ItemDataBound">
                    <MasterTableView NoMasterRecordsText="اطلاعاتی برای نمایش موجود نمی باشد" DataKeyNames="DDATE">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="HOLIDAY" HeaderText="میزان حضور" UniqueName="HOLIDAY" Visible="False">
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn DataField="HOLIDAY" HeaderText="میزان حضور" UniqueName="HOLIDAY" Visible="False">
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="WORKTOTAL" HeaderText="میزان حضور" UniqueName="WORKTOTAL">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="MISSION" HeaderText="ماموریت" UniqueName="MISSION">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Morakhasi" HeaderText="مرخصی" UniqueName="Morakhasi">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EXTRAWORKTOTAL" HeaderText="کل اضافه کار" UniqueName="EXTRAWORKTOTAL"
                                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="totalKasrKar" HeaderText=" کل کسر کار" UniqueName="totalKasrKar"
                                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="dayName" HeaderText="روز هفته" UniqueName="dayName">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DDATE" HeaderText="تاریخ" UniqueName="DDATE"
                                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>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="CenterTD">
                <asp:Panel ID="pnlTotal" runat="server" Visible="false">
                    <table width="100%" cellpadding="3" cellspacing="4">
                        <tr>
                            <td colspan="4" class="RightTD">
                                <asp:Image ID="imgKarkarddetail" SkinID="imgKholaseEtelaat" runat="server" />
                                <hr style="size: 1; color: Yellow; width: 80%" />
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD" style="width: 150px">
                                <asp:Label ID="lblTotalWork" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD" style="width: 200px">
                                جمع کل کارکرد:
                            </td>
                            <td class="RightTD" style="width: 150px">
                                <asp:Label ID="lblSelectedDay" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD" style="width: 200px">
                                تعداد روز انتخاب شده:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                                <asp:Label ID="lblTotalEzafeKar" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                جمع کل اضافه کار:
                            </td>
                            <td class="RightTD">
                                <asp:Label ID="lblTotalKasrKar" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                جمع کل کسر کار:
                            </td>
                        </tr>
                        <tr>
                            <td class="RightTD">
                                <asp:Label ID="lblTotalMission" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                جمع کل ماموریت ها:
                            </td>
                            <td class="RightTD">
                                <asp:Label ID="lblTotalMorakhasi" runat="server" Text=""></asp:Label>
                            </td>
                            <td class="LeftTD">
                                جمع کل مرخصی ها:
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td align="left" colspan="2">
                <asp:HyperLink runat="server" ImageUrl="~/App_Themes/eosMainThem/icons/45491.png"
                    ID="hlPrint" Target="_blank" Visible="false"></asp:HyperLink>
                <br />
                <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="btnSubmit">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="lblError" />
                                <telerik:AjaxUpdatedControl ControlID="grdWorkDetail" />
                                <telerik:AjaxUpdatedControl ControlID="pnlTotal" />
                                <telerik:AjaxUpdatedControl ControlID="hlPrint" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="grdWorkDetail">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdWorkDetail" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="pnlTotal">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="pnlTotal" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
            </td>
        </tr>
    </table>
</asp:Content>
