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

<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
<![endif]-->
    <link rel="stylesheet" href="../css/ProgressBar.css" type="text/css" media="all" />

    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

    <script src="../plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>

    <!-- Bootstrap 3.3.5 -->
    <!-- InputMask -->

    <script src="../plugins/input-mask/jquery.inputmask.js"></script>

    <script src="../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>

    <script src="../plugins/input-mask/jquery.inputmask.extensions.js"></script>

    <script>

        $(function () {
            $('#ctl00_BodyContentPH_txtFromDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });
        $(function () {
            $('#ctl00_BodyContentPH_txtToDate').datetimepicker({ format: document.getElementById('ctl00_BodyContentPH_Hidden1').value }
            );
        });

    </script>

    <script>
        function navi(loc) {
            document.getElementById('ctl00_BodyContentPH_iframePopup').src = loc;
            return false;
        }
        function DynamicDatePicker(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: Format });
        }
        function DynamicDatePickerForTime(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: Format });
        }
    </script>

    <script language="javascript" src="../js/Discrepancy.js" type="text/javascript"></script>

    <script language="javascript" src="../js/chkbox_delete.js" type="text/javascript"></script>

    <script language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">


        //values for check date
        var Monthfourdigit = 'Please enter valid date as month, day, and four digit year : Format MM/dd/yyyy.';
        //Adding this line var Datefourdigit='Please enter valid date with correct format dd/MM/yyyy'; as newly
        var Datefourdigit = 'Please enter valid date with correct format dd/MM/yyyy';
        var Invalidyearentry = 'Invalid year entry';
        var Invalidmonthentry = 'Invalid month entry';
        var Invaliddateentry = 'Invalid date entry';
        var DateformatDDMONYYYY = 'Incorrect date format. Enter as DD-MON-YYYY';
        var Entertime = 'Enter time';
        var Valueforhours = 'Invalid value for hours:';
        var Invalidvalueforminutes = 'Invalid value for minutes:';
        var Invalidtimeformat = 'Invalid time format:';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var ValiddatemonthMMDDYYHHMM = 'Please enter valid Date and Time MM/dd/yyyy HH:mm';
        var ValiddatemonthMMDDYYHHMMTT = 'Please enter valid Date and Time MM/dd/yyyy hh:mm tt';
        var EntervalidDateandTime = 'Please enter valid Date and Time';
        var Invalidvalueforhours = 'Invalid value for hours:';
        var Invalidvalueforminites = 'Invalid value for minutes:';

        var Entervalidtime = "Enter valid Time";

        var MaxLength = "Maximum length is ";
        var ChooseOption = "Choose an option";

        var FillFromandToDate = 'Please enter both the From and To Date';
        function MaxLengthh(maxLength) {

            MaxLength = maxLength;
        }
        function SetAlertMessages(entervalidtime, chooseOption) {
            Entervalidtime = entervalidtime;
            ChooseOption = chooseOption;
        }

        function SetAlertCheckDate(monthfourdigit, datefourdigit, invalidyearentry, invalidmonthentry, invaliddateentry, dateformatDDMONYYYY, entertime, valueforhours, invalidvalueforminutes, invalidtimeformat, entervalidDateandTime, validdatemonthMMDDYYHHMM, validdatemonthMMDDYYHHMMTT, entervalidDateandTime, invalidvalueforhours, invalidvalueforminites) {
            Monthfourdigit = monthfourdigit;
            Datefourdigit = datefourdigit;
            Invalidyearentry = invalidyearentry;
            Invalidmonthentry = invalidmonthentry;
            Invaliddateentry = invaliddateentry;
            DateformatDDMONYYYY = dateformatDDMONYYYY;
            Entertime = Entertime;
            Valueforhours = valueforhours;
            Invalidvalueforminutes = invalidvalueforminutes;
            Invalidtimeformat = invalidtimeformat;
            EntervalidDateandTime = entervalidDateandTime;
            ValiddatemonthMMDDYYHHMM = validdatemonthMMDDYYHHMM;
            ValiddatemonthMMDDYYHHMMTT = validdatemonthMMDDYYHHMMTT;
            EntervalidDateandTime = entervalidDateandTime;
            Invalidvalueforhours = invalidvalueforhours;
            Invalidvalueforminites = invalidvalueforminites;
        }
        //On Center Screen
        function popupwindow(url, title, w, h) {
            var left = (screen.width / 2) - (w / 2);
            var top = (screen.height / 2) - (h / 2);
            return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
        }

        function OpenDiscrepancyWindow(clkEmpID, clkDate) {
            popupwindow('TA_UI_Transaction_Discrepancy.aspx?clkDate=' + clkDate + '&clkEmpId=' + clkEmpID + '', '', 975, 370);
        }



        function WeekdayValidation() {
            var rangeDemoFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtFromDate;
            var weekDay2 = document.aspnetForm.ctl00_BodyContentPH_txtToDate;
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (document.getElementById('ctl00_BodyContentPH_cbDiscrepancy').checked == false && document.getElementById('ctl00_BodyContentPH_cbAbsent').checked == false) {
                alert(ChooseOption);
                return false;
            }
            else if ((weekDay.value == '') || (weekDay2.value == '')) {
                alert(FillFromandToDate);
                return false;
            }


            if (weekDay.value != '') {
                if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)
           ) {
                    if (weekDay2.value != '') {
                        if (checkDate(weekDay2, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                        }
                        else {
                            return false;
                        }
                    }
                }
                else {
                    return false;
                }
            }
        }

        function AssignDateValue(ctrl, id, inDate, inTime, outDate, outTime) {
            var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
            if (checkDate(ctrl, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {

            }
            else {
                return false;
            }

        }
        function AssignTimeValue(ctrl, id, inDate, inTime, outDate, outTime) {

            regExp = "^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$";

            var TimeFormat = document.getElementById('ctl00_BodyContentPH_Hidden2').value;
            var length = 0;
            if (TimeFormat != "%H:%M") {
                length = 11;
                regExp = "^(([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))$";
            }
            else {
                length = 8;
                regExp = "^(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?)$";
            }

            if (ctrl.value != "") {
                if (parseInt(ctrl.value.length) != length) {
                    ctrl.focus();
                    alert(Entervalidtime);
                    return false;
                }
                if (ctrl.value.search(regExp) == -1) {
                    ctrl.focus();
                    alert(Entervalidtime);
                    return false;
                }
            }
        }

        window.onload = function () {
            //Get total no. of CheckBoxes in side the GridView.
            TotalChkBx = parseInt('<%= this.grd.Rows.Count %>');
            //Get total no. of checked CheckBoxes in side the GridView.
            Counter = 0;
        }

            function HeaderClick(CheckBox) {
                //Get target base & child control.
                var TargetBaseControl = document.getElementById('<%= this.grd.ClientID %>');
                var TargetChildControl = "deletethis";

                //Get all the control of the type INPUT in the base control.
                var Inputs = TargetBaseControl.getElementsByTagName("input");

                //Checked/Unchecked all the checkBoxes in side the GridView.
                for (var n = 0; n < Inputs.length; ++n)
                    if (Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl, 0) >= 0)
                        Inputs[n].checked = CheckBox.checked;
                //Reset Counter
                Counter = CheckBox.checked ? TotalChkBx : 0;
            }

            function ChildClick(CheckBox, HCheckBox) {
                //get target base & child control.
                var HeaderCheckBox = document.getElementById(HCheckBox);

                //Modifiy Counter;            
                if (CheckBox.checked && Counter < TotalChkBx)
                    Counter++;
                else if (Counter > 0)
                    Counter--;
            }
            function GetRadioButtonListSelectedValue(radioButtonList) {
                var empty = '';
                if (document.getElementById('ctl00_BodyContentPH_HiddenField2').value == radioButtonList.defaultValue)
                    document.getElementById('ctl00_BodyContentPH_HiddenField1').value = "true";
                else
                    document.getElementById('ctl00_BodyContentPH_HiddenField1').value = empty;
            }
    </script>
    <style>
        .select2-container--default .select2-selection--single {
            min-width: 150px;
        }
    </style>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/discrepancy.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lblDiscrepancyReport" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="inr-fil-text pull-left">
                        <asp:Label ID="lblFilter" runat="server" Text="Filters"></asp:Label>
                    </div>
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                (3 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <div class="form-horizontal">
                <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>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="btnSave" />
                    </Triggers>
                </asp:UpdatePanel>
                <div class="row">
                    <div class="col-md-12">
                        <asp:HiddenField ID="Hidden1" runat="server" />
                        <asp:HiddenField ID="Hidden2" runat="server" />
                        <asp:HiddenField ID="hiddenTime" runat="server" Value="%I:%M:%S %p" />
                        <asp:HiddenField ID="HiddenField1" runat="server" />
                        <asp:HiddenField ID="HiddenField2" runat="server" />
                        <div id="divEmployeeDetails" runat="server">
                            <input type="hidden" id="hidFlag" />
                            <div class="form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblShift" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlShift" runat="server" CssClass="form-control select2">
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-3" style="display: none">
                                    <asp:Label ID="lblEmpSwipe" runat="server"></asp:Label>
                                    <asp:TextBox onpaste="return true" ID="txtSwipeCard" MaxLength="20" runat="server"
                                        CssClass="form-control" onkeypress="return acceptCharsNum_MaxLength(event,this,20,MaxLength);"></asp:TextBox>
                                    <cc1:AutoCompleteExtender ID="acSwipeCardNo" runat="server" CompletionSetCount="10"
                                        CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                        CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtSwipeCard"
                                        ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetCardNo"
                                        CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                    </cc1:AutoCompleteExtender>
                                </div>
                                <div class="col-md-3">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmployeeName" runat="server" CssClass="form-control"
                                        MaxLength="50" onkeypress="return employeename_singlequotes_maxlength(event,this,50,MaxLength);"></asp:TextBox>
                                    <cc1:AutoCompleteExtender ID="acEmpName" runat="server" CompletionInterval="10" CompletionSetCount="10"
                                        CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                        Enabled="true" FirstRowSelected="true" MinimumPrefixLength="1" ServicePath="../WebServices/AutoCompleteExtender.asmx"
                                        ServiceMethod="GetEmployeeName" CompletionListCssClass="autocomplete_completionListElement"
                                        TargetControlID="txtEmployeeName">
                                    </cc1:AutoCompleteExtender>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmployeeId" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txtEmployeeId" runat="server" CssClass="form-control"
                                        MaxLength="15" onkeypress="return acceptCharsNum_MaxLength(event,this,15,MaxLength);"></asp:TextBox>
                                    <cc1:AutoCompleteExtender ID="acEmployeeId" runat="server" CompletionSetCount="10"
                                        CompletionListItemCssClass="item" CompletionListHighlightedItemCssClass="AutocompleteCSS"
                                        CompletionInterval="10" Enabled="true" MinimumPrefixLength="1" TargetControlID="txtEmployeeId"
                                        ServicePath="../WebServices/AutoCompleteExtender.asmx" ServiceMethod="GetEmployeeId"
                                        CompletionListCssClass="autocomplete_completionListElement" FirstRowSelected="true">
                                    </cc1:AutoCompleteExtender>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpCategory" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2" AppendDataBoundItems="true">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpType" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2" AppendDataBoundItems="true">
                                        <asp:ListItem Value="0" Selected="True" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblTimePeriod" runat="server"></asp:Label>
                                <asp:Label ID="lblFrom" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtFromDate" runat="server" CssClass="form-control man-dat"
                                    onCut="return false" onDrop="return false">
                                </asp:TextBox>
                                <asp:CustomValidator ID="cus_FromDate" runat="server" EnableClientScript="False"
                                    OnServerValidate="ValidateFromDate" Display="None"></asp:CustomValidator>
                                <asp:RequiredFieldValidator ID="reqFromDate" runat="server" ControlToValidate="txtFromDate"
                                    Display="None" EnableClientScript="False" ErrorMessage="Please select FromDate"></asp:RequiredFieldValidator>
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2">
                                <asp:Label ID="lblTo" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-3">
                                <asp:TextBox onpaste="return true" ID="txtToDate" runat="server" CssClass="form-control man-dat"
                                    onCut="return false" onDrop="return false">
                                </asp:TextBox>
                                <asp:CustomValidator ID="cus_ToDate" OnServerValidate="ValidateToDate" runat="server"
                                    EnableClientScript="False" ErrorMessage="Select valid To Date" Display="None"></asp:CustomValidator>
                                <asp:CustomValidator ID="cus_ComToDate" runat="server" EnableClientScript="False"
                                    OnServerValidate="CompareDate" ErrorMessage="Todate Should be greater than  Fromdate"
                                    Display="None"></asp:CustomValidator>
                                <asp:RequiredFieldValidator ID="reqToDate" runat="server" ControlToValidate="txtToDate"
                                    Display="None" EnableClientScript="False" ErrorMessage="Please select ToDate"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2 pad-left-3px">
                                <asp:RadioButton ID="rbtn_WithPunchtype" runat="server" Text="With PunchType" 
                                    AutoPostBack="true" GroupName="PunchType" onclick="GetRadioButtonListSelectedValue(this);"
                                    OnCheckedChanged="rbtn_WithPunchtype_CheckedChanged" CssClass="radioDiscrepancy radioDiscrepancy-primary" />
                            </div>
                            <div class="col-md-3 pad-left-3px">
                                <asp:RadioButton ID="rbtn_WithoutPunchtype" runat="server" Text="Without PunchType" Checked="true"
                                    AutoPostBack="true" GroupName="PunchType" onclick="GetRadioButtonListSelectedValue(this);"
                                    OnCheckedChanged="rbtn_WithoutPunchtype_CheckedChanged" CssClass="radioDiscrepancy radioDiscrepancy-primary" />
                            </div>
                            <div class="col-md-1">
                            </div>
                            <div class="col-md-2 pad-left-3px">
                                <asp:CheckBox ID="cbDiscrepancy" runat="server" Text="Discrepancy" Checked="true"
                                    CssClass="checkboxEmployee checkboxEmployee-primary" />
                            </div>
                            <div class="col-md-3 pad-left-3px">
                                <asp:CheckBox ID="cbAbsent" runat="server" Text="Absent" CssClass="checkboxEmployee checkboxEmployee-primary" />
                            </div>
                        </div>
                    </div>
                    <div class="clearfix">
                    </div>
                    <div class="row">
                        <div class="line16">
                        </div>
                    </div>
                    <div class="col-md-12">
                        <asp:PlaceHolder ID="PlaceHolderDiscrepancy" runat="server">
                            <uc1:TA_uc_OrgLevel_Filter ID="TA_uc_OrgLevel_Filter1" runat="server" />
                        </asp:PlaceHolder>
                    </div>
                    <div class="col-md-5">
                    </div>
                    <div class="col-md-6">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btn_View" CssClass="btn save-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                OnClientClick="return WeekdayValidation();" />
                            <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                CausesValidation="False" OnClick="btn_Cancel_Click" Visible="false" />
                            <asp:ValidationSummary ID="ValidationSummary1" ShowMessageBox="True" ShowSummary="False"
                                runat="server" />
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="table-responsive">
                            <div style="width: 100%; overflow: auto">
                                <asp:GridView ID="grd" runat="server" AutoGenerateColumns="false" Width="100%" OnRowDataBound="grd_RowDataBound"
                                    AllowPaging="true" OnPageIndexChanging="grd_PageIndexChanging" PageSize="10"
                                    OnRowCreated="grd_OnRowCreated" DataKeyNames="CLK_ID" CssClass="table das-table1"
                                    Style="margin-top: 15px">
                                    <Columns>
                                        <asp:TemplateField HeaderText="Emp Id" HeaderStyle-CssClass="empheader">
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="checkall" Visible="false" runat="server" onclick="javascript:HeaderClick(this);"
                                                    TextAlign="Right" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="deletethis" runat="server" Text=" "></asp:CheckBox>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                            <HeaderStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="Emp Id">
                                            <ItemTemplate>
                                                <a data-toggle="modal" title='<%# Session["View"] %>' data-placement="top" data-target="#myModal" onclick="return navi('TA_UI_Transaction_Discrepancy.aspx?clkDate=<%# Eval("ClockDate")%>&clkEmpId=<%# Eval("CLK_EmpID")%>')"
                                                    href="#">
                                                    <asp:Label ID="lblEmpID" runat="server" Text='<%# Eval("Employee_Code_Id")%>'></asp:Label>
                                                </a>
                                                <asp:Label ID="lblInReader" runat="server" Text='<%# Eval("InReaderID")%>' Visible="false"></asp:Label>
                                                <asp:Label ID="lblOutReader" runat="server" Text='<%# Eval("OutReaderID")%>' Visible="false"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader GridColumn200" HeaderText="Employee Name">
                                            <ItemTemplate>
                                                <asp:Label ID="lblEmpName" runat="server" Text='<%# Eval("EmpName")%>' Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                <asp:HiddenField ID="hidEmployeeAutoId" runat="server" Value='<%# Eval("EmployeeAutoId")%>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="Shift Date">
                                            <ItemTemplate>
                                                <asp:Label ID="lblClkDate" runat="server" Text='<%# Eval("ClockDate") %> '></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="Shift Time" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblStartTime" runat="server" Text='<%# Eval("Shift_StartTime") %> '></asp:Label>
                                                -
                                                <asp:Label ID="lblEndTime" runat="server" Text='<%# Eval("Shift_EndTime") %> '></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="In Date">
                                            <ItemTemplate>
                                                <asp:TextBox onpaste="return true" ID="txtInDate" runat="server" Text='<%# Eval("InDate")%>'
                                                    CssClass="form-control" ReadOnly="true" Style="min-width: 115px" data-mask></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="In Time">
                                            <ItemTemplate>
                                                <asp:TextBox onpaste="return true" ID="txtInTime" runat="server" Text='<%# Eval("InTime")%>'
                                                    CssClass="form-control" ReadOnly="true" Style="min-width: 100px" data-mask></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="In Punch" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblInPunchtype" runat="server" Text='<%#Eval("InpunchType")%>' Visible="false"></asp:Label>
                                                <asp:DropDownList ID="ddlInPunchType" runat="server" DataTextField="PunchType" CssClass="form-control select2"
                                                    DataValueField="PunchType_Id" Visible="false" Style="min-width: 100px">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="Out Date">
                                            <ItemTemplate>
                                                <asp:TextBox onpaste="return true" ID="txtOutDate" runat="server" Text='<%# Eval("OutDate")%>'
                                                    CssClass="form-control" ReadOnly="true" Style="min-width: 115px" data-mask></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="Out Time">
                                            <ItemTemplate>
                                                <asp:TextBox onpaste="return true" ID="txtOutTime" runat="server" Text='<%# Eval("OutTime")%>'
                                                    CssClass="form-control" ReadOnly="true" Style="min-width: 100px" data-mask></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Out Punch" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblOutPunchtype" runat="server" Text='<%#Eval("OutPunchType")%>' Visible="false"></asp:Label>
                                                <asp:DropDownList ID="ddlOutPunchType" runat="server" DataTextField="PunchType" CssClass="form-control select2"
                                                    DataValueField="PunchType_Id" Visible="false" Style="min-width: 100px">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderStyle-CssClass="empheader" HeaderText="Reason">
                                            <ItemTemplate>
                                                <asp:TextBox onpaste="return true" ID="txtReason" MaxLength="250"  Text="Missing Punch"
                                                    CssClass="form-control" runat="server" ReadOnly="true" Style="min-width: 100px"></asp:TextBox>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="CLK_ID" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblClkID" runat="server" Text='<%# Eval("CLK_ID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="DiscrepancyType" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblDiscrepancyType" runat="server" Text='<%# Eval("DiscrepancyType") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="ShiftStartTime" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblShiftStartTime" runat="server" Text='<%# Eval("Shift_StartTime") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="ShiftEndTime" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblShiftEndTime" runat="server" Text='<%# Eval("Shift_EndTime") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="ShiftInDateTime" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblShiftInDateTime" runat="server" Text='<%# Eval("ShiftInDateTime") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField Visible="false" HeaderText="MaxHoursBeforeShift" HeaderStyle-CssClass="empheader">
                                            <ItemTemplate>
                                                <asp:Label ID="lblMaxHoursBeforeShift" runat="server" Text='<%# Eval("MaxHoursBeforeShift") %>'></asp:Label>
                                                <asp:HiddenField ID="hdnManualEntryAlreadyExists" Value='<%# Eval("ManualEntryAlreadyExists") %>'
                                                    runat="server" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle Height="30px" CssClass="table-bg" BorderColor="#C5DFFC" />
                                    <PagerStyle Font-Overline="False" HorizontalAlign="Right" CssClass="GridPager" />
                                    <PagerSettings FirstPageText="<<" LastPageText=">>" Mode="NumericFirstLast" NextPageText=">"
                                        PreviousPageText="<" />
                                    <AlternatingRowStyle BackColor="white" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="pull-right-button">
                            <asp:LinkButton ID="btnSave" CssClass="btn save-btn fa-floppy-o" runat="server" Visible="false"
                                CausesValidation="true" OnClientClick="$find('popupProgress').show();" OnClick="btnSave_Click"
                                Style="margin-top: 15px" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 100px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title">
                            <asp:Label ID="lblDataView" runat="server" Text="Data View"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" style="border-style: none; height: 400px"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>

        $("[data-mask]").inputmask();

    </script>

</asp:Content>
