<%@ page language="C#" autoeventwireup="true" inherits="Forms_VehicleMaintenanceHistory, App_Web_phobza4z" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>--%>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>
<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT Device Maintenance</title>
    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <%--<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />--%>
    <%--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">--%>
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link href="../css/Updated_css.css" rel="stylesheet" type="text/css" />
    <link href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <%--<link type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />--%>
    <link type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="icon" href="../NewDesign/img/favicon.png" type="image/x-icon">
    <link href="../NewDesign/css/bootstrap.css" rel="stylesheet" />
    <link href="../NewDesign/css/font-awesome.css" rel="stylesheet" />
    <link href="../NewDesign/css/responsive.css" rel="stylesheet" />
    <link href="../NewDesign/css/style.css" rel="stylesheet" />
    <script src="../NewDesign/js/jquery.min.js"></script>
    <script src="../js/jquery-3.3.1.min.js"></script>
    <script src="../NewDesign/js/bootstrap.min.js"></script>
    <script src="../NewDesign/js/jquery.js"></script>
    <script src="../NewDesign/js/script.js"></script>
    <link href="../NewDesign/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
    <link href="../NewDesign/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" />
    <%--BootStrap Css--%>
    <%--<link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />--%>
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--End of BootStrap Css--%>
    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <%--<script type="text/javascript" src="../js/ui.datepicker.js"></script>--%>
    <%--<script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>--%>

    <%--<script src="../js/bootstrap.js"></script>--%>
    <style>
        body {
            font-family: Arial, Helvetica, sans-serif;
        }

        #imgserviceImage1 {
            border-radius: 5px;
            cursor: pointer;
            transition: 0.3s;
        }

            #imgserviceImage1:hover {
                opacity: 0.7;
            }

        #imgserviceImage2 {
            border-radius: 5px;
            cursor: pointer;
            transition: 0.3s;
        }

            #imgserviceImage2:hover {
                opacity: 0.7;
            }

        .lnkremovecss {
            display: none;
        }
        /* The Modal (background) */
        .modal {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1; /* Sit on top */
            padding-top: 100px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
        }
        /* Modal Content (image) */
        .modal-content {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
        }
        /* Caption of Modal Image */
        #caption1 {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
            text-align: center;
            color: #ccc;
            padding: 10px 0;
            height: 150px;
        }

        #caption2 {
            margin: auto;
            display: block;
            width: 80%;
            max-width: 700px;
            text-align: center;
            color: #ccc;
            padding: 10px 0;
            height: 150px;
        }
        /* Add Animation */
        .modal-content, #caption1 {
            -webkit-animation-name: zoom;
            -webkit-animation-duration: 0.6s;
            animation-name: zoom;
            animation-duration: 0.6s;
        }

        .modal-content, #caption2 {
            -webkit-animation-name: zoom;
            -webkit-animation-duration: 0.6s;
            animation-name: zoom;
            animation-duration: 0.6s;
        }

        @-webkit-keyframes zoom {
            from {
                -webkit-transform: scale(0);
            }

            to {
                -webkit-transform: scale(1);
            }
        }

        @keyframes zoom {
            from {
                transform: scale(0);
            }

            to {
                transform: scale(1);
            }
        }

        .btnclose {
            padding: 0;
            position: relative;
            cursor: pointer;
            text-align: right;
        }
        /*.btn {
            padding: 0;
            text-align: left;
            cursor: pointer;
        }*/
        /* The Close Button */
        .close {
            position: absolute;
            top: 15px;
            right: 35px;
            color: #f1f1f1;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
            cursor: pointer;
        }

            .close:hover,
            .close:focus {
                color: #bbb;
                text-decoration: none;
                cursor: pointer;
            }
        /* 100% Image Width on Smaller Screens */
        @media only screen and (max-width: 700px) {
            .modal-content {
                width: 100%;
            }
        }
    </style>
    <script type="text/javascript">
        function hidestatus() {
            window.status = ''
            return true
        }
        if (document.layers)
            document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
        document.onmouseover = hidestatus
        document.onmouseout = hidestatus
    </script>
    <script type="text/javascript">
        function onImageClick1() {
            var modal = document.getElementById('myModal1');
            var img = document.getElementById('imgserviceImage1');
            var modalImg = document.getElementById("img01");
            modal.style.display = "block";
            modalImg.src = img.src;
            return false;
        }
        function ClosePop1() {
            var modal = document.getElementById('myModal1');
            modal.style.display = "none";
        }
        function onImageClick2() {
            var modal = document.getElementById('myModal2');
            var img = document.getElementById('imgserviceImage2');
            var modalImg = document.getElementById("img02");
            modal.style.display = "block";
            modalImg.src = img.src;
            return false;
        }
        function ClosePop2() {
            var modal = document.getElementById('myModal2');
            modal.style.display = "none";
        }
        function onclickremove1() {
            var fupload1 = document.getElementById('fupImage1');
            fupload1.value = '';
        }
        function onclickremove2() {
            var fupload2 = document.getElementById('fupImage2');
            fupload2.value = '';
        }
    </script>
    <script src="../js/wow.min.js"></script>
</head>
<body class="white">
    <div class="page-wrapper">
        <div class="preloader"></div>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="updGrid" runat="server" UpdateMode="Always">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div class="vlive-reports-section maintenance">
                        <div class="container-fluid">
                            <div class="row clearfix">
                                <div class="col-ks-16">
                                    <div class="col-ks-8 HeaderTest">
                                        <div class="col-ks-16">
                                            <h2 class="pull-left">
                                                <asp:Literal ID="lblFleetMaintenanceCaption" Text="Fleet Maintenance" runat="server"></asp:Literal>
                                            </h2>
                                        </div>
                                        <div class="col-ks-16">
                                            <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
                                                <NodeStyle CssClass="active" />
                                            </asp:SiteMapPath>
                                        </div>
                                    </div>
                                    <div class="col-ks-8 HeaderTopButton">
                                        <div class="col-ks-16">
                                            <asp:LinkButton ID="ibtnNearingMaintenance" runat="server" PostBackUrl="~/Forms/NearingMaintenance.aspx"
                                                CssClass="btn btn-fa-file-text-o btn-primary" Text="&nbsp;&nbsp;Nearing Maintenance" />
                                            <asp:LinkButton ID="ibtnAdhocServices" runat="server" PostBackUrl="~/Forms/UnPlannedServices.aspx"
                                                CssClass="btn btn-primary btn-fa-wrench" Text="&nbsp;&nbsp;Service Call log" />
                                            <asp:LinkButton ID="lnkbtnfleetmaintenance" runat="server" CausesValidation="false" CssClass="fa-arrow-left btn btn-primary" PostBackUrl="~/Forms/FleetMaintenancePanel.aspx" Text="&nbsp;&nbsp;Back to Maintenance">
                                            </asp:LinkButton>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="vlive-filter">
                        <div class="container-fluid">
                            <div class="vlive-centrifugal-fan maintenance-plan">
                                <div class="col-ks-16 vlive-header_VXL">
                                    <div class="col-ks-16">
                                        <asp:Label ID="lblServiceHistory" runat="server" CssClass="pnlhearder" Text="Service History"></asp:Label>
                                    </div>
                                </div>
                                <div class="row ftop">
                                    <asp:Panel ID="pnlServiceHistoryParams" runat="server">
                                        <div id="tblServiceHistorySearch">
                                            <div class="col-md-12">
                                                <div>
                                                    
                                                    <div class="col-ks-2_5">
                                                        <asp:Label ID="lblFleet" runat="server" Text="Site"></asp:Label>
                                                        <asp:DropDownList ID="ddlFleet" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged" CssClass="form-control">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-ks-2">
                                                        <asp:Label ID="lblVehicle" runat="server" Text="Device"></asp:Label>
                                                        <asp:DropDownList ID="ddlVehicle" runat="server" AppendDataBoundItems="true" CssClass="form-control">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-ks-2">
                                                        <asp:Label ID="lblPlan" runat="server" Text="Plan"></asp:Label>
                                                        <asp:DropDownList ID="ddlMainPlans" runat="server" AppendDataBoundItems="true" CssClass="form-control">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-ks-2 ControlHide">
                                                        <asp:Label ID="lblServiceStatus" runat="server" Text="Status"></asp:Label>
                                                        <asp:DropDownList runat="server" ID="ddlServiceStatus" align="Left" cellpadding="2" CssClass="form-control">
                                                            <asp:ListItem Text="All" Value="5" Selected="True"></asp:ListItem>
                                                            <asp:ListItem Text="Completed" Value="1"></asp:ListItem>
                                                            <asp:ListItem Text="Skipped" Value="2"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-ks-2">
                                                        <asp:Label ID="lblServiceType" runat="server" Text="Service Type"></asp:Label>
                                                        <asp:DropDownList ID="ddlServiceType" runat="server" CssClass="form-control">
                                                            <asp:ListItem Value="4">All</asp:ListItem>
                                                            <%--<asp:ListItem Value="3">Concrete Mix Hours</asp:ListItem>
                                                            <asp:ListItem Value="1">Odometer</asp:ListItem>--%>
                                                            <%--<asp:ListItem Value="0">Running Hours</asp:ListItem>--%>
                                                            <asp:ListItem Value="2">Time Based</asp:ListItem>
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-ks-2">
                                                        <asp:Label ID="lblDateFrom" runat="server" Text="Execution From"></asp:Label>
                                                        <asp:HiddenField runat="server" ID="hdnDateFormat" Value="dd-MMM-yyyy" />
                                                        <div class="input-group" id="dtFromDate" runat="server">
                                                            <asp:TextBox ID="txtHistoryStartDate" runat="server" CssClass="form-control" oncopy="return false"
                                                                oncut="return false" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                onpaste="return false" ToolTip="dd/MMM/yyyy"></asp:TextBox>
                                                            <div class="input-group-addon" style="cursor: pointer">
                                                                <i class="fa fa-calendar"></i>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-ks-2">
                                                        <asp:Label ID="lblDateTo" runat="server" Text="To"></asp:Label>
                                                        <div class="input-group" id="dtToDate" runat="server">
                                                            <asp:TextBox ID="txtHistoryEndDate" runat="server" CssClass="form-control" oncopy="return false"
                                                                oncut="return false" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                onpaste="return false" ToolTip="dd/MMM/yyyy"></asp:TextBox>
                                                            <div class="input-group-addon" style="cursor: pointer">
                                                                <i class="fa fa-calendar"></i>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-ks-1" style="padding-top: 25px;">
                                                        <asp:LinkButton ID="btnSearch" runat="server" CssClass="btn btn-danger btn-circle btn-lg" OnClick="btnSearch_Click"
                                                            OnClientClick="if(ValidateServiceHistory()) {document.getElementById('divMsg').innerHTML=''; ShowPopUp();} else {return false;}"><i class="fa fa-search"></i></asp:LinkButton>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                        </div>
                    </div>
                    <asp:Panel ID="pnlFleetDetailsList" runat="server">
                        <div class="vlive-filter">
                            <div class="container-fluid">
                                <div class="vlive-centrifugal-fan maintenance-plan">
                                    <div class="col-ks-16 vlive-header_VXL">
                                        <div class="col-ks-13">
                                            <asp:Label ID="lblserviceDts" runat="server" CssClass="pnlhearder" Text="Service History Details"></asp:Label>
                                        </div>
                                        <div class="col-ks-1">
                                            <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" CssClass="form-control exportddl"
                                                ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                EnableTheming="true" Theme="Office2003Blue">
                                                <Items>
                                                    <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                    <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                    <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                </Items>
                                            </dxw:ASPxComboBox>
                                        </div>
                                        <div class="col-ks-2">
                                            <asp:LinkButton ID="ibtnExport" runat="server" CssClass="btn btn-primary btn-fa-file-excel-o" Text="&nbsp;&nbsp;Export"
                                                OnClick="ibtnExport_Click" />
                                        </div>
                                    </div>
                                    <div class="row ftop">
                                        <div class="col-md-12">
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvVehicleServiceHistory" runat="server" Width="100%" KeyFieldName="ServiceDetailsId"
                                                    ClientInstanceName="gvVehicleServiceHistory" EnableTheming="true" Theme="Office2003Blue"
                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue">
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                            <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                Width="11px" />
                                                            <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                Width="11px" />
                                                            <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                Width="11px" />
                                                            <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                Width="11px" />
                                                        </Images>--%>
                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="Office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                        PageSize="10">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewDataColumn FieldName="ServiceDetailsId" Caption="AutoID" VisibleIndex="0"
                                                            Visible="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="RefNo" Caption="Ref. No." VisibleIndex="1" Width="60px"
                                                            CellStyle-HorizontalAlign="Center">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblrefNO" runat="server" Text='<%# Eval("RefNo").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="VehicleDescription" Caption="Device Name" VisibleIndex="2"
                                                            Width="150px">
                                                            <HeaderCaptionTemplate>
                                                                <center>
                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                    <tr>
                                                                        <td style="height: 20px; padding-top: 4px">
                                                                            <asp:Label ID="lblgVehicleNameH" runat="server" Text="Device Name"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </center>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblVehicleName" runat="server" Text='<%# Eval("VehicleDescription").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="Type" Caption="Type" VisibleIndex="3" Width="100px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblType" runat="server" Text='<%# Eval("Type").ToString() %>' ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="PlanName" Caption="Plan Name" VisibleIndex="4"
                                                            Width="150px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblPlanName" runat="server" Text='<%# Eval("PlanName").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="ServiceType" Caption="Service Type" VisibleIndex="5">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="ExecutionDateSort" Caption="Execution Date" VisibleIndex="5"
                                                            Width="100px" CellStyle-HorizontalAlign="Center">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblExecutionDate" runat="server" Text='<%# Eval("ExecutionDate") == DBNull.Value ? "" : Eval("ExecutionDate") %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="ExecutionDate" Caption="Execution Date" VisibleIndex="5"
                                                            Width="100px" CellStyle-HorizontalAlign="Center" Visible="false">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblExecutionDateHid" runat="server" Text='<%# Eval("ExecutionDate") == DBNull.Value ? "" : (Convert.ToString(Eval("ServiceType")) == "Time Based"?Eval("ExecutionDate"):"NA") %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="DelayBy" Caption="Delay By" VisibleIndex="6"
                                                            Width="100px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblDelayBy" runat="server" Text='<%# Eval("DelayBy").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="ServicedBy" Caption="Serviced By" VisibleIndex="7"
                                                            Width="100px">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblservicedby" runat="server" Text='<%# Eval("ServicedBy").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="true" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="TotalPlannedCost1" Caption="Planned Cost" VisibleIndex="8"
                                                            Width="100px" CellStyle-HorizontalAlign="Center">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblPlannedCost" runat="server" Text='<%# Eval("Type").ToString() == "Planned" ? Eval("TotalPlannedCost").ToString() : "N/A" %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="ActualCost" Caption="Actual Cost" VisibleIndex="9"
                                                            Width="100px" CellStyle-HorizontalAlign="Center">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblActualCost" runat="server" Text='<%# Eval("ActualCost").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn Caption="Before Service" VisibleIndex="10" Width="300px"
                                                            CellStyle-Wrap="True" FieldName="BeforeService" Visible="false">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="l1" runat="server" Style="word-break: break-all" Text='<%# Eval("BeforeService").ToString() %>' ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn Caption="After Service" VisibleIndex="11" Width="300px" EditCellStyle-Wrap="True" HeaderStyle-Wrap="True"
                                                            CellStyle-Wrap="Default" FieldName="AfterService" Visible="false">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="l4" runat="server" Style="word-break: break-all" Text='<%# Eval("AfterService").ToString() %>' ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <%-- <dxw:GridViewDataColumn Caption="Before Service" VisibleIndex="10" Width="10%"
                                                                CellStyle-Wrap="True">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="l1" runat="server" Text='<%# Eval("BeforeT").ToString() %>'></asp:Label>
                                                                    </br>
                                                                    <asp:Label ID="l2" runat="server" Text='<%# Eval("BeforeP").ToString() %>'></asp:Label>
                                                                    </br>
                                                                    <asp:Label ID="l3" runat="server" Text='<%# Eval("BeforePO").ToString() %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn Caption="After Service" VisibleIndex="10" Width="10%"
                                                                CellStyle-Wrap="True">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="l4" runat="server" Text='<%# Eval("AfterT").ToString() %>'></asp:Label>
                                                                    </br>
                                                                    <asp:Label ID="l5" runat="server" Text='<%# Eval("AfterP").ToString() %>'></asp:Label>
                                                                    </br>
                                                                    <asp:Label ID="l6" runat="server" Text='<%# Eval("AfterPO").ToString() %>'></asp:Label>
                                                                    </br>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>--%>
                                                        <dxw:GridViewDataColumn FieldName="Status" Caption="Status" VisibleIndex="12" Width="100px"
                                                            CellStyle-Wrap="True">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="glblStatus" runat="server" Text='<%# Eval("Status").ToString() %>'
                                                                    ForeColor='<%# Convert.ToInt64(Eval("NearingPercentage").ToString()) > 100 ? System.Drawing.Color.Red : (Eval("Type").ToString() == "Planned" && (Convert.ToDecimal(Eval("TotalPlannedCost").ToString()) < Convert.ToDecimal(Eval("ActualCost").ToString()) && Eval("Status").ToString() == "Completed") ? System.Drawing.Color.Blue : System.Drawing.Color.Black) %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="Status" Caption="Status" VisibleIndex="13" Width="70px"
                                                            CellStyle-Wrap="True">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="ibView" runat="server" ToolTip="View Service Details" OnClientClick="document.getElementById('divMsg').innerHTML=''; ShowPopUp();"
                                                                    OnClick="glbtnRefNo_Click" CommandArgument='<%# Eval("ServiceDetailsId").ToString() + "~" 
                                                                        + Eval("ExecutionDate").ToString() + "~" + Eval("TotalPlannedCost").ToString() + "~" 
                                                                        + Eval("ActualCost").ToString() + "~" + Eval("Comments").ToString() + "~" 
                                                                        + Eval("PlanId").ToString() + "~" + Eval("RescheduledOn").ToString() + "~"
                                                                        + Eval("VehicleDescription").ToString() + "~" + Eval("PlanName").ToString() + "~"
                                                                        + Eval("ServiceType").ToString() + "~" + Eval("ReadingsOnClose").ToString() + "~"
                                                                        + Eval("Type").ToString()+ "~" + Eval("document1").ToString() + "~" + Eval("document2").ToString() %>'>
                                                                      <img src="../images/icn-view.gif"/></asp:LinkButton>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="false" />
                                                        </dxw:GridViewDataColumn>
                                                    </Columns>
                                                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                    <SettingsText EmptyDataRow="No maintenance history were found for the Device" />
                                                </dxw:ASPxGridView>
                                            </div>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvVehicleServiceHistory"
                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}
                                                                    {\f1\fnil\fcharset0 Arial;}}\viewkind4\uc1\pard\qc\ul\b\f0\fs28 Service History Details\par\pard\ulnone\f1\par\par}"
                                                DetailHorizontalOffset="1" DetailVerticalOffset="1" MaxColumnWidth="12000">
                                                <Styles>
                                                    <Default VerticalAlign="Middle">
                                                    </Default>
                                                    <Header BackColor="#D1D1D1" Font-Bold="True" Font-Names="Arial" Font-Size="10pt"
                                                        ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True">
                                                    </Header>
                                                    <Cell VerticalAlign="Middle">
                                                    </Cell>
                                                </Styles>
                                                <PageHeader VerticalAlignment="None">
                                                    <Font Bold="False" Size="10pt"></Font>
                                                </PageHeader>
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="ibtnExport" />
                </Triggers>
            </asp:UpdatePanel>
            <%--<div class="modalBackground" runat="server" id="bg" style="position: fixed; left: 0px; top: 0px; z-index: 10003; width: 1903px; height: 1366px;">
            </div>--%>
            <asp:Panel ID="pnlServiceDetails" runat="server" Style="display: none;" CssClass="searchPanel">
                <asp:UpdatePanel ID="upServiceDetails" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <%-- <script type="text/javascript">
                             Sys.Application.add_load(onImageClick1);
                     </script>--%>
                        <div class="popup">
                            <div class="top">
                                <div class="row">
                                    <div class="col-md-11">
                                        <h1>
                                            <asp:Label ID="lblServiceDetailsHeading" Text="Device History Details" runat="server"></asp:Label>
                                            <%--<asp:ImageButton ID="ibtClose" runat="server" OnClientClick="CategoryPopup(false);"
                                        ImageUrl="~/Images/popup-close.gif" />--%>
                                        </h1>
                                    </div>
                                    <div class="col-md-1" align="right">
                                        <asp:LinkButton ID="ibtClose" runat="server" ToolTip="close" CssClass="Map-btn-fa-times-circle-o" OnClientClick="CategoryPopup(false);" onkeydown="return Keyfocus();"></asp:LinkButton>
                                    </div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <div class="form-horizontal">
                                    <div class="form-tbl padding-sm-lrb">
                                        <div class="row form-group">
                                            <div class="col-md-12">
                                                <div class="col-md-6">
                                                    <div class="col-ks-8">
                                                        <asp:Label ID="lblExecutionDateH" runat="server" Text="Execution Date :"></asp:Label>
                                                    </div>
                                                    <div class="col-ks-8">
                                                        <asp:Label ID="lblExecutionDate" runat="server" Text="" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                    </div>
                                                </div>
                                                <div class="col-md-6">
                                                    <div class="col-ks-8">
                                                        <asp:Label ID="lblServiceTypeH" runat="server" Text="Service Type :"></asp:Label>
                                                    </div>
                                                    <div class="col-ks-8">
                                                        <asp:Label ID="lblPServiceType" runat="server" Text="" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="vlive-filter">
                                        <div class="container-fluid">
                                            <div class="vlive-centrifugal-fan maintenance-plan">
                                                <div class="col-ks-16 vlive-header_VXL">
                                                    Service History Details
                                                </div>
                                                <div class="row ftop">
                                                    <div class="col-md-12">
                                                        <div class="table-responsive">
                                                            <dxw:ASPxGridView ID="gvServiceDetails" runat="server" Width="100%" KeyFieldName="ServiceId"
                                                                ClientInstanceName="gvServiceDetails" EnableTheming="true" Theme="Office2003Blue"
                                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue">
                                                                <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(); }" />
                                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                    CssPostfix="Office2003_Blue">
                                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                    </Header>
                                                                    <LoadingPanel ImageSpacing="10px">
                                                                    </LoadingPanel>
                                                                    <PagerBottomPanel CssClass="PageFooter">
                                                                    </PagerBottomPanel>
                                                                    <PagerTopPanel CssClass="PageFooter">
                                                                    </PagerTopPanel>
                                                                </Styles>
                                                                <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                    PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                    NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                    NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                    PageSize="5">
                                                                </SettingsPager>
                                                                <Columns>
                                                                    <dxw:GridViewDataColumn FieldName="ServiceId" Caption="AutoID" VisibleIndex="0"
                                                                        Visible="false">
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="ServiceName" Caption="Service Name" VisibleIndex="1"
                                                                        Width="30%">
                                                                        <HeaderCaptionTemplate>
                                                                            <center>
                                                                <table cellpadding="0" cellspacing="0" border="0">
                                                                    <tr>
                                                                        <td style="height: 20px; padding-top: 4px">
                                                                            <asp:Label ID="lblgServiceNameH" runat="server" Text="Service Name"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </center>
                                                                        </HeaderCaptionTemplate>
                                                                        <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn Caption="Serviced" VisibleIndex="2" Width="15%" CellStyle-HorizontalAlign="Center">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="glblServiced" runat="server" Text='<%# Eval("ServicedOn") != DBNull.Value ? "Yes" : "No" %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="ServicedOn" Caption="Serviced On" VisibleIndex="3"
                                                                        Width="15%" CellStyle-HorizontalAlign="Center">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="glblServicedOn" runat="server" Text='<%# Eval("ServicedOn") != DBNull.Value ? Convert.ToDateTime(Eval("ServicedOn")).ToString("dd-MMM-yyyy") : "N/A" %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="PlannedCost" Caption="Planned Cost" VisibleIndex="5"
                                                                        Width="15%">
                                                                        <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="ServiceCost" Caption="Actual Cost" VisibleIndex="6"
                                                                        Width="15%">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="glblActualCost" runat="server" Text='<%# Eval("ServiceCost") != DBNull.Value ? Eval("ServiceCost").ToString() : "0" %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                    </dxw:GridViewDataColumn>
                                                                </Columns>
                                                                <Settings ShowFilterRow="False" ShowFilterRowMenu="True" />
                                                                <SettingsText EmptyDataRow=" No maintenance services found" />
                                                            </dxw:ASPxGridView>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row" style="padding-bottom: 10px;">
                                                    <div class="col-md-6">
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblTotalPlannedCostH" runat="server" Text="Total Planned Cost :"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblTotalPlannedCost" runat="server" Text="" Font-Bold="true" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblTotalActualCostH" runat="server" Text="Total Cost Incurred :"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblTotalActualCost" runat="server" Text="675" Font-Bold="true" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row" style="padding-bottom: 10px;">
                                                    <div class="col-md-6" id="trReadingsOnClose" runat="server">
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblReadingsOnCloseH" runat="server" Text="Readings when closed :"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblReadingsOnClose" runat="server" Text="" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblCommentsH" runat="server" Text="Comments :"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lblComments" runat="server" Text="Completed all Services" CssClass="form-control" Style="background-color: #f1f1f1 !important;"></asp:Label>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row" style="padding-bottom: 10px;">
                                                    <div class="col-md-6">
                                                        <div class="col-ks-8">
                                                            <asp:Label ID="lbldocuments" runat="server" Text="Documents:"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-8">
                                                            <asp:LinkButton ID="lnkimgname1" runat="server" Visible="false" OnClientClick="ShowPopUp();" OnClick="lnkimgname1_Click"><i class="btn-fa-file-text-o"></i>&nbsp;&nbsp;Document1</asp:LinkButton>
                                                            &nbsp;&nbsp;
                                                            <asp:LinkButton ID="lnkimgname2" runat="server" Visible="false" OnClientClick="ShowPopUp();" OnClick="lnkimgname2_Click"><i class="btn-fa-file-text-o"></i>&nbsp;&nbsp;Document2</asp:LinkButton>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="col-ks-16">
                                                            <asp:Panel runat="server" ID="IpdfViewer" Style="width: 100%; height: 100%">
                                                            </asp:Panel>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-tbl padding-sm-lrt">
                                        <div class="form-group padding-sm-lrt">
                                            <div class="col-md-4">
                                                <img id="imgserviceImage1" runat="server" style="margin-top: 5px; cursor: zoom-in; display: none" />
                                                <asp:HiddenField ID="hdfImage1" runat="server" />
                                                <!-- The Modal -->
                                                <div id="myModal1" class="modal">
                                                    <span class="close" onclick="ClosePop1();">&times;</span>
                                                    <img class="modal-content" id="img01">
                                                    <div id="caption1"></div>
                                                </div>
                                            </div>
                                            <div class="col-md-2"></div>
                                            <div class="col-md-4">
                                                <img id="imgserviceImage2" runat="server" style="margin-top: 5px; cursor: zoom-in; display: none" />
                                                <asp:HiddenField ID="hdfImage2" runat="server" />
                                                <!-- The Modal -->
                                                <div id="myModal2" class="modal">
                                                    <span class="close" onclick="ClosePop2();">&times;</span>
                                                    <img class="modal-content" id="img02">
                                                    <div id="caption2"></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-12">
                                                <div class="col-xs-4 padding-width-sm override-col-width">
                                                    <asp:Label ID="lblResheduledDateH" runat="server" Text="Resheduled Date :"></asp:Label>
                                                </div>
                                                <div class="col-xs-8 padding-width-sm">
                                                    <asp:Label ID="lblResheduledDate" runat="server" Text=""></asp:Label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-xs-12" align="right">
                                                <asp:LinkButton ID="btnCancelServiceDetails" runat="server" class="btn btn-primary btn-fa-times" Text="&nbsp;&nbsp;Close" CausesValidation="false" OnClientClick="CategoryPopup(false);" onkeydown="return Keyfocus();" />
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divMsg" runat="server" align="center" style="font-weight: bold;">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdnLogout" runat="server" />
            <script type="text/javascript" language="javascript" src="../js/DateValidations.js"></script>
            <script type="text/javascript" language="javascript">
                function ExpandOrCollpase(buttonName) {
                    var isIE = CheckBrowser();
                    var nameofButton = buttonName.toString();
                    var OperationsElement = document.getElementById(nameofButton.substring(0, nameofButton.lastIndexOf("_")) + "_trServiceHistoryList");
                    var operationsClassName = OperationsElement.getAttribute(isIE ? 'className' : 'class');
                    if (operationsClassName == (isIE ? 'ControlShow' : 'ControlShowFF')) {
                        OperationsElement.setAttribute(isIE ? 'className' : 'class', 'ControlHide');
                        document.getElementById(buttonName).src = '../images/gvCollapsedButton.png';
                    }
                    else {
                        OperationsElement.setAttribute(isIE ? 'className' : 'class', (isIE ? 'ControlShow' : 'ControlShowFF'));
                        document.getElementById(buttonName).src = '../images/gvExpandedButton.png';
                    }
                }
                function ShowDate() {
                    if (document.getElementById('tdDate') != null) {
                        document.getElementById('tdDate').style.display = (document.getElementById('ddlServiceStatus').value == 3) ? "block" : "none";
                    }
                }
                function CategoryPopup(isShow) {
                    if (document.getElementById('pnlServiceDetails') != null) {
                        document.getElementById('pnlServiceDetails').style.display = (isShow) ? "block" : "none";
                    }
                    if (isShow) {
                        document.getElementById('pnlServiceDetails').focus();
                    }
                }
                function ShowServiceHistory(isShow) {
                    if (document.getElementById('tblViewServiceHistory') != null) {
                        document.getElementById('tblViewServiceHistory').style.display = (isShow) ? "block" : "none";
                    }
                    if (document.getElementById('tblServiceHistorySearch') != null) {
                        document.getElementById('tblServiceHistorySearch').style.display = (isShow) ? "none" : "block";
                    }
                    if (document.getElementById('pnlFleetDetailsList') != null) {
                        document.getElementById('pnlFleetDetailsList').style.display = (isShow) ? "none" : "block";
                    }
                    return false;
                }
            </script>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting" BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                <br />
                <img alt="Please Wait ..." src="../images/47.gif" /><br />
                <br />
                <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                <br />
                <br />
            </center>
            </asp:Panel>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
    <script src="../JQTimePicker/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="../JQTimePicker/jquery-2.1.1.min.js"></script>
    <link id="Link3" runat="server" href="../css/Monitor_css/bootstrap-datetimepicker.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JQTimePicker/moment-with-locales.js"></script>
    <script type="text/javascript" src="../js/Monitor_js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="../js/BDatePicker.js"></script>
</body>
</html>
