<%@ page language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" inherits="Master_TA_UI_Master_PunchTypes_Add, App_Web_vkrurviw" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="conPunchTypesAdd" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
 <![endif]-->
    <script type="text/javascript">
        $(document).ready(function () {
            $('#ctl00_BodyContentPH_ddl_TerminalId').change(function () {
                //alert($(this).val());
                debugger;
                document.getElementById('ctl00_BodyContentPH_txt_Value').value = $("#ctl00_BodyContentPH_ddl_TerminalId option:selected").text();
            });
        });
    </script>
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/punch-type.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <asp:UpdatePanel ID="upLeave" runat="server">
            <ContentTemplate>
                <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                    <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                        <div class="InsideProgressBar">
                            <div class="row" style="margin-top: 10px">
                                <img src="../dist/img/logo-Progress.png" />
                            </div>
                            <div class="row" style="min-width: 280px">
                                <img src="../dist/img/default.gif" style="width: 100px" />
                            </div>
                            <div class="row" style="margin-bottom: 10px">
                                <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                    Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <asp:HiddenField ID="hdnProgress" runat="server" />
                <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                    BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                </cc1:ModalPopupExtender>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_man" runat="server"></asp:Label>
                                (3 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_TerminalId" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_TerminalId" runat="server" CssClass="form-control select2 Man-dat"
                                    AppendDataBoundItems="True">
                                    <asp:ListItem Value="-Select-" Text="-Select-"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddl_TerminalId"
                                    InitialValue="-Select-" SetFocusOnError="True" Display="None">*
                                </asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_PunchTypes" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:DropDownList ID="ddl_PunchTypes" runat="server" CssClass="form-control select2">
                                    <asp:ListItem Selected="True" Value="-Select-" Text="-Select-"></asp:ListItem>
                                    <asp:ListItem Value="In" Text="In"></asp:ListItem>
                                    <asp:ListItem Value="Out" Text="Out"></asp:ListItem>
                                    <asp:ListItem Value="Shift In" Text="BreakFast In"></asp:ListItem>
                                    <asp:ListItem Value="Shift Out" Text="BreakFast Out"></asp:ListItem>
                                    <asp:ListItem Value="Break In" Text="Snacks In"></asp:ListItem>
                                    <asp:ListItem Value="Break Out" Text="Snacks Out"></asp:ListItem>
                                    <asp:ListItem Value="Lunch In" Text="Tea Out"></asp:ListItem>
                                    <asp:ListItem Value="Lunch Out" Text="Tea In"></asp:ListItem>
                                    <asp:ListItem Value="In Duty" Text="In Duty"></asp:ListItem>
                                    <asp:ListItem Value="Out Duty" Text="Out Duty"></asp:ListItem>
                                    <asp:ListItem Value="Official In" Text="Official In"></asp:ListItem>
                                    <asp:ListItem Value="Official Out" Text="Official Out"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddl_PunchTypes"
                                    InitialValue="-Select-" SetFocusOnError="True" Display="None">*</asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_Value" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txt_Value" runat="server" CssClass="form-control man-dat"
                                    MaxLength="25" onkeypress="return chkPunchTypeNums(event,this);" onkeyup="return chkMaxLen(event,this,25,MaxLength);"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_Value"
                                    SetFocusOnError="True" Display="none">*</asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-5">
                                <div class="pull-right-button">
                                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="Insert_InoutDetails"
                                        SelectMethod="Select_Inoutdetails" TypeName="InOutEventdata"></asp:ObjectDataSource>
                                    <asp:ValidationSummary ID="Val_Leave" EnableClientScript="true" ShowMessageBox="true"
                                        ShowSummary="false" runat="server" />
                                    <asp:LinkButton ID="btn_add" CssClass="btn save-btn fa-floppy-o" runat="server" OnClick="btn_add_Click"></asp:LinkButton>
                                    <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                        CausesValidation="False" OnClick="btn_Cancel_Click"></asp:LinkButton>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="callout callout-info" style="margin-bottom: 0!important;">
                                    <asp:Label ID="lblImportNote" runat="server"></asp:Label>
                                </div>
                                <br />
                                <ul>
                                    <li>
                                        <asp:Label ID="lblnotes1" runat="server" Text="If you are not press any keys in device before marking the punch, select In / Shift In Punch Type and mention the Punch Type Value as Terminal Id"></asp:Label>
                                    </li>
                                    <br />
                                    <li>
                                        <asp:Label ID="lblnotes2" runat="server" Text="<B>For example</B>: Terminal Id is 159753 means, mention the same value into Punch Type Value field. i.e 159753"></asp:Label>
                                    </li>
                                    <br />
                                    <li>
                                        <asp:Label ID="Label1" runat="server" Text="For handling freescan logic, you need to create only one punch type in timecheck software. Dont create more than one punch type."></asp:Label>
                                    </li><br />
                                    <li>
                                        <asp:Label ID="Label3" runat="server" Text="Timecheck support two different cases of freescan logic,"></asp:Label>
                                    </li>
                                    <br />
                                    <li>
                                        <asp:Label ID="Label2" runat="server" Text="In Entrance master if you defined both in and out device are different,then the software will consider all punches of In Device as In and all punches of Out device as Out"></asp:Label>
                                    </li>
                                    <li>
                                        <asp:Label ID="Label4" runat="server" Text="If you defined both In and Out device as same, then the system will consider all Odd punches of device as In and even punches as Out."></asp:Label>
                                    </li>                                    
                                    ***************************************************************************************************************************************************
                                    <li>
                                        <asp:Label ID="lblnotes3" runat="server" Text="If you press any keys in device before marking the punch means, select proper Punch Type and mention the Punch Type Value compare with your device application. Please remove the loaded default value"></asp:Label>
                                    </li>

                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        var MaxLength = "Maximum length is ";
        function MaxLengthh(maxLength) {
            MaxLength = maxLength;
        }
        // Accepts only Numbers and Dot (.) without white spaces inbetween // Accept Decimal Numbers
        function chkPunchTypeNums(e, obj) {
            if (!e) e = window.event;
            var c = (window.event) ? e.keyCode : e.which;
            if ((c >= 48 && c <= 57) || c == 0 || c == 8 || c == 13 || c == 9 || c == 8 || c == 9 || c == 13 || c == 0 || c > 60000 || c == 127 || c == 39)
                return true;
            else
                return false;
        }
    </script>

</asp:Content>
