<%@ page language="C#" autoeventwireup="true" inherits="Forms_WOClose, App_Web_4uopfcmr" enableeventvalidation="false" %>

<%@ 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" %>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head id="head1" runat="server">
    <title>tSense-IoT Fleet Maintenance</title>
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet"
        type="text/css" />
    <link id="updatedcss" runat="server" href="../css/Updated_css.css" rel="stylesheet"
        type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" 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" />

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

    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

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

    <link rel="stylesheet" href="../css/bootstrapWO.css" />
    <%--********* For Bootstrap Implementation *************--%>
    <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 Implementation *************--%>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <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 id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-4 col-md-3 col-lg-3">
                                                <img class="icon" src="../images/fleetmaintenance-icon.png" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblFleetMaintenanceCaption" Text="Fleet Maintenance" runat="server"></asp:Literal></h1>
                                                <a href="Dashboard.aspx">
                                                    <asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label></a><span> &gt;</span><span><a
                                                        href="WOClose.aspx"><asp:Label ID="lblMaintenancePlanAssignment" Text="Work Order Verify & Close"
                                                            runat="server"></asp:Label></a></span>
                                            </div>
                                            <div class="col-sm-8  col-md-9 col-md-9 head-part-btns">
                                                <div class="pull-right">

                                                    <asp:HyperLink ID="btnBack1" runat="server" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                        NavigateUrl="~/Forms/ConfigurationSetup.aspx" Visible="false"></asp:HyperLink>
                                                    <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/FleetMaintenancePanel.aspx">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Back">
                                                                <div id="BacktoConfigurationDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Back to Fleet Maintenance
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </div>

                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                            <div class="icon-img"></div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel runat="server" ID="pnlSearch">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon"></span>

                                                </h1>
                                                <div class="form-tbl col-xs-12 nullpadding">
                                                    <div class="form-horizontal">
                                                        <div class="form-group" style="padding-top: 5px;">
                                                            <div class="col-sm-1 col-xs-3 padding-width-sm icon-img">
                                                                <asp:Image ID="imgFleetIcon" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name"
                                                                    runat="server" />
                                                                <asp:Label ID="lblFleet" runat="server" Text="Fleet"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-2 col-xs-9 padding-width-sm form-controllinebreak">
                                                                <asp:DropDownList ID="ddlFleet" CssClass="form-control" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>

                                                            <div id="tdVehicleIcon" class="col-sm-1 col-xs-3 padding-width-sm-left icon-img" runat="server" width="">
                                                                <asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif"
                                                                    AlternateText="Vehicle Name" />
                                                                <asp:Label ID="lblVehicle" runat="server" Text="Vehicle"></asp:Label>
                                                            </div>

                                                            <div id="tdVehicle" class="col-sm-2 col-xs-9 padding-width-sm form-controllinebreak" runat="server" width="">
                                                                <asp:DropDownList ID="ddlVehicle" CssClass="form-control" runat="server" OnSelectedIndexChanged="ddlVehicle_SelectedIndexChanged"
                                                                    AppendDataBoundItems="true">
                                                                </asp:DropDownList>
                                                            </div>
                                                            <div class="col-sm-1 col-xs-3 padding-width-sm icon-img">
                                                                <asp:Image ID="imgPlanIcon" ImageUrl="../images/icnPlanName.png" AlternateText="Plan Name"
                                                                    runat="server" />
                                                                <asp:Label ID="lblPlan" runat="server" Text="Plan"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-2 col-xs-9 padding-width-sm form-controllinebreak">
                                                                <asp:DropDownList ID="ddlFleetPlans" CssClass="form-control" runat="server" AutoPostBack="false" AppendDataBoundItems="true"
                                                                    OnSelectedIndexChanged="ddlFleetPlans_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>
                                                            <div class="col-sm-1  col-xs-3  padding-width-sm icon-img">
                                                                <asp:Label ID="Label10" runat="server" Text="Status"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-2 col-md-1 col-lg-1 col-xs-9 padding-width-sm form-controllinebreak">
                                                                <asp:DropDownList ID="ddlStatusSearch" runat="server" CssClass="form-control" TabIndex="6">
                                                                    <asp:ListItem Text="All" Value="0"></asp:ListItem>
                                                                    <asp:ListItem Text="Pending" Value="1"></asp:ListItem>
                                                                    <asp:ListItem Text="Redo" Value="3"></asp:ListItem>
                                                                    <asp:ListItem Text="Rejected" Value="4"></asp:ListItem>
                                                                    <asp:ListItem Text="Approved" Value="2"></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </div>
                                                            <div class="col-sm-1 padding-width-sm">
                                                                <asp:ImageButton ID="ibtnSearch" runat="server" ImageUrl="~/images/btn-search.jpg"
                                                                    OnClientClick="ShowPopUp();"
                                                                    OnClick="ibtnSearch_Click" CssClass="btn-default"></asp:ImageButton>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel runat="server" ID="pnlPlanAssignList" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/icn-schedule-reports.gif" alt="" /></span>
                                                    <asp:Label ID="Label6" runat="server" Text="Work Order Approval"></asp:Label>
                                                </h1>
                                                <div class="form-tbl nullpadding col-sm-12">
                                                    <div class="form-horizontal">
                                                        <div class="col-Geozone">
                                                            <div class="col-sm-9 col-md-9 col-lg-9 padding-width-lg-left">
                                                                <div class="col-sm-12 form-group" style="padding-top: 5px;">
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="lblTitle" runat="server" CssClass="label" Text="WO No: "></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 icon-img col-xs-6 padding-width-sm">
                                                                        <asp:Label ID="txtWONo" runat="server" Text="" MaxLength="10" TabIndex="1"></asp:Label>
                                                                        <asp:Label ID="lblSelWOGenID" runat="server" Text="" Style="display: none"></asp:Label>
                                                                    </div>

                                                                </div>

                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="lblServiceType" runat="server" Text="WO Type : " Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="ddlServiceType" runat="server" />
                                                                    </div>
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="Label7" runat="server" Text="Generated By : " Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="lblGeneratedBy" runat="server" />
                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="Label24" runat="server" Text="Vendor : " Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="ddlVendorName" runat="server" Width="" />
                                                                    </div>
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="Label12" runat="server" Text="Approved By : " Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="lblApprovedBy" runat="server" />
                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="lblFirstName" runat="server" CssClass="label" Text="Start Date : "></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="txtdate1" runat="server" Width="" />
                                                                    </div>

                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="lblLastname" runat="server" CssClass="" Text="Expected Closing Date : "></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="textdate2" runat="server" />
                                                                    </div>
                                                                </div>


                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="lblUsername" runat="server" CssClass="" Text="Warranty/Contract : "></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="ddlwaranty" runat="server" />
                                                                    </div>
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="lblDisplayname" runat="server" CssClass="" Text="Warranty/Contract End Date:"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm">
                                                                        <asp:Label ID="textdate3" runat="server"></asp:Label>
                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 padding-width-sm icon-img form-controllinebreak">
                                                                        <asp:Label ID="lblQuotationTxt" runat="server" CssClass="label" Font-Bold="False" Text="Approved Quotation" Visible="false"></asp:Label>
                                                                    </div>

                                                                    <div class="headerPanel" runat="server">
                                                                        <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 padding-width-sm icon-img form-controllinebreak">
                                                                            <asp:Label ID="lblQuotationFile" runat="server" CssClass="label" Font-Bold="True" Text="-" ForeColor="Blue" Font-Underline="true" ToolTip="Click to Preview/Close" Style="cursor: pointer" Visible="false"></asp:Label>
                                                                        </div>
                                                                    </div>

                                                                    <div class="contentPanel" runat="server">
                                                                        <div class="col-sm-12 padding-width-sm">
                                                                            <asp:Panel runat="server" ID="IpdfViewer" Style="width: 100%!important; height: 100%!important">
                                                                            </asp:Panel>
                                                                        </div>
                                                                    </div>

                                                                    <div class="col-sm-3 col-lg-3 col-md-3 col-xs-6 icon-img padding-width-sm-left icon-img form-controllinebreak">
                                                                        <asp:Label ID="Label8" runat="server" CssClass="" Text="WO Generated Comments : "></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-6 icon-img padding-width-sm form-controllinebreak">
                                                                        <asp:Label ID="lblGenComments" runat="server" />

                                                                    </div>

                                                                </div>
                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 padding-width-sm icon-img">
                                                                        <asp:Label ID="lblTimezone" runat="server" CssClass="label" Font-Bold="False" Text="Assign To"></asp:Label>
                                                                        <asp:Label ID="lblReqPerson" runat="server" ForeColor="Red">* (Only for Approval)</asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 padding-width-sm">
                                                                        <asp:DropDownList ID="ddlPerson" runat="server" AppendDataBoundItems="true" TabIndex="8" Width="" CssClass="form-control form-controllinebreak">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                    <div class="col-sm-3 col-lg-3 col-md-3 padding-width-sm icon-img">
                                                                        <asp:Label ID="lblExpiryDate" runat="server" CssClass="label" Font-Bold="False" Text="Approval Remarks"></asp:Label>
                                                                        <span class="redtxt">*</span>
                                                                    </div>
                                                                    <div class="col-sm-3 col-md-3 col-lg-3 padding-width-sm">
                                                                        <asp:TextBox ID="txtRemarks" runat="server" MaxLength="400" TabIndex="9" Height="40px" TextMode="MultiLine" CssClass="form-control" placeholder="Remarks"></asp:TextBox>
                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-12 form-group">
                                                                    <div class="col-sm-4 padding-width-sm">
                                                                        <asp:Label ID="Label15" runat="server" ForeColor="Red">*</asp:Label>
                                                                        <asp:Label ID="lblIndicatesMandatory" runat="server" Text="Required Fields"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-sm-3 col-md-3 col-lg-3 padding-width-sm">
                                                                <asp:Label ID="l1Comments" runat="server" Text="Comments" Font-Size="9" Font-Bold="true" ForeColor="gray"></asp:Label>
                                                                <br />
                                                                <div class="setScrollComment" style="width: 100%; border: 1px dashed silver;">
                                                                    <asp:Repeater ID="RptrComments" runat="server">
                                                                        <ItemTemplate>
                                                                            <table style="width: 100%; height: auto" bgcolor="#ffffff">
                                                                                <tr>
                                                                                    <td style="float: left; padding-top: 5px;">
                                                                                        <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("RemarksDate") %>' Font-Size="8" Font-Bold="true" ForeColor="gray"></asp:Label></td>
                                                                                    <td style="float: right; padding-top: 5px;">
                                                                                        <asp:Label ID="Label5" runat="server" Text='<%# Eval("RemarksBy") %>' Font-Size="8" Font-Bold="true" ForeColor="gray"></asp:Label>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr style="border-bottom: 1px dotted gray">
                                                                                    <td style="float: left;" colspan="2">
                                                                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("Remarks") %>' Font-Size="8" ForeColor="#666666"></asp:Label></td>
                                                                                </tr>
                                                                            </table>
                                                                        </ItemTemplate>
                                                                    </asp:Repeater>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <div class="padding-width-sm">
                                                        <div class="panel panel-default override-col-width col-Geozone">
                                                            <div class="panel-heading">
                                                                <asp:Label ID="Label1" runat="server" Text="Details of Assigned Maintenance Plan" CssClass="label"
                                                                    Font-Bold="true"></asp:Label>
                                                            </div>
                                                            <div class="panel-body" style="padding: 5px!important;">
                                                                <div class="form-tbl co-sm-12 nullpadding form-horizontal">
                                                                    <div class="">

                                                                        <div class="col-sm-12 form-group">
                                                                            <div class="col-sm-2 col-xs-6 padding-width-sm">
                                                                                <asp:Label ID="Label2" runat="server" Text="Services Applicable"></asp:Label>
                                                                            </div>
                                                                            <div class="col-sm-10 col-xs-6 padding-width-sm">
                                                                                <asp:Label ID="lblServicesApplicable" runat="server" Text="-"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-sm-12 form-group">
                                                                            <div class="col-sm-2 col-xs-6 padding-width-sm">
                                                                                <asp:Label ID="Label4" runat="server" Text="Recurring Plan"></asp:Label>
                                                                            </div>
                                                                            <div class="col-sm-10 col-xs-6 padding-width-sm">
                                                                                <asp:Label ID="lblRecurringService" runat="server" Text="-"></asp:Label>
                                                                            </div>
                                                                        </div>
                                                                        <div class="clearfix"></div>
                                                                        <div class="fleetContent">
                                                                            <cc1:TabContainer ID="tcMaintenancePlan" runat="server" AutoPostBack="false" Height="">
                                                                                <cc1:TabPanel ID="tpServiceDetails" runat="server" HeaderText="Service Details" BorderStyle="None">
                                                                                    <ContentTemplate>
                                                                                        <div class="fleetContent" style="overflow: auto;">
                                                                                            <div class="clearfix"></div>
                                                                                            <div class="table-responsive">
                                                                                                <asp:GridView ID="gvServiceDetails" runat="server" AllowPaging="False" AllowSorting="False"
                                                                                                    AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                                                    GridLines="None" Width="100%">
                                                                                                    <Columns>

                                                                                                        <asp:TemplateField HeaderText="AutoID" Visible="false">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Service Type" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblNotification1" runat="server" Text='<%# Eval("ServiceId").ToString() + "%" %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>

                                                                                                        <asp:TemplateField HeaderText="Service Name" HeaderStyle-Width="25%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Service Name" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:HiddenField ID="hdnServiceId" runat="server" Value='<%# Eval("ServiceId") %>' />
                                                                                                                <asp:Label ID="lblServiceName" runat="server" Text='<%# Eval("ServiceName") %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;" />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Service Package" HeaderStyle-Width="50%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Service Package" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="lblServiceCategory" runat="server" Text='<%# Eval("ServiceCategory") %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;" />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Planned Cost" HeaderStyle-Width="50%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Planned Cost" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblPlannedCost" runat="server" Width="80px" Text='<%# Eval("PlannedCost") %>'
                                                                                                                    Style="text-align: right; font-family: Arial, Helvetica, sans-serif; font-size: 11px;" />
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                    </Columns>
                                                                                                    <EmptyDataTemplate>
                                                                                                        No service details found.
                                                                                                    </EmptyDataTemplate>
                                                                                                    <RowStyle CssClass="fleetCon" Height="25px" VerticalAlign="Middle" />
                                                                                                    <FooterStyle CssClass="fleetFoot" />
                                                                                                    <AlternatingRowStyle CssClass="fleetConalt" VerticalAlign="Middle" />
                                                                                                    <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                                                    <HeaderStyle CssClass="fleetHead" Height="25px" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                                                    <EmptyDataRowStyle CssClass="fleetHead" />
                                                                                                </asp:GridView>
                                                                                            </div>
                                                                                            <div class="clearfix"></div>
                                                                                            <div class="fleetContent">
                                                                                                <div class="form-group col-sm-12 icon-label">
                                                                                                    <div class="col-sm-9"></div>

                                                                                                    <div class="col-sm-2 col-xs-8 override-col-width padding-width-sm">
                                                                                                        <asp:Label ID="Label14" runat="server" Font-Names="Arial,Helvetica,sans-serif" Font-Size="8" Font-Bold="true" Text="VAT(%) :"></asp:Label>
                                                                                                    </div>
                                                                                                    <div class="col-sm-1 padding-width-sm">
                                                                                                        <asp:Label ID="lblVAT" runat="server" Font-Names="Arial,Helvetica,sans-serif" Font-Size="8" Font-Bold="false" Text="0"></asp:Label>
                                                                                                    </div>
                                                                                                    <div class="col-sm-1"></div>
                                                                                                </div>
                                                                                                <div class="form-group col-sm-12">
                                                                                                    <div class="col-sm-8 col-lg-9 col-md-9"></div>
                                                                                                    <div class="col-sm-2 col-xs-8 override-col-width padding-width-sm-left">
                                                                                                        <asp:Label ID="lblTotalPlannedCostH" runat="server" Font-Names="Arial,Helvetica,sans-serif" Font-Size="8" Font-Bold="true" Text="Total Planned Cost : "></asp:Label>
                                                                                                    </div>
                                                                                                    <div class="col-sm-1 padding-width-sm">
                                                                                                        <asp:Label ID="lblTotalPlannedCost" runat="server" Font-Names="Arial,Helvetica,sans-serif" ForeColor="Blue" Font-Size="8" Font-Bold="true" Text="0"></asp:Label>
                                                                                                    </div>
                                                                                                    <div class="col-sm-1"></div>
                                                                                                </div>
                                                                                            </div>

                                                                                        </div>
                                                                                    </ContentTemplate>
                                                                                </cc1:TabPanel>
                                                                                <cc1:TabPanel ID="tpMaintenancePlan" runat="server" HeaderText="Maintenance Plan Details">
                                                                                    <HeaderTemplate>
                                                                                        Maintenance Plan Details
                                                                                    </HeaderTemplate>
                                                                                    <ContentTemplate>
                                                                                        <div class="fleetContent" style="height: 200px; overflow: auto;">
                                                                                            <div class="clearfix"></div>
                                                                                            <div class="table-responsive">
                                                                                                <asp:GridView ID="gvPlanDetails" runat="server" AllowPaging="False" AllowSorting="False"
                                                                                                    AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                                                    GridLines="None" Width="100%">
                                                                                                    <Columns>
                                                                                                        <asp:TemplateField HeaderText="Service Type" HeaderStyle-Width="15%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Service Type" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblServiceType" runat="server" Text='<%# (Eval("ServiceType").ToString() == "0") ? "Running Hours" : (Eval("ServiceType").ToString() == "1" ? "Odometer" : Eval("ServiceType").ToString() == "2"? "Time Based" :"Concrete Mix Hours") %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Service Interval" HeaderStyle-Width="15%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Service Interval" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblServiceInterval" runat="server" Text='<%# Eval("ServiceInterval").ToString() + " " + (Eval("Frequency").ToString() == "0" ? "days" : (Eval("Frequency").ToString() == "1" ? "months" : (Eval("Frequency").ToString() == "2" ? "years" : (Eval("Frequency").ToString() == "3" ? "hrs" : Eval("DistanceUnits").ToString())))) %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <%--<asp:BoundField DataField="ServicesApplicable" HeaderText="Services Applicable" HeaderStyle-Width="40%" />--%>
                                                                                                        <asp:TemplateField HeaderText="Reminder 1" HeaderStyle-Width="10%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Reminder 1" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblNotification1" runat="server" Text='<%# Eval("Notification1").ToString() + "%" %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Reminder 2" HeaderStyle-Width="10%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Reminder 2" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblNotification2" runat="server" Text='<%# Eval("Notification2").ToString() == "0" ? "None" : (Eval("Notification2").ToString() + "%") %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Reminder 3" HeaderStyle-Width="10%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="glblServiceTypeH" runat="server" Text="Reminder 3" Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="glblNotification3" runat="server" Text='<%# Eval("Notification3").ToString() == "0" ? "None" : (Eval("Notification3").ToString() + "%") %>' Style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;"></asp:Label>
                                                                                                            </ItemTemplate>
                                                                                                        </asp:TemplateField>
                                                                                                    </Columns>
                                                                                                    <EmptyDataTemplate>
                                                                                                        No maintenance plan details found.
                                                                                                    </EmptyDataTemplate>
                                                                                                    <RowStyle CssClass="fleetCon" Height="25px" VerticalAlign="Middle" />
                                                                                                    <FooterStyle CssClass="fleetFoot" />
                                                                                                    <AlternatingRowStyle CssClass="fleetConalt" VerticalAlign="Middle" />
                                                                                                    <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                                                    <HeaderStyle CssClass="fleetHead" Height="25px" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                                                    <EmptyDataRowStyle CssClass="fleetHead" />
                                                                                                </asp:GridView>
                                                                                            </div>
                                                                                        </div>
                                                                                    </ContentTemplate>
                                                                                </cc1:TabPanel>

                                                                            </cc1:TabContainer>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-12 form-group">
                                                        <div class="col-sm-4"></div>
                                                        <div class="col-sm-8">
                                                            <asp:LinkButton ID="btnCloseWO" CausesValidation="true" runat="server" TabIndex="10" CssClass="MultilingualBtn" OnClick="btnCloseWO_Click" OnClientClick="return ValidateWOCloseInfo(this.id);ShowPopUp();">
                                                                <span runat="server" class="MultilingualBtnspan">
                                                                    <div class="Save">
                                                                        <div id="AddUserDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                            Close WO
                                                                        </div>
                                                                    </div>
                                                                </span>
                                                            </asp:LinkButton>&nbsp;       
                                                                   <asp:LinkButton ID="btnReopenWO" CausesValidation="true" TabIndex="11" runat="server" CssClass="MultilingualBtn" OnClick="btnReopenWO_Click" OnClientClick="return ValidateWOCloseInfo(this.id);ShowPopUp();">
                                                                       <span runat="server" class="MultilingualBtnspan">
                                                                           <div class="Save">
                                                                               <div id="Div2" runat="server" class="MultilingualBtnTextAlign">
                                                                                   Reopen WO
                                                                               </div>
                                                                           </div>
                                                                       </span>
                                                                   </asp:LinkButton>&nbsp;                                                                                                                                                                              
                                                            <asp:LinkButton ID="btnCancelWO" CausesValidation="false" TabIndex="12" runat="server" CssClass="MultilingualBtn" OnClick="btnCancelWO_Click">
                                                                <span runat="server" class="MultilingualBtnspan">
                                                                    <div class="Cancel">
                                                                        <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                            Cancel
                                                                        </div>
                                                                    </div>
                                                                </span>
                                                            </asp:LinkButton>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel ID="pnlPlanAssign" runat="server" Visible="true">
                                            <div class="form-box">
                                                <asp:Panel ID="pnlAssignedVehicleList" runat="server">
                                                    <div id="grid-dsply" style="margin-top: 0px;">
                                                        <div id="top">
                                                            <div class="left-col">
                                                                <span class="txt">Work Order Details</span>
                                                            </div>
                                                        </div>
                                                        <asp:HiddenField ID="hdnVehicleIdsToBeUnassinged" runat="server" />
                                                        <asp:HiddenField ID="hdnAssignedVehicleList" runat="server" />
                                                        <div class="clearfix"></div>
                                                        <div class="table-responsive">
                                                            <dxw:ASPxGridView ID="gvAssignedVehicles" runat="server" Width="100%" KeyFieldName="WONo" ClientInstanceName="gvAssignedVehicles"
                                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvAssignedVehicles_OnHtmlRowCreated">
                                                                <ClientSideEvents SelectionChanged="function(s, e) { OnGridVehPlanSelectionChanged(2); }" />
                                                                <%--<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="15">
                                                                </SettingsPager>
                                                                <Columns>

                                                                    <dxw:GridViewDataColumn FieldName="WONo" Caption="Work Order" VisibleIndex="1"
                                                                        Width="7%" CellStyle-HorizontalAlign="left">
                                                                        <DataItemTemplate>
                                                                            <%--<asp:Label ID="lblGrdWONo" runat="server" Text='<%# Eval("WONo")%>'></asp:Label>--%>
                                                                            <asp:LinkButton ID="lblWorkOrderNo" runat="server" CommandArgument='<%# Convert.ToString(Eval("WONo")) %>' Text='<%# Eval("WONo") == "0" ? 0 : Eval("WONo") %>' OnClick="glbtnVehicleName_Click" />
                                                                            <asp:Image ID="lnkattached" runat="server" ImageUrl="~/images/Attachmentclip.png" ToolTip="Attachment" Visible='<%# Eval("QuotationFile").ToString() != "0" &&  Convert.ToInt32(Eval("WONo")) != 0 ? true: false %>' />
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="True" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="WOType" Caption="WO Type" VisibleIndex="2"
                                                                        Width="10%" CellStyle-HorizontalAlign="Center">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblWOTypeGrd" runat="server" Text='<%# Eval("WOType")%>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="True" />
                                                                    </dxw:GridViewDataColumn>

                                                                    <%--<dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="1" Width="5%">
                                                                                <HeaderTemplate>
                                                                                    <input type="checkbox" onclick="gvAssignedVehicles.SelectAllRowsOnPage(this.checked);"
                                                                                        style="vertical-align: middle;" title="Select/Unselect all rows on the page"></input>
                                                                                </HeaderTemplate>
                                                                                <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                            </dxw:GridViewCommandColumn>--%>
                                                                    <dxw:GridViewDataColumn FieldName="VehicleDescription" Caption="Vehicle" VisibleIndex="3"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblGroup" runat="server" Text="Vehicle"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblVehicleGrd" runat="server" Text='<%# Eval("VehicleDescription") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="VendorName" Caption="Vendor" VisibleIndex="4"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblGroup" runat="server" Text="Vendor"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("VendorName") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="StartDate" Caption="WO StartDate" VisibleIndex="5"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblGroup" runat="server" Text="WO Start Date"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("StartDate") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="EDC" Caption="WO Expected Closing Date" VisibleIndex="6"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblGroup" runat="server" Text="WO Expected Closing Date"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("EDC") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="UserName" Caption="Generated By" VisibleIndex="7"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblGroup" runat="server" Text="Generated By"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("UserName") %>'></asp:Label><br />
                                                                            <asp:Label ID="Label9" runat="server" Text='<%# Eval("CreatedDatetime") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="UserName" Caption="Approved By" VisibleIndex="8"
                                                                        HeaderStyle-HorizontalAlign="Center" Width="11%">
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="label">
                                                                                <asp:Label ID="lblApprovedgrd" runat="server" Text="Approved By"></asp:Label>
                                                                            </span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lblApprovedBygrd" runat="server" Text='<%# Eval("ApprovedBy") %>'></asp:Label><br />
                                                                            <asp:Label ID="lblApprovedDategrd" runat="server" Text='<%# Eval("ApprovedDate") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataColumn FieldName="WOStatus" Caption="WO Status" VisibleIndex="9"
                                                                        Width="10%" CellStyle-HorizontalAlign="Center">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="glblIsActive" runat="server" Text='<%# Eval("WOStatus")%>' ForeColor='<%# ( Convert.ToString(Eval("WOClosedStatus")) == "1" && Convert.ToString(Eval("Status")) == "1"? System.Drawing.Color.Red : System.Drawing.Color.Black) %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="True" />
                                                                    </dxw:GridViewDataColumn>
                                                                    <dxw:GridViewDataTextColumn Caption="Edit" VisibleIndex="11" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-HorizontalAlign="Center" Name="Edit">
                                                                        <HeaderTemplate>
                                                                        </HeaderTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:LinkButton ID="btnEditUser" runat="server" CommandArgument='<%# Eval("WONo") + "," + Eval("PlanId") + "," + Eval("VehicleDescription").ToString()+ "," + Eval("VehiclePlanId").ToString() + "," + Eval("WOGenId").ToString() %>'
                                                                                alternatetext="Edit" OnClientClick="return ShowPopUp();" OnClick="btnEditWO_click"
                                                                                ToolTip="Click here to Close / Reopen WO" CssClass="handButton" Visible='<%# Convert.ToInt32(Eval("Status")) == 2 || Convert.ToInt32(Eval("Status")) == 5 ? true: false %>'>
                                                                                <asp:Image ID="imgEdit" runat="server" ImageUrl="~/images/blueclose2.png" />
                                                                            </asp:LinkButton>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                </Columns>
                                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                                <SettingsText EmptyDataRow=" No Approved WO found" />
                                                            </dxw:ASPxGridView>
                                                        </div>
                                                    </div>
                                                </asp:Panel>

                                                </td>
                                                    </tr>
                                                    <%--<tr>
                                                        <td>
                                                            <table cellpadding="0" cellspacing="0" border="0" width="100%" class="form-tbl">
                                                                <tr>
                                                                    <td></td>
                                                                    <td width="10%">
                                                                        <asp:LinkButton ID="lbtnUnassignVehicles" runat="server" class="btn" TabIndex="10"
                                                                            OnClientClick="return CheckSelectionForManipulation(2,'lbtnUnassignVehicles');" OnClick="lbtnUnassignVehicles_Click"><span class="icon"><img src="../images/icn-unassigned-vehicles.gif" alt="" /></span><span>Unassign</span></asp:LinkButton>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>--%>
                                                <tr>
                                                    <td width="100%"></td>
                                                </tr>
                                                </table>
                                            </div>
                                            <div class="AlignControl">
                                                <br />
                                                &nbsp;
                                        <img src="../images/red.png" />
                                                <asp:Label ID="RedIcnIndicator" runat="server" Text="Closing delay"></asp:Label>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                                <!-- Main Content Ends Here -->
                                <div id="left">
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div id="right">
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </div>
                </ContentTemplate>
                <Triggers>
                </Triggers>
            </asp:UpdatePanel>
            <asp:Panel ID="pnlViewPolicy" runat="server" Style="display: none; top: 200px!important" CssClass="edit-LandmarkPanel col-xs-10 col-sm-8 col-md-7 col-lg-6">
                <asp:UpdatePanel ID="upPolicy" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>

                        <div class="popup">

                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblViewPolicyHeading" Text="Work Order Details" runat="server"></asp:Label></h1>
                                <div class="close">
                                    <asp:ImageButton ID="ibtClose" runat="server" OnClientClick="CategoryPopup(false); return false;"
                                        ImageUrl="~/Images/popup-close.gif" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <asp:Panel runat="server" class="panel panel-default override-col-width">
                                    <div class="panel-body">
                                        <div class="form-tbl col-sm-12 nullpadding">
                                            <div class="form-horizontal">
                                                <div class="col-sm-8 col-Geozone">
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="lblServicesApplicableCaption" runat="server" Text="WO No"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1WONo" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>


                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label25" runat="server" Text="Vendor"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1Vendor" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="lblRecurringServiceH" runat="server" Text="WO Type"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1WOType" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label9" runat="server" Text="Start Date"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1StartDate" runat="server"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="lbl10" runat="server" Text="Expected Closing Date"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1EDC" runat="server"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-xs-6 col-md-4 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label16" runat="server" Text="Warranty/Contract"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1Warranty" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>

                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-md-4 col-xs-6 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label18" runat="server" Text="Warranty/Contract End Date"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1WarrantyEndate" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-md-4 col-xs-6 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label20" runat="server" Text="Assigned To"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1AssignedTo" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-12">
                                                        <div class="col-lg-4 col-md-4 col-xs-6 col-sm-6 padding-width-sm">
                                                            <asp:Label ID="Label22" runat="server" Text="Remarks"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 padding-width-sm">
                                                            <asp:Label ID="l1Remarks" runat="server" Text="-"></asp:Label>
                                                        </div>
                                                    </div>

                                                </div>
                                                <div class="col-sm-4 col-Geozone">
                                                    <asp:Label ID="Label11" runat="server" Text="Comments" Font-Size="9" Font-Bold="true" ForeColor="gray"></asp:Label>

                                                    <div style="width: 100%; min-height: 250px; overflow: Auto; border: 1px dashed silver;">

                                                        <asp:Repeater ID="rptrCommentsPopup" runat="server">
                                                            <ItemTemplate>
                                                                <table style="width: 100%; height: auto" bgcolor="#ffffff">
                                                                    <tr>
                                                                        <td style="float: left; padding-top: 5px;">
                                                                            <asp:Label ID="lblGroup" runat="server" Text='<%# Eval("RemarksDate") %>' Font-Size="8" Font-Bold="true" ForeColor="gray"></asp:Label></td>
                                                                        <td style="float: right; padding-top: 5px;">
                                                                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("RemarksBy") %>' Font-Size="8" Font-Bold="true" ForeColor="gray"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                    <tr style="border-bottom: 1px dotted gray">
                                                                        <td style="float: left;" colspan="2">
                                                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("Remarks") %>' Font-Size="8" ForeColor="#666666"></asp:Label></td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>

                                                        </asp:Repeater>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-12 icon-label">

                                            <div class="col-sm-8">
                                                <asp:ImageButton ID="btnCancelViewPolicyDetails" runat="server" class="btn" ImageUrl="~/images/Close.png"
                                                    CausesValidation="false" OnClientClick="CategoryPopup(false); return false;" />
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                            </div>

                        </div>

                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdnbtnName" runat="server" />
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </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>

            <script type="text/javascript" language="javascript">
                function OnGridVehPlanSelectionChanged(Type) {
                    if (Type == 1) {
                        gvUnAssignedVehicles.GetSelectedFieldValues('VehicleId', OnGridSelectionCompleteUnAssVeh);

                    }
                    else {
                        gvAssignedVehicles.GetSelectedFieldValues('VehicleId', OnGridSelectionCompleteAssVeh);
                    }
                }

                function OnGridSelectionCompleteUnAssVeh(values) {
                    var counter = document.getElementById("hdnVehicleIdsToBeAssinged");
                    counter.value = '';
                    for (var i = 0; i < values.length; i++) {
                        counter.value = counter.value + values[i] + ',';
                    }
                }

                function OnGridSelectionCompleteAssVeh(values) {
                    var counter = document.getElementById("hdnVehicleIdsToBeUnassinged");
                    counter.value = '';
                    for (var i = 0; i < values.length; i++) {
                        counter.value = counter.value + values[i] + ',';
                    }
                }

                function CategoryPopup(isShow) {
                    if (document.getElementById('pnlViewPolicy') != null) {
                        document.getElementById('pnlViewPolicy').style.display = (isShow) ? "block" : "none";
                    }

                    return false;
                }

                function ShowAssignPlan(isShow) {
                    if (document.getElementById('pnlPlanAssign') != null) {
                        document.getElementById('pnlPlanAssign').style.display = (isShow) ? "block" : "none";
                    }

                    if (document.getElementById('pnlPlanAssignList') != null) {
                        document.getElementById('pnlPlanAssignList').style.display = (isShow) ? "none" : "block";
                    }

                    if (document.getElementById('ibtnAssignPlan') != null) {
                        document.getElementById('ibtnAssignPlan').style.display = (isShow) ? "none" : "block";
                    }

                    if (document.getElementById('ibtnCancel') != null) {
                        document.getElementById('ibtnCancel').style.display = (isShow) ? "block" : "none";
                    }

                    if (document.getElementById('trSearch') != null) {
                        document.getElementById('trSearch').style.display = (isShow) ? "none" : "block";
                    }

                    if (document.getElementById('imgStatusIcon') != null) {
                        document.getElementById('imgStatusIcon').style.display = (isShow) ? "none" : "block";
                    }

                    if (document.getElementById('lblStatus') != null) {
                        document.getElementById('lblStatus').style.display = (isShow) ? "none" : "block";
                    }

                    if (document.getElementById('ddlStatus') != null) {
                        document.getElementById('ddlStatus').style.display = (isShow) ? "none" : "block";
                    }
                }

            </script>

            <script type="text/javascript" language="javascript">
                $wog = jQuery.noConflict();
                function StartHandler() {
                    $wog("[id$='_txtTimeBasedInitializationValue']").datepicker({
                        numberOfMonths: 1,
                        showButtonPanel: true,
                        dateFormat: 'dd-M-yy',
                        changeYear: true,
                        changeMonth: true,
                        maxDate: '0',
                        hideIfNoPrevNext: true
                    });
                }

                $wog(document).ready(function () {
                    $wog(".contentPanel").hide();
                    $wog(".headerPanel").click(function () {
                        $wog(this).next(".contentPanel").slideToggle("medium");
                    });
                });
                var prm = Sys.WebForms.PageRequestManager.getInstance();
                prm.add_endRequest(function (s, e) {
                    $wog(".contentPanel").hide();
                    $wog(".headerPanel").click(function () {
                        $wog(this).next(".contentPanel").slideToggle("medium");
                    });
                });
            </script>

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

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

            <asp:HiddenField ID="hdnLogout" runat="server" />
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
