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

<%@ 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 src="../plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        function DynamicDatePickerForTime(Format, txtBoxId) {
            $("#" + txtBoxId).datetimepicker({ format: "HH:mm" });
        }
        $(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";
        }
    </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" />
                            </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="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">
                                            <asp:Label ID="lbl_Status" runat="server"></asp:Label>
                                        </div>
                                        <div class="col-md-3">
                                            <asp:DropDownList ID="ddlStatus" runat="server" CssClass="form-control select2">
                                                <asp:ListItem Text="All" Value="All"></asp:ListItem>
                                                <asp:ListItem Text="Approved" Value="Approved"></asp:ListItem>
                                                <asp:ListItem Text="Forwarded" Selected="True" Value="Forwarded"></asp:ListItem>
                                                <asp:ListItem Text="Pending"  Value="Pending"></asp:ListItem>
                                                <asp:ListItem Text="Rejected" Value="Rejected"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>

                                        <div class="col-md-1">
                                        </div>

                                        <%-- <div class="col-md-2" >
                                            <asp:Label ID="lblFileDownload" runat="server" Text ="Select File"></asp:Label>
                                        </div>

                                        <div class="col-md-3">
                                             <asp:LinkButton ID="btnTemplate" CssClass="btn save-btn fa-download" runat="server"
                                        onclick="btnTemplate_Click" Style="margin-left: 0px" Text="MC File" />
                                        </div>--%>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-2">
                                            <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-2">
                                            <asp:RadioButton ID="rbPermission" runat="server" Text="Permission Sanction" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:RadioButton ID="rbOnduty" runat="server" Text="Onduty Sanction" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" />
                                        </div>
                                        <div class="col-md-2">
                                            <asp:RadioButton ID="rbtnTimesheet" runat="server" Text="Timesheet" CssClass="radio radio-primary" GroupName="Sanction" onchange="return isOnduty();" />
                                        </div>

                                        <div class="col-md-2" style="display: block;">
                                            <asp:RadioButton ID="rbtnMyProfile" runat="server" Text="MyProfile" CssClass="radio radio-primary" GroupName="Sanction" />
                                        </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 class="form-group">
                                    <div class="col-md-5">
                                    </div>
                                    <div class="col-md-6">
                                        <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 FieldName="employeeid"
                                                            VisibleIndex="0" Width="100px">
                                                            <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: 100px; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_FirstName"
                                                            VisibleIndex="1" Width="112px">
                                                            <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: 112px; 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="112px">
                                                            <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="112px">
                                                            <Settings AllowAutoFilter="false" AllowDragDrop="false" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("Duration") %>'></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:GridViewDataTextColumn FieldName="Reason" VisibleIndex="5" Width="150px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblReason" runat="server" Text='<%# Bind("Reason") %>'></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>
                                                    <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="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="100px">
                                                            <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="150px" 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="112px">
                                                            <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="170px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Duration") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Type" VisibleIndex="5" Width="112px">
                                                            <Settings AllowDragDrop="False" />
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Status" VisibleIndex="6" Width="85px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Reason" VisibleIndex="7" Width="250px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblReason" runat="server" Text='<%# Bind("Reason") %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="" VisibleIndex="8" Width="40px">
                                                            <Settings AllowAutoFilter="false" AllowDragDrop="false" />
                                                            <DataItemTemplate>
                                                                <center>
                                                                 <asp:Label ID="lblDownload" runat="server" Visible="false"  Text='<%# Eval("Download") %>'></asp:Label>
                                                                    <asp:ImageButton ID="btnDownload" runat="server" ToolTip='<%# Bind("Result") %>' 
                                                                        CommandName="GetDownload"
                                                                         CommandArgument='<%# Eval("LeaveApplication_Id") %>' 
                                                                        data-toggle="tooltip" data-placement="top" Width="22px" Height="22px" ImageUrl="~/Images/downloadicon.png" OnClick="btnDownload_Click"  />
                                                                </center>
                                                            </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 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"
                                                            Visible="false" Width="0px">
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowFilterRow="true" />
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <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" CommandName="Approved" runat="server" Text="Sanction" CssClass="btn save-btn fa-thumbs-o-up" OnClientClick="return confirmForward(this.form,1);"
                                                    OnClick="btnSaveLeaveSanction_Click" />

                                                <asp:LinkButton ID="btnReject" CommandName="Rejected" runat="server" CssClass="btn save-btn fa-thumbs-o-down"
                                                    OnClick="btnSaveLeaveSanction_Click" OnClientClick="return confirmForward(this.form,1);" />

                                                <asp:HiddenField ID="hdnLeaveApplicationId" runat="server" />
                                                <asp:HiddenField ID="HiddenField1" runat="server" />
                                                <asp:HiddenField ID="HiddenField2" runat="server" />
                                            </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="120px">
                                                            <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="100px">
                                                            <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>
                                                    <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="100px">
                                                            <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="112px">
                                                            <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="112px">
                                                            <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="112px" 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="85px">
                                                            <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="112px">
                                                            <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="85px">
                                                            <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="150px">
                                                            <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="85px">
                                                            <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="100px">
                                                            <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="112px">
                                                            <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="112px">
                                                            <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="112px" 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="85px">
                                                            <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="112px">
                                                            <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="85px">
                                                            <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="85px">
                                                            <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="150px">
                                                            <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 ShowFilterRow="true" />
                                                    <SettingsPager PageSize="10">
                                                    </SettingsPager>
                                                    <SettingsText EmptyDataRow="No Records Found" />
                                                    <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 id="divTimesheet" runat="server" style="display: none">
                                    <div class="row form-group">
                                        <div class="col-md-12">
                                            <div class="table-responsive" style="height: 400px; width: 100%; overflow-y: auto;">
                                                <asp:GridView ID="grvTimesheetEntry" runat="server" DataKeyNames="TaskDetailID" CssClass="table das-table1"
                                                    AutoGenerateColumns="false" Width="100%" OnRowDataBound="grvTimesheetEntry_RowDataBound">
                                                    <Columns>
                                                        <asp:TemplateField HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" />
                                                        </asp:TemplateField>
                                                        <%--2.RecordID--%>
                                                        <asp:TemplateField Visible="False" HeaderText="Employee Id" HeaderStyle-Width="100px">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblTaskDetailID" runat="server" Text='<%#Eval("TaskDetailID") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <%--3.Employeee ID--%>
                                                        <asp:TemplateField HeaderText="Employee Id" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="40px" ID="lblEmployeeID" runat="server" Text='<%# Eval("EmployeeID") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <%--4.Employee Name--%>
                                                        <asp:TemplateField HeaderText="Employee Name" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="150px" ID="lblEmployeeName" runat="server" Text='<%# Eval("EmployeeName") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Date" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="80px" ID="lblShiftDate" Text='<%#Eval("ShiftDate") %>' runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <%--7.Day Type--%>
                                                        <asp:TemplateField HeaderText="Project Name" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="150px" ID="lblProjectName" Text='<%#Eval("ProjectName") %>' runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <%--8.Actual OT--%>
                                                        <asp:TemplateField HeaderText="Task Name" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="150px" ID="lblTaskName" runat="server" Text='<%# Eval("TaskName") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Task Hour" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="20px" ID="lblTaskHours" runat="server" Text='<%# Eval("TaskHours") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Task Description" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="150px" ID="lblTaskDescription" runat="server" Text='<%# Eval("TaskDescription") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Spent Hour" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="20px" ID="lblSpentHours" runat="server" Text='<%# Eval("SpentHours") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Approved Hours" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:TextBox ID="txtApproved" runat="server" Text='<%# Eval("ApprovedHours") %>' CssClass="form-control"
                                                                    Style="width: 60px !important" MaxLength="5" onDrop="return false;" onpaste="return false;" onkeypress="return number_colon(event,this);"></asp:TextBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Status" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="100px" ID="lblStatus" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="empAutoID" HeaderStyle-CssClass="empheader" Visible="false">
                                                            <ItemTemplate>
                                                                <asp:Label Width="100px" ID="lblempAutoID" runat="server" Text='<%# Eval("Employee_Id") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField Visible="false" HeaderText="RecordID" HeaderStyle-CssClass="empheader">
                                                            <ItemTemplate>
                                                                <asp:Label Width="100px" ID="lblRecordID" runat="server" Text='<%# Eval("RecordID") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="pull-right-button">
                                                <asp:LinkButton ID="lnkbtnTimesheetApproval" CommandName="Approved" runat="server" CssClass="btn save-btn fa-thumbs-o-up"
                                                    OnClick="lnkbtnTimesheetApproval_Click" OnClientClick="return confirmForward(this.form,1);" />

                                                <asp:LinkButton ID="lnkbtnTimesheetReject" CommandName="Rejected" runat="server" CssClass="btn save-btn fa-thumbs-o-down"
                                                    OnClick="lnkbtnTimesheetApproval_Click" OnClientClick="return confirmForward(this.form,1);" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <%--MyProfile Start here--%>

                                <div id="divMyProfile" 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="HiddenField3" runat="server" />
                                                <asp:HiddenField ID="HiddenField4" runat="server" />
                                                <dxGridview:ASPxGridView ID="gdMyProfileSanctionView" runat="server" ClientInstanceName="gdMyProfileSanctionView"
                                                    EnableCallBacks="false" AutoGenerateColumns="false" Width="100%">
                                                    <Columns>
                                                        <dxGridview:GridViewDataTextColumn FieldName="Employee_Id"
                                                            VisibleIndex="0" Visible="false" Width="100px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblempid" Text='<%# Eval("Employee_Id") %>' Style="cursor: pointer; overflow-y: auto; overflow-x: auto; word-break: break-all; width: 100px; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn FieldName="SwipeCardNo" Caption="Employee Id"
                                                            VisibleIndex="1" Width="112px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="AppDate1" Text='<%# Eval("SwipeCardNo") %>' Style="cursor: pointer; overflow-y: auto; overflow-x: auto; word-break: break-all; width: 112px; word-wrap: break-word; display: inline-block;"
                                                                    runat="server"></asp:Label>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataTextColumn>
                                                        <dxGridview:GridViewDataTextColumn Caption="Employee Name" FieldName="Employee_FirstName"
                                                            VisibleIndex="2" Width="112px">
                                                            <Settings AllowDragDrop="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Employee_FirstName") %>'
                                                                    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="ModifiedDate" Caption="Application Date" VisibleIndex="3" Width="112px">
                                                            <Settings AllowDragDrop="false" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("ModifiedDate") %>'></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:GridViewDataTextColumn FieldName="Remarks" VisibleIndex="5" Width="80px">
                                                            <Settings AllowDragDrop="False" AllowAutoFilter="False" />
                                                            <DataItemTemplate>
                                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Remarks") %>'></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_Transaction_MyProfileTrans.aspx?Emp_Id=<%# Eval("Employee_Id") %>&Status=<%# Eval("Status") %>">
                                                                    <span class="btn btn-defalut edit-icons"></span></a>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </dxGridview:GridViewDataColumn>--%>
                                                        <dxGridview:GridViewDataColumn HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center" Width="40px">
                                                            <Settings AllowAutoFilter="false" />
                                                            <DataItemTemplate>
                                                                <asp:LinkButton runat="server" PostBackUrl='<%# String.Format("TA_UI_Transaction_MyProfileTrans.aspx?Emp_Id={0}&Status={1}", Eval("Employee_Id"),Eval("Status"))%>' ID="btnEditMyp" CssClass="btn btn-defalut edit-icons" Visible='<%# Convert.ToString(Eval("Status")).ToUpper()=="APPROVED" ||Convert.ToString(Eval("Status")).ToUpper()=="REJECTED"?false:true %>'></asp:LinkButton>
                                                            </DataItemTemplate>
                                                            <HeaderStyle HorizontalAlign="center" Wrap="true" CssClass="empheader" />
                                                        </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>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" lang="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;
                }
            }


            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;
                }
            }


            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>
    <script src="../plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>
</asp:Content>

