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

<%@ 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" %>
<%@ Register Src="../ASCX/WorkCalendar.ascx" TagName="WorkCalendar" TagPrefix="uc1" %>
<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="imgIoRequestLabel" />
            </td>
        </tr>
        <tr>
            <td colspan="2" class="CenterTD">
                <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" 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="RequiredFieldValidator3" runat="server" ControlToValidate="txtbeginDate"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                <asp:TextBox ID="txtbeginDate" runat="server" Width="100px"></asp:TextBox>
                <cc1:MaskedEditExtender ID="MaskedEditExtender3" 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"
                                NextPrevStyle-ForeColor="White">
                            </KingOfDotNet:PersianCalendar>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
            </td>
            <td class="LeftTD" valign="top">
                تاریخ:
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtBeginTime"
                    Font-Names="Tahoma" Font-Size="8pt" ErrorMessage="ساعت را صحیح وارد نمایید" ValidationExpression="(0[0-9]|[1][0-9]|[2][0123])[:](0[0-9]|[1-5][0-9])"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*"
                    ControlToValidate="txtBeginTime"></asp:RequiredFieldValidator>
                <asp:TextBox ID="txtBeginTime" runat="server" Width="100px"></asp:TextBox>
                <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtBeginTime"
                    AutoComplete="false" MaskType="Time" Mask="99:99">
                </cc1:MaskedEditExtender>
            </td>
            <td class="LeftTD">
                ساعت :
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <asp:RadioButtonList ID="rdbIO" runat="server" Font-Names="Tahoma" Font-Size="10pt"
                    RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <asp:ListItem Value="1" Selected="True">ورود</asp:ListItem>
                    <asp:ListItem Value="2">خروج</asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td class="LeftTD">
                نوع :
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <telerik:RadComboBox DropDownWidth="250" EmptyMessage="دستگاه ساعت را انتخاب نمایید."
                    Filter="StartsWith" HighlightTemplatedItems="true" ID="cmbClocks" runat="server"
                    Width="250" AllowCustomText="False" ShowDropDownOnTextboxClick="True" OpenDropDownOnLoad="true"
                    ChangeTextOnKeyBoardNavigation="True" CloseDropDownOnBlur="True" EnableTextSelection="False"
                    Visible="false">
                    <HeaderTemplate>
                        <table cellpadding="0" cellspacing="0" style="width: 230px; text-align: center;">
                            <tr>
                                <td style="width: 150px;">
                                    نام ساعت
                                </td>
                                <td style="width: 80px;">
                                    شماره دستگاه
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table cellpadding="0" cellspacing="0" style="width: 230px; text-align: center;">
                            <tr>
                                <td style="width: 150px; text-align: right;">
                                    <%# DataBinder.Eval(Container, "Text")%>
                                </td>
                                <td style="width: 80px;">
                                    <%# DataBinder.Eval(Container, "Attributes['MachineNo']")%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </telerik:RadComboBox>
                <asp:RequiredFieldValidator ID="rfvClock" runat="server" ErrorMessage="*" ControlToValidate="cmbClocks"></asp:RequiredFieldValidator>
            </td>
            <td class="LeftTD">
                <asp:Literal runat="server" ID="ltrClock" Text="دستگاه ساعت:" Visible="false"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="RightTD">
                <asp:TextBox ID="txtDescript" runat="server" Width="400px" TextMode="MultiLine"></asp:TextBox>
            </td>
            <td class="LeftTD">
                توضیحات / دلیل:
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="ثبت" SkinID="btnOrange" OnClick="btnSubmit_Click" />
                &nbsp;
                <asp:Button ID="btnIOIndo" runat="server" Text="ورود و خروج بازه" SkinID="btnOrange"
                    OnClick="btnIOIndo_Click" CausesValidation="False" />
                &nbsp;
                <asp:Button ID="btnWorkCalendar" runat="server" Text="تقویم کاری" SkinID="btnOrange"
                    OnClick="btnWorkCalendar_Click" CausesValidation="False" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <telerik:RadGrid runat="server" ID="grdIODump" Skin="WebBlue" AutoGenerateColumns="False"
                    GridLines="None" AllowCustomPaging="false" AllowPaging="false" AllowSorting="false"
                    GroupingEnabled="False" Font-Names="Tahoma" Font-Size="10pt">
                    <MasterTableView NoDetailRecordsText="" NoMasterRecordsText="اطلاعاتی برای نمایش موجود نمی باشد"
                        AllowCustomPaging="False">
                        <Columns>
                            <telerik:GridBoundColumn DataField="Io_Type" HeaderText="ورود/خروج" UniqueName="Io_Type"
                                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="ClockTime" HeaderText="ساعت" UniqueName="ClockTime">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ClockDate" HeaderText="تاریخ" UniqueName="ClockDate">
                                <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"
                                AllowSorting="False">
                                <HeaderStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                                <ItemStyle Font-Names="Tahoma" Font-Size="10pt" HorizontalAlign="Center" />
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>
    <uc1:WorkCalendar ID="workCalendar" runat="server" Visible="false" />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSubmit">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnIOIndo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblError" />
                    <telerik:AjaxUpdatedControl ControlID="grdIODump" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnWorkCalendar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="workCalendar" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
  
</asp:Content>
