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

<%@ Register Src="../UserControls/TA_uc_OrgLevelFilter_Updated.ascx" TagName="TA_uc_OrgLevel_Filter"
    TagPrefix="uc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register TagPrefix="dxGridview" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2" %>

<asp:Content ID="ConTransactionSanction" ContentPlaceHolderID="BodyContentPH" runat="Server">
    <!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="../css/anytimeIE.css" />
    <link rel="stylesheet" type="text/css" href="../css/ProgressforIE.css" />
    <![endif]-->
    <%--<link href="../css/ProgressBar.css" rel="stylesheet" type="text/css" />--%>

    <script src="../js/lockkeys.js"></script>

    <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 language="javascript" src="../js/DateTimeValidation.js" type="text/javascript"></script>

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

    <script type="text/javascript">
        $(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 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 FromDate = "Enter From Date";
        var ToDate = "Enter To Date";
        var Selstatus = "Select Status";
        var MaxLength = "Maximum length is ";
        function MaxLengthh(maxLength) {
            MaxLength = maxLength;
        }
        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;
        }
        function SetAlertMessages(FrmDate, TDate, Status) {
            FromDate = FrmDate;
            ToDate = TDate;
            Selstatus = Status;
        }
        function CheckStatus() {
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value == '' && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {
                alert(FromDate);
                return false;
            }
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '') {
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtFromDate;
                var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                }
                else {
                    return false;
                }
            }
            if (document.aspnetForm.ctl00_BodyContentPH_txtFromDate.value != '' && document.aspnetForm.ctl00_BodyContentPH_txtToDate.value == '') {
                alert(ToDate);
                return false;
            }
            if (document.aspnetForm.ctl00_BodyContentPH_txtToDate.value != '') {
                var weekDay = document.aspnetForm.ctl00_BodyContentPH_txtToDate;
                var DateFormat = document.getElementById('ctl00_BodyContentPH_Hidden1').value;
                if (checkDate(weekDay, DateFormat, Monthfourdigit, Datefourdigit, Invalidyearentry, Invalidmonthentry, Invaliddateentry, DateformatDDMONYYYY, Entertime, Valueforhours, Invalidvalueforminutes, Invalidtimeformat, EntervalidDateandTime, ValiddatemonthMMDDYYHHMM, ValiddatemonthMMDDYYHHMMTT, EntervalidDateandTime, Invalidvalueforhours, Invalidvalueforminites)) {
                }
                else {
                    return false;
                }
            }
        }
        function isOnduty() {
            document.getElementById('ctl00_BodyContentPH_divLeaveSanction').style.display = "none";
            document.getElementById('ctl00_BodyContentPH_divLeaveSanctionBulk').style.display = "none";
            document.getElementById('ctl00_BodyContentPH_divPermissionSanction').style.display = "none";
            document.getElementById('ctl00_BodyContentPH_divPermissionSanctionBulk').style.display = "none";
            document.getElementById('ctl00_BodyContentPH_divOndutySanction').style.display = "none";
            document.getElementById('ctl00_BodyContentPH_divOndutySanctionBulk').style.display = "none";
        }
        function getFilter() {
            $('#collapseThree').collapse('show');
            var text = document.getElementById('ctl00_BodyContentPH_btn_Show').innerHTML;
            var ss = text.split(" ");
            if (document.getElementById('ctl00_BodyContentPH_trFiller').style.display == "none") {
                document.getElementById('ctl00_BodyContentPH_trFiller').style.display = "";
                document.getElementById('ctl00_BodyContentPH_hdnAdvancedplus').value = 1;
                if (ss.length > 1) {
                    document.getElementById('ctl00_BodyContentPH_btn_Show').innerHTML = "- " + ss[1];
                }
            }
            else {
                document.getElementById('ctl00_BodyContentPH_trFiller').style.display = "none";
                var text = document.getElementById('ctl00_BodyContentPH_btn_Show').innerHTML;
                document.getElementById('ctl00_BodyContentPH_hdnAdvancedplus').value = 0;
                if (ss.length > 1) {
                    document.getElementById('ctl00_BodyContentPH_btn_Show').innerHTML = "+ " + ss[1];
                }
            }
            return false;
        }
    </script>

    <div class="content-header">
        <h1 style="background-image: url('../dist/img/lve-san.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">
        <div id="accordion">
            <div>
                <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="Filter"></asp:Label>
                                <asp:HiddenField ID="Hidden1" runat="server" />
                                <asp:HiddenField ID="hdnAdvancedplus" runat="server" Value="0" />
                            </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>
                                        (1 No.)</span>
                                </h6>
                            </div>
                        </div>
                        <div class="clearfix">
                        </div>
                    </div>
                </div>
                <div id="collapseOne">
                    <div class="emp-filter">
                        <div class="row">
                            <div class="form-horizontal">
                                <div class="panel-collapse" id="trFiller" runat="server">
                                    <div>
                                        <div class="col-md-12">
                                            <div class="form-group" id="trEmployeeDetails" runat="server">
                                                <div class="col-md-2 ">
                                                    <asp:Label ID="lbl_EmployeeName" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:TextBox onpaste="return true" ID="txt_EmpName" 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="txt_EmpName">
                                                    </cc1:AutoCompleteExtender>
                                                </div>
                                                <div class='col-md-1'>
                                                </div>
                                                <div class="col-md-2">
                                                    <asp:Label ID="lbl_EmployeeId" 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 class="form-group">
                                                <div class="col-md-2">
                                                    <asp:Label ID="lbl_From" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:TextBox onpaste="return true" ID="txtFromDate" runat="server" CssClass="form-control"
                                                        EnableViewState="False" MaxLength="25" onCut="return false" onDrop="return false"></asp:TextBox>
                                                </div>
                                                <div class='col-md-1'>
                                                </div>
                                                <div class="col-md-2">
                                                    <asp:Label ID="lbl_To" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:TextBox onpaste="return true" ID="txtToDate" runat="server" CssClass="form-control"
                                                        EnableViewState="False" MaxLength="25" onCut="return false" onDrop="return false"></asp:TextBox>
                                                    <asp:CustomValidator ID="cus_ComDate" runat="server" Display="None" EnableClientScript="False"
                                                        OnServerValidate="CompareDate"></asp:CustomValidator>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-md-2" style="display: none;">
                                                    <asp:Label ID="lblEmpSwipe" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-md-3" style="display: none;">
                                                    <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-2" style="display: none;" id="divStatus1" runat="server">
                                                    <asp:Label ID="lbl_Status" runat="server"></asp:Label>
                                                </div>
                                                <div class="col-md-3" style="display: none;" id="divStatus2" runat="server">
                                                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="form-control select2">
                                                        <asp:ListItem Text="Pending" Value="Pending"></asp:ListItem>
                                                        <asp:ListItem Text="All" Value="All"></asp:ListItem>
                                                        <asp:ListItem Text="Approved" Value="Approved"></asp:ListItem>
                                                        <%--<asp:ListItem Text="Forwarded" Value="Forwarded"></asp:ListItem>--%>
                                                        <asp:ListItem Text="Rejected" Value="Rejected"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-md-3">
                                                    <asp:RadioButton ID="rbLeaveApplication" runat="server" Text="Leave Sanction" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" Checked="true" />
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:RadioButton ID="rbPermission" runat="server" Text="Permission Sanction" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" />
                                                </div>
                                                <div class="col-md-3">
                                                    <asp:RadioButton ID="rbOnduty" runat="server" Text="Onduty Sanction" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="clearfix">
                                </div>
                                <div class="row">
                                    <div class="line16">
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group" style="margin-bottom: 0px">
                                        <div class="col-md-12">
                                            <uc4:TA_uc_OrgLevel_Filter ID="TA_UC_Organisation" runat="server" />
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div class="col-md-4">
                                    </div>
                                    <div class="col-md-3">
                                        <div class="pull-right-button">
                                            <asp:LinkButton Text="+ Advanced" ID="btn_Show" runat="server" OnClientClick="return getFilter()">
                                            </asp:LinkButton>
                                        </div>
                                    </div>

                                    <div class="col-md-4" style="padding-bottom: 20px">
                                        <div class="pull-right-button">
                                            <asp:LinkButton ID="btn_View" CssClass="btn view-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                                OnClientClick="return CheckStatus();" />
                                        </div>
                                    </div>
                                </div>
                                <div id="divLeaveSanction" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <asp:HiddenField ID="hdnSelectRow" runat="server" />
                                                <asp:HiddenField ID="hdnGetAllid" runat="server" />
                                                <dxGridview:ASPxGridView ID="gdLeaveSanctionView" runat="server" ClientInstanceName="gdLeaveSanctionView"
                                                    EnableCallBacks="false" AutoGenerateColumns="false" Width="100%">
                                                    <Columns>
                                                        <dxGridview:GridViewDataTextColumn Caption="Application Date" FieldName="employeeid"
                                                            VisibleIndex="0" Width="120px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblempid" Text='<%# Eval("employeeid") %>' Style="cursor: pointer; overflow-y: auto; overflow-x: auto; word-break: break-all; width: 160px; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Application Date" FieldName="Employee_FirstName"
                                                            VisibleIndex="1" Width="250px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="AppDate1" Text='<%# Eval("Employee_FirstName") %>' Style="cursor: pointer; overflow-y: auto; overflow-x: auto; word-break: break-all; width: 160px; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Application Date" FieldName="Leave_ApplicationDate"
                                                            VisibleIndex="2" Width="200px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Leave_ApplicationDate") %>'
                                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; width: 80px; word-wrap: break-word; display: inline-block;"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Duration" VisibleIndex="3" Width="180px">
                                                            <Settings AllowAutoFilter="false" AllowDragDrop="false" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("Duration") %>'></asp:Label>
                                                                <asp:Label ID="Label4" runat="server" Text='<%# Bind("NumberOfDays") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Status" VisibleIndex="4" Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Status") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a data-toggle="modal" title='<%# Session["View"] %>' href="TA_UI_Transactions_LeaveSanctionModify.aspx?page=single&LeaveApplication_Id=<%# Eval("LeaveApplication_Id") %>&Status=<%# Eval("Status") %>">
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataColumn>
                                                    </Columns>

                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <%--<SettingsPager PageSize="10">
                                                        <PageSizeItemSettings Visible="true" ShowAllItem="true" Items="10,20,50" />
                                                    </SettingsPager>--%>
                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" ShowStatusBar="Auto" VerticalScrollableHeight="320" />

                                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="divLeaveSanctionBulk" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <dxGridview:ASPxGridView ID="gdLeaveSanctionViewBulk" EnableCallBacks="false" runat="server"
                                                    ClientInstanceName="gdLeaveSanctionViewBulk" AutoGenerateColumns="false" KeyFieldName="LeaveApplication_Id"
                                                    Width="100%">
                                                    <Columns>
                                                        <dxGridview:GridViewDataColumn VisibleIndex="0" Width="34px" HeaderStyle-VerticalAlign="Middle"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center">
                                                            <Settings AllowAutoFilter="false" />
                                                            <HeaderTemplate>
                                                                <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPage(this)" />
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRow(this)"
                                                                    accesskey='<%# Eval("LeaveApplication_Id") %>' />
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="employeeid" VisibleIndex="1" Width="110px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="LabelEmp" Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"
                                                                    Text='<%# Eval("employeeid")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            Width="200px" VisibleIndex="2">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="LabelEmp" Style="overflow-y: auto; overflow-x: auto; cursor: pointer; word-break: break-all; word-wrap: break-word; display: inline-block;"
                                                                    runat="server" Text='<%# Eval("Employee_FirstName")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Leave_ApplicationDate" VisibleIndex="3"
                                                            Width="100px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Leave_ApplicationDate") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Duration" VisibleIndex="4" Width="160px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Duration") %>'></asp:Label>
                                                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("NumberOfDays") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Type" VisibleIndex="5" Width="100px">
                                                            <Settings AllowDragDrop="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Status" VisibleIndex="6" Width="70px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" Visible="false" CellStyle-HorizontalAlign="Center" Width="35px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a href="TA_UI_Transactions_LeaveSanctionModify.aspx?page=Bulk&LeaveApplication_Id=<%# Eval("LeaveApplication_Id") %>&Status=<%# Eval("Status") %>">
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="LeaveApplication_Id" VisibleIndex="7"
                                                            Visible="false">
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowGroupFooter="VisibleAlways" />
                                                    <SettingsPager Mode="ShowAllRecords">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <Settings ShowFilterRow="true" VerticalScrollableHeight="300" VerticalScrollBarMode="Auto" />
                                                    <SettingsBehavior SortMode="Value"  AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="pull-right-button">
                                                <asp:LinkButton ID="btnSaveLeaveSanction" runat="server" Text="Sanction" CssClass="btn save-btn fa-thumbs-o-up" OnClientClick="return confirmForward(this.form,1);"
                                                    OnCommand="btnSaveLeaveSanction_Command" CommandName="Approved" />
                                                <asp:HiddenField ID="hdnLeaveApplicationId" runat="server" />
                                                <asp:HiddenField ID="HiddenField1" runat="server" />
                                                <asp:HiddenField ID="HiddenField2" runat="server" />
                                                <asp:LinkButton CommandName="Rejected" ID="btnRejected" runat="server" Text="&nbsp;&nbsp;Rejected" CssClass="btn save-btn fa-thumbs-o-down" OnClientClick="return confirmForward(this.form,1);"
                                                    OnCommand="btnSaveLeaveSanction_Command" />
                                                <asp:LinkButton ID="btnApprovalAll" runat="server" Text="&nbsp;&nbsp;Approve All Levels" CssClass="btn save-btn fa-thumbs-o-up"
                                                    OnCommand="btnSaveLeaveSanction_Command" CommandName="All" Visible="false" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="divPermissionSanction" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <dxGridview:ASPxGridView ID="gdPermissionSanctionView" EnableCallBacks="false" runat="server"
                                                    ClientInstanceName="gdPermissionSanctionView" AutoGenerateColumns="false" Width="100%"
                                                    OnHtmlRowCreated="gdPermissionSanctionView_HtmlRowCreated">
                                                    <Columns>
                                                        <dxGridview:GridViewDataTextColumn FieldName="employeeid" VisibleIndex="0" Width="150px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"
                                                                    ID="lblempid"
                                                                    runat="server" Text='<%# Eval("employeeid")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            VisibleIndex="1" Width="250px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"
                                                                    ID="lblEmployeeName"
                                                                    runat="server" Text='<%# Eval("Employee_FirstName")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Permission_AppliedDate" VisibleIndex="2"
                                                            Width="150px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="PermissionAppliedDate" runat="server" Text='<%# Bind("Permission_AppliedDate") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Duration" VisibleIndex="3" Width="220px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_Duration" runat="server" Text='<%# Bind("Duration") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Permission_Status" VisibleIndex="4"
                                                            Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblPermissionStatus" runat="server" Text='<%# Bind("Permission_Status") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn FieldName="Permission_FromTime" VisibleIndex="5" Visible="false">
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataColumn FieldName="Permission_ToTime" VisibleIndex="6" Visible="false">
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a href="TA_UI_Transactions_PermissionSanctionModify.aspx?Permission_Id=<%# Eval("Permission_Id")%>&Status=<%# Eval("Permission_Status")%>">
                                                                    <span class="btn btn-defalut edit-icons" style="color: Green"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataColumn>
                                                    </Columns>
                                                    <Settings ShowGroupFooter="VisibleAlways" />
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="divPermissionSanctionBulk" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <dxGridview:ASPxGridView ID="gdPermissionSanctionViewBulk" EnableCallBacks="false" runat="server"
                                                    ClientInstanceName="gdPermissionSanctionViewBulk" AutoGenerateColumns="false" Width="100%"
                                                    OnHtmlRowCreated="gdPermissionSanctionViewBulk_HtmlRowCreated">
                                                    <Columns>
                                                        <dxGridview:GridViewDataColumn VisibleIndex="0" Width="34px" HeaderStyle-VerticalAlign="Middle"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center">
                                                            <Settings AllowAutoFilter="false" />
                                                            <HeaderTemplate>
                                                                <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPagePermissionBulk(this)" />
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRowPermission(this)"
                                                                    accesskey='<%# Eval("Permission_Id") %>' />
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="employeeid" VisibleIndex="1" Width="150px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"
                                                                    ID="lblEmpid"
                                                                    runat="server" Text='<%# Eval("employeeid")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            VisibleIndex="2" Width="250px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label Style="overflow-y: auto; overflow-x: auto; word-break: break-all; cursor: pointer; word-wrap: break-word; display: inline-block;"
                                                                    ID="lblEmployeeName"
                                                                    runat="server" Text='<%# Eval("Employee_FirstName")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Permission_AppliedDate" VisibleIndex="3"
                                                            Width="250px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Permission_AppliedDate") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Duration" VisibleIndex="4" Width="220px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_Duration" runat="server" Text='<%# Bind("Duration") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Permission_Status" VisibleIndex="5"
                                                            Width="70px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblPermissionStatus" runat="server" Text='<%# Bind("Permission_Status") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a href="TA_UI_Transactions_PermissionSanctionModify.aspx?Permission_Id=<%# Eval("Permission_Id")%>&Status=<%# Eval("Permission_Status")%>">
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataColumn FieldName="Permission_FromTime" VisibleIndex="6" Visible="false">
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataColumn FieldName="Permission_ToTime" VisibleIndex="7" Visible="false">
                                                        </dxGridview:GridViewDataColumn>
                                                    </Columns>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="pull-right-button">
                                                <asp:LinkButton ID="btnSavePermission" runat="server" CssClass="btn save-btn fa-thumbs-o-up" Text="Sanction"
                                                    OnClick="btnSavePermission_Click" OnClientClick="return confirmForward(this.form,1);" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="divOndutySanction" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <dxGridview:ASPxGridView ID="gdOndutySanctionView" runat="server" ClientInstanceName="gdLeaveSanctionView"
                                                    EnableCallBacks="false" AutoGenerateColumns="false" Width="100%">
                                                    <Columns>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Onduty_ID" VisibleIndex="0"
                                                            Visible="False">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_Mid" Text='<%# Eval("Onduty_ID") %>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowHeaderFilter="true" />
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_Code_Id" Caption="Employee ID"
                                                            VisibleIndex="1" Width="90px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_EmployeeId" Text='<%# Eval("Employee_Code_Id") %>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            VisibleIndex="2" Width="110px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_EmpName" Text='<%# Eval("Employee_FirstName") %>' runat="server"
                                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; cursor: pointer; display: inline-block;"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Entry Date" FieldName="Onduty_EntryDate" VisibleIndex="3"
                                                            Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_shiftDate" Text='<%# Eval("Onduty_EntryDate")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="From Date" FieldName="Onduty_FromDate"
                                                            Width="80px" VisibleIndex="4">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_InDate" Text='<%# Eval("Onduty_FromDate") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Start Time" FieldName="Onduty_FromTime"
                                                            VisibleIndex="5" Width="80px">
                                                            <Settings AllowDragDrop="False" AllowAutoFilter="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_InTime" Text='<%# Eval("Onduty_FromTime") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="To Date" FieldName="Onduty_ToDate"
                                                            VisibleIndex="6" Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_OutDate" Text='<%# Eval("Onduty_ToDate") %>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="End Time" FieldName="Onduty_ToTime"
                                                            VisibleIndex="7" Width="80px">
                                                            <Settings AllowDragDrop="False" AllowAutoFilter="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_OutTime" Text='<%# Eval("Onduty_ToTime") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Reason" FieldName="Onduty_Reason"
                                                            VisibleIndex="9" Width="140px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_reason" Text='<%# Eval("Onduty_Reason")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Status" FieldName="OnDuty_Status"
                                                            VisibleIndex="8" Width="70px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_status" Text='<%# Eval("OnDuty_Status")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a data-toggle="modal" title='<%# Session["View"] %>' href="TA_UI_Transactions_OnDutySanctionModify.aspx?ODID=<%# Eval("Onduty_ID") %> ">
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                    </Columns>
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="divOndutySanctionBulk" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="padding-bottom: 10px">
                                                <dxGridview:ASPxGridView ID="gdOndutySanctionViewBulk" EnableCallBacks="false" runat="server"
                                                    ClientInstanceName="gdOndutySanctionViewBulk" AutoGenerateColumns="false" Width="100%">
                                                    <Columns>
                                                        <dxGridview:GridViewDataColumn VisibleIndex="0" Width="34px" HeaderStyle-VerticalAlign="Middle"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center">
                                                            <Settings AllowAutoFilter="false" />
                                                            <HeaderTemplate>
                                                                <input id="chkSelectAll" runat="server" type="checkbox" onclick="SelectAllOnThisPageOnduty(this)" />
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <input id="chkSelect" runat="server" type="checkbox" onclick="SelectOnRowOnduty(this)"
                                                                    accesskey='<%# Eval("Onduty_ID") %>' />
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_Code_Id" Caption="Employee Id"
                                                            VisibleIndex="1" Width="90px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_EmployeeId" Text='<%# Eval("Employee_Code_Id") %>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            VisibleIndex="2" Width="110px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_EmpName" Text='<%# Eval("Employee_FirstName") %>' runat="server"
                                                                    Style="overflow-y: auto; overflow-x: auto; word-break: break-all; word-wrap: break-word; cursor: pointer; display: inline-block;"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Shift Date" FieldName="shiftDate" VisibleIndex="3"
                                                            Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_shiftDate" Text='<%# Eval("Onduty_EntryDate")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="From Date" FieldName="ManualTimeEntry_InDate"
                                                            Width="80px" VisibleIndex="4">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_InDate" Text='<%# Eval("Onduty_FromDate") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Start Time" FieldName="ManualTimeEntry_InTime"
                                                            VisibleIndex="5" Width="80px">
                                                            <Settings AllowDragDrop="False" AllowAutoFilter="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_InTime" Text='<%# Eval("Onduty_FromTime") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="To Date" FieldName="ManualTimeEntry_OutDate"
                                                            VisibleIndex="6" Width="80px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_OutDate" Text='<%# Eval("Onduty_ToDate") %>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="End Time" FieldName="ManualTimeEntry_OutTime"
                                                            VisibleIndex="7" Width="80px">
                                                            <Settings AllowDragDrop="False" AllowAutoFilter="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_OutTime" Text='<%# Eval("Onduty_ToTime") %>' runat="server"></asp:Label></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Status" FieldName="ManualTimeEntry_Status"
                                                            VisibleIndex="8" Width="70px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_status" Text='<%# Eval("OnDuty_Status")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Reason" FieldName="ManualTimeEntry_Reason"
                                                            VisibleIndex="9" Width="120px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lbl_reason" Text='<%# Eval("Onduty_Reason")%>' runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <a title='<%# Session["View"] %>' data-placement="top" href='TA_UI_Transactions_OnDutySanctionModify.aspx?ODID=<%# Eval("Onduty_ID") %>'>
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataColumn>
                                                    </Columns>
                                                    <Settings ShowGroupFooter="VisibleAlways" />
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsBehavior SortMode="Value" AllowSort="true" AllowDragDrop="true" />
                                                    <Styles AlternatingRow-CssClass="table-bg">
                                                    </Styles>
                                                </dxGridview:ASPxGridView>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="pull-right-button">
                                                <asp:LinkButton ID="btnSaveOnduty" runat="server" Text="Sanction" CssClass="btn save-btn fa-thumbs-o-up"
                                                    OnClick="btnSaveOndutySanction_Click" OnClientClick="return confirmForward(this.form,1);" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" language="javascript">
            function SelectAllOnThisPage(chkSelectAll) {

                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
                if (chkSelectAll.checked == true) {
                    for (var i = 0; i < gdLeaveSanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_cell' + (i + gdLeaveSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                            document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_cell' + (i + gdLeaveSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = true;
                            var hdnUserId = document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_cell' + (i + gdLeaveSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').accessKey;
                            var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                            var removeId = hdnSelectRow.value.split(",");
                            if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                                if (hdnSelectRow.value != "")
                                    hdnSelectRow.value += ",";
                                hdnSelectRow.value += hdnUserId;
                            }
                        }
                    }
                }
                else {
                    for (var i = 0; i < gdLeaveSanctionViewBulk.pageRowCount; i++) {
                        document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_cell' + (i + gdLeaveSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = false;
                    }
                    hdnSelectRow.value = '';
                }
            }


            function SelectOnRow(chkOnSelect) {
                var hdnUserId = chkOnSelect.accessKey;
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');

                var removeId = hdnSelectRow.value.split(",");

                if (chkOnSelect.checked) {
                    if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                        if (hdnSelectRow.value != "")
                            hdnSelectRow.value += ",";
                        hdnSelectRow.value += hdnUserId;
                    }

                    var varTotalCheckedCount = 0;
                    for (var i = 0; i < gdLeaveSanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_cell' + (i + gdLeaveSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked)
                            varTotalCheckedCount = varTotalCheckedCount + 1;
                        else
                            break;
                    }
                    if (varTotalCheckedCount == gdLeaveSanctionViewBulk.pageRowCount)
                        document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_header0_chkSelectAll').checked = true;
                    else
                        document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_header0_chkSelectAll').checked = false;
                }
                else {
                    if (Array.contains(removeId, hdnUserId)) {
                        Array.remove(removeId, hdnUserId);
                    }
                    hdnSelectRow.value = removeId;

                    document.getElementById('ctl00_BodyContentPH_gdLeaveSanctionViewBulk_header0_chkSelectAll').checked = false;
                }
            }

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

            function SelectAllOnThisPagePermissionBulk(chkSelectAll) {

                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
                if (chkSelectAll.checked == true) {
                    for (var i = 0; i < gdPermissionSanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_cell' + (i + gdPermissionSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                            document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_cell' + (i + gdPermissionSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = true;
                            var hdnUserId = document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_cell' + (i + gdPermissionSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').accessKey;
                            var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                            var removeId = hdnSelectRow.value.split(",");
                            if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                                if (hdnSelectRow.value != "")
                                    hdnSelectRow.value += ",";
                                hdnSelectRow.value += hdnUserId;
                            }
                        }
                    }
                }
                else {
                    for (var i = 0; i < gdPermissionSanctionViewBulk.pageRowCount; i++) {
                        document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_cell' + (i + gdPermissionSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = false;
                    }
                    hdnSelectRow.value = '';
                }
            }


            function SelectOnRowPermission(chkOnSelect) {
                var hdnUserId = chkOnSelect.accessKey;
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');

                var removeId = hdnSelectRow.value.split(",");

                if (chkOnSelect.checked) {
                    if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                        if (hdnSelectRow.value != "")
                            hdnSelectRow.value += ",";
                        hdnSelectRow.value += hdnUserId;
                    }

                    var varTotalCheckedCount = 0;
                    for (var i = 0; i < gdPermissionSanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_cell' + (i + gdPermissionSanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked)
                            varTotalCheckedCount = varTotalCheckedCount + 1;
                        else
                            break;
                    }
                    if (varTotalCheckedCount == gdPermissionSanctionViewBulk.pageRowCount)
                        document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_header0_chkSelectAll').checked = true;
                    else
                        document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_header0_chkSelectAll').checked = false;
                }
                else {
                    if (Array.contains(removeId, hdnUserId)) {
                        Array.remove(removeId, hdnUserId);
                    }
                    hdnSelectRow.value = removeId;

                    document.getElementById('ctl00_BodyContentPH_gdPermissionSanctionViewBulk_header0_chkSelectAll').checked = false;
                }
            }

        </script>
        <script type="text/javascript" language="javascript">
            function SelectAllOnThisPageOnduty(chkSelectAll) {
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                var hdnSelectAll = document.getElementById('<%= hdnGetAllid.ClientID %>');
                if (chkSelectAll.checked == true) {
                    for (var i = 0; i < gdOndutySanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_cell' + (i + gdOndutySanctionViewBulk.visibleStartIndex) + '_0_chkSelect').disabled == false) {
                            document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_cell' + (i + gdOndutySanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = true;
                            var hdnUserId = document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_cell' + (i + gdOndutySanctionViewBulk.visibleStartIndex) + '_0_chkSelect').accessKey;
                            var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');
                            var removeId = hdnSelectRow.value.split(",");
                            if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                                if (hdnSelectRow.value != "")
                                    hdnSelectRow.value += ",";
                                hdnSelectRow.value += hdnUserId;
                            }
                        }
                    }
                }
                else {
                    for (var i = 0; i < gdOndutySanctionViewBulk.pageRowCount; i++) {
                        document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_cell' + (i + gdOndutySanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked = false;
                    }
                    hdnSelectRow.value = '';
                }
            }


            function SelectOnRowOnduty(chkOnSelect) {
                var hdnUserId = chkOnSelect.accessKey;
                var hdnSelectRow = document.getElementById('<%= hdnSelectRow.ClientID %>');

                var removeId = hdnSelectRow.value.split(",");

                if (chkOnSelect.checked) {
                    if (hdnUserId != "" && !Array.contains(removeId, hdnUserId)) {
                        if (hdnSelectRow.value != "")
                            hdnSelectRow.value += ",";
                        hdnSelectRow.value += hdnUserId;
                    }

                    var varTotalCheckedCount = 0;
                    for (var i = 0; i < gdOndutySanctionViewBulk.pageRowCount; i++) {
                        if (document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_cell' + (i + gdOndutySanctionViewBulk.visibleStartIndex) + '_0_chkSelect').checked)
                            varTotalCheckedCount = varTotalCheckedCount + 1;
                        else
                            break;
                    }
                    if (varTotalCheckedCount == gdOndutySanctionViewBulk.pageRowCount)
                        document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_header0_chkSelectAll').checked = true;
                    else
                        document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_header0_chkSelectAll').checked = false;
                }
                else {
                    if (Array.contains(removeId, hdnUserId)) {
                        Array.remove(removeId, hdnUserId);
                    }
                    hdnSelectRow.value = removeId;

                    document.getElementById('ctl00_BodyContentPH_gdOndutySanctionViewBulk_header0_chkSelectAll').checked = false;
                }
            }
            //Added by Manjula.P on 25-Apr-2014 for Integrating ANGLER into PRODUCT
            function openPopupMailTo() {
                var MailType = "TO";
                popupwindow('GetEmailIdsPopup.aspx?MailType=' + MailType + '', 'Test', 700, 500);
                //            window.open('GetEmailIdsPopup.aspx?MailType=' + MailType + '','Test','height=610,top=200,left=250,width=600');
                return false;
            }
            function openPopupMailCc() {
                var MailType = "CC";
                popupwindow('GetEmailIdsPopup.aspx?MailType=' + MailType + '', 'Test', 700, 500);
                //            window.open('GetEmailIdsPopup.aspx?MailType=' + MailType + '','Test','height=610,top=200,left=250,width=600');
                return false;
            }
            function RedirectionFunction() {
                //alert('Test');
                document.getElementById('ctl00_BodyContentPH_btnBack').click();
            }
            //************************************************************

            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 confirmdelete(frm) {
                var status = "";
                var stausForAll = "";
                var frm = document.forms[0];
                for (i = 0; i < frm.length; i++) {
                    if (frm.elements[i].name.indexOf('chkSelectAll') != -1) {
                        if (frm.elements[i].checked) {
                            stausForAll = true;
                        }
                    }
                    if (frm.elements[i].name.indexOf('chkSelectAll') == -1) {
                        if ((frm.elements[i].name.indexOf('chkSelect')) != -1) {
                            if (frm.elements[i].checked) {
                                status = true;
                            }
                        }
                    }
                }

                if (stausForAll == true && status == "") {
                    alert('No records to delete');
                    return false;
                }

                if (status == true) {
                    return confirm("Are you sure, to change status?");
                }
                else {
                    alert("Select Item(s) to change status.");
                    return false;
                }
            }
        </script>
    </div>
</asp:Content>

