<%@ page language="C#" autoeventwireup="true" inherits="Forms_UserVehicleTicketMapping, App_Web_kob0wgzu" %>

<%@ 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" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<!DOCTYPE html>
<html lang="en">
<head runat="server">
    <title>tSense-IoT Configuration</title>
    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <%--<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />--%>

    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <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 rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link 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 id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.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 src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../js/ui.datepicker.js" type="text/javascript"></script>
    <script src="../js/JQQueryDatePicker.js" type="text/javascript"></script>

    <%--********* 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>
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Nav Ends Here -->
            <!-- Content Starts Here -->
            <asp:UpdatePanel ID="updGrid" runat="server">
                <ContentTemplate>
                    <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-3">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" runat="server"></asp:Literal>
                                                </h1>
                                                <%--<a href="Dashboard.aspx"><asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label></a>--%>
                                                <p style="white-space: nowrap">
                                                    <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                                    <span>&gt;</span>
                                                    <span>
                                                        <a href="UserVehicleTicketMapping.aspx">
                                                            <asp:Label ID="lblAssignmentCaption" Text="Interim Tracking Vehicle Assignment" runat="server"></asp:Label>
                                                        </a>
                                                    </span>
                                                </p>
                                            </div>
                                            <div class="col-sm-9 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:HyperLink ID="lbtConfiguration1" runat="server" NavigateUrl="~/Forms/ConfigurationSetup.aspx"
                                                        ImageUrl="~/images/btn-back-to-configuration.jpg" Visible="false"></asp:HyperLink>
                                                    <asp:LinkButton ID="lbtConfiguration" runat="server" CssClass="MultilingualBtn" NavigateUrl="~/Forms/ConfigurationSetup.aspx">
                                                        <span id="Span3" runat="server" class="MultilingualBtnspan">
                                                            <div class="Back">
                                                                <div id="BacktoConfigurationDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Back to Configuration
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </div>
                                            </div>
                                            <div class="clear clearfix"></div>
                                        </div>
                                        <asp:Panel ID="pnlFleetSelection" runat="server" CssClass="ControlShow">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <asp:Image ID="imgFleetVehicleAssignment" runat="server" ImageUrl="../images/usermanage-icon.gif" />
                                                    </span>
                                                    <span class="txt">
                                                        <asp:Label ID="lblFleetVehicleAssignment" runat="server" Text="Vehicle Assignment for Interim Tracking"></asp:Label>
                                                    </span>
                                                </h1>
                                                <div class="form-tbl padding-sm-lrt">
                                                    <div class="form-group">
                                                        <div class="col-sm-3 padding-width-sm icon-img override-col-width">
                                                            <span class="icon">
                                                                <asp:Image ID="imgFleetName" runat="server" ImageUrl="../Images/usermanage-icon.gif" />
                                                            </span>
                                                            <asp:Label Style="white-space: nowrap" ID="lblFleetName" runat="server" Font-Bold="true"
                                                                Text="Fleet"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-4 col-md-3 padding-width-sm">
                                                            <asp:DropDownList ID="ddlFleet" CssClass="form-control FontAlign" runat="server" AutoPostBack="true" OnSelectedIndexChanged="FleetName_selectionchanged">
                                                                <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="clear clearfix"></div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix"></div>
                                        <asp:Panel ID="pnlUnAssignedVehicleList" runat="server">
                                            <div id="grid-dsply">
                                                <div id="top">
                                                    <div class="col-sm-12">
                                                        <span class="icon">
                                                            <asp:Image ID="imgUnassignedVehicles" runat="server" ImageUrl="../images/icn-unassigned-vehicles.gif" />
                                                        </span>
                                                        <span class="txt">
                                                            <asp:Label ID="lblUnassignedVehicles" runat="server" Text="Unassigned Vehicles"></asp:Label>
                                                        </span>
                                                    </div>
                                                </div>
                                                <asp:HiddenField ID="hdnVehicleIdsToBeAssinged" runat="server" />
                                                <div class="clear clearfix"></div>
                                                <div class="table-responsive">
                                                    <dxw:ASPxGridView ID="gvUnAssignedVehicles" runat="server" Width="100%" ClientInstanceName="gvUnAssignedVehicles" KeyFieldName="VehicleId"
                                                        Settings-ShowFilterRow="true" CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                        EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvUnAssignedVehicles_OnHtmlRowCreated">
                                                        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="125" />
                                                        <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(1); }" />
                                                        <%--<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="5">
                                                        </SettingsPager>
                                                        <Columns>
                                                            <dxw:GridViewDataColumn FieldName="VehicleId" Caption="AutoID" VisibleIndex="0"
                                                                Visible="false">
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="1" Width="5%">
                                                                <HeaderTemplate>
                                                                    <input type="checkbox" onclick="gvUnAssignedVehicles.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 Name" VisibleIndex="2"
                                                                Width="25%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgUnAssVehVehicleName" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                            runat="server" align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssVehVehicleName" runat="server" Text="Vehicle Name"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="VehicleTypeName" Caption="Vehicle Type" VisibleIndex="3"
                                                                Width="20%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgUnAssVehVehicleType" runat="server" ImageUrl="..\Images\icn-vehicle-type.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssVehVehicleType" runat="server" Text="Vehicle Type"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="MakeName" Caption="Make" VisibleIndex="4" Width="20%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUnAssVehMake" ImageUrl="..\Images\icn-make-name.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssVehMake" runat="server" Text="Make"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="ModelName" Caption="Model" VisibleIndex="5" Width="20%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgUnAssVehModel" runat="server" ImageUrl="..\Images\icn-model-name.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssVehModel" runat="server" Text="Model"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="ModelYear" Caption="Year" VisibleIndex="6" Width="10%" CellStyle-HorizontalAlign="Center">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgUnAssVehYear" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssVehYear" runat="server" Text="Year"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="UserAssignedCount" Caption="No of Users Assigned" VisibleIndex="7"
                                                                HeaderStyle-HorizontalAlign="Center" Width="15%" CellStyle-HorizontalAlign="Center">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="..\Images\usermanage-icon.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="No of Users Assigned"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("UserAssignedCount") %>'></asp:Label><br />
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataColumn>
                                                        </Columns>
                                                        <SettingsText EmptyDataRow="No Unassigned Vehicles found" />
                                                        <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                    </dxw:ASPxGridView>
                                                </div>
                                                <div class="clear clearfix"></div>
                                                <div class="">
                                                    <div class="form-tbl padding-sm-lrt">
                                                        <div class="col-xs-12 padding-width-sm">
                                                            <div class="pull-right">
                                                                <%--<td style="width: 5%; vertical-align: middle; padding-left: 20px">
                                                                <asp:LinkButton ID="ibtLeaseSettings" runat="server" CssClass="MultilingualBtn"
                                                                    OnClientClick="LoadLeaseAssignmentSettingsPopup();return false;">
                                                                    <span id="Span" runat="server" class="MultilingualBtnspan">
                                                                        <div class="AddGeozone">
                                                                            <div id="LeaseSettingsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Settings
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                            </td>--%>
                                                                <asp:ImageButton ID="btnAssignVehicles1" runat="server" ImageUrl="../images/btn-assign-vehicles.jpg"
                                                                    OnClick="AssignVehicles" OnClientClick="return CheckSelectionForManipulation(1,'btnAssignVehicles');"
                                                                    Visible="false" />
                                                                <asp:LinkButton ID="btnAssignVehicles" runat="server" CssClass="MultilingualBtn"
                                                                    OnClientClick="return CheckSelectionForManipulation(1,'btnAssignTUserVehicles');">
                                                                    <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                                        <div class="AssignVehicle">
                                                                            <div id="AssignVehiclesDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Assign
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                            </div>
                                                        </div>
                                                        <div class="clearfix padding-sm-lrb"></div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel ID="pnlAssignedVehiclesList" runat="server">
                                            <div id="grid-dsply">
                                                <div id="top">
                                                    <div class="col-sm-12">
                                                        <span class="icon">
                                                            <asp:Image ID="imgAssignedVehicles" runat="server" ImageUrl="../images/icn-vehicle-assignment.gif" /></span>
                                                        <span class="txt">
                                                            <asp:Label ID="lblAssignedVehicles" runat="server" Text="Assigned Vehicles"></asp:Label>
                                                        </span>
                                                    </div>
                                                </div>
                                                <asp:HiddenField ID="hdnVehicleIdsToBeUnassinged" runat="server" />
                                                <div class="clear clearfix"></div>
                                                <div class="table-responsive">
                                                    <dxw:ASPxGridView ID="gvAssignedVehicles" runat="server" KeyFieldName="TAutoTokenID" ClientInstanceName="gvAssignedVehicles"
                                                        Width="100%" CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                        EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvAssignedVehicles_OnHtmlRowCreated">
                                                        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="125" />
                                                        <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(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="5">
                                                        </SettingsPager>
                                                        <Columns>
                                                            <dxw:GridViewDataColumn FieldName="TAutoTokenID" Caption="AutoID" VisibleIndex="0"
                                                                Visible="false">
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="VehicleId" Caption="AutoID" VisibleIndex="0"
                                                                Visible="false">
                                                            </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="2"
                                                                Width="25%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgAssVehVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblAssVehVehicleName" runat="server" Text="Vehicle"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription") %>'></asp:Label><br />
                                                                    <asp:Label ID="Label10" runat="server" Text='<%# Eval("ExpireStatus").ToString() == "1" ? "(Expired)": "(Active)" %>' Font-Bold="true" ForeColor='<%# Eval("ContractStatus").ToString() == "1" ? System.Drawing.Color.Red : System.Drawing.Color.Green %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <%--<dxw:GridViewDataColumn FieldName="MakeName" Caption="Vehicle Details" VisibleIndex="4"
                                                                HeaderStyle-HorizontalAlign="Center" Width="22%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgAssVehVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="Vehicle Details"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="Label15" runat="server" Text="Vehicle Type :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label16" runat="server" Text='<%# Eval("VehicleTypeName") %>'></asp:Label><br />
                                                                    <asp:Label ID="lblUserName" runat="server" Text="Make :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("MakeName") %>'></asp:Label><br />
                                                                    <asp:Label ID="Label5" runat="server" Text="Model :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("ModelName") %>'></asp:Label><span>,&nbsp;</span>
                                                                    <asp:Label ID="Label7" runat="server" Text="Year :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label11" runat="server" Text='<%# Eval("ModelYear") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataColumn>--%>
                                                            <dxw:GridViewDataColumn FieldName="CreatedBy" Caption="Created Details" VisibleIndex="7"
                                                                HeaderStyle-HorizontalAlign="Center" Width="17%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="..\Images\usermanage-icon.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="Created Details"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="Label12" runat="server" Text="User :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("CreatedBy") %>'></asp:Label><br />
                                                                    <asp:Label ID="Label13" runat="server" Text="Date :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("CreatedDateTime") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="AssignedBy" Caption="Assigned Details" VisibleIndex="7"
                                                                HeaderStyle-HorizontalAlign="Center" Width="20%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="..\Images\usermanage-icon.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="Assigned Details"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="Label12" runat="server" Text="User :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("Email") %>'></asp:Label><br />
                                                                    <asp:Label ID="Label13" runat="server" Text="MobileNo :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("MobileNo") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="ContractTo" Caption="Expiry Details" VisibleIndex="8"
                                                                HeaderStyle-HorizontalAlign="Center" Width="20%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="../images/icn-timezone.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="Expiry Details"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="Label14" runat="server" Text="Duration :" Font-Bold="true"></asp:Label>
                                                                    <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("ContractTo") %>'></asp:Label><br />
                                                                    <asp:Label ID="Label4" runat="server" Text="Token" Font-Bold="true"></asp:Label>
                                                                    <asp:Image ID="imgAssVehVehicleType" runat="server" ImageUrl="..\Images\drive-key.png"
                                                                        ToolTip='<%# Eval("TokenID") %>' align="top" />
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="ContractTo" Caption="Utilization Details" VisibleIndex="9"
                                                                HeaderStyle-HorizontalAlign="Center" Width="12%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="../images/icn-timezone.gif"
                                                                            align="top" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDisplayName" runat="server" Text="Utilization Details"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <dxw:ASPxProgressBar ID="ASPxProgressBar1" runat="server" Height="21px" OnDataBound="ASPxProgressBar1_DataBound"
                                                                        Value='<%# Eval("ContractStatus") %>' Width="120px">
                                                                    </dxw:ASPxProgressBar>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataTextColumn Caption="SendEmail" VisibleIndex="13" Width="3%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lbtnSendEmail" runat="server" alternatetext="Send Email" ToolTip='<%#Convert.ToString(Eval("Email")) %>'
                                                                        CommandArgument='<%# Convert.ToString(Eval("VehicleDescription")) + "^" + Convert.ToString(Eval("TokenId")) + "^" + Convert.ToString(Eval("Email")) + "^" + Convert.ToString(Eval("VehicleDescription")) + "^" + Convert.ToString(Eval("ContractTo")) %>'
                                                                        OnClick="lbtnSendEmail_Click" Visible='<%# !string.IsNullOrEmpty(Convert.ToString(Eval("Email"))) ? true:false%>'><img src="../images/icn-email.gif" alt="" /></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                        </Columns>
                                                        <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                        <SettingsText EmptyDataRow=" No Assigned Vehicles found" />
                                                    </dxw:ASPxGridView>
                                                </div>
                                                <div class="clear clearfix"></div>
                                                <div class="">
                                                    <div class="form-tbl padding-sm-lrt">
                                                        <div id="trUnAssignedButton" runat="server" class="col-xs-12 padding-width-sm">
                                                            <div class="pull-right">
                                                                <asp:ImageButton ID="btnUnassignVehicles1" runat="server" ImageUrl="../images/btn-unassign-vehicles.jpg"
                                                                    OnClick="UnassignVehicles" OnClientClick="return CheckSelectionForManipulation(2,'btnUnassignVehicles');"
                                                                    Visible="false" />
                                                                <asp:LinkButton ID="btnUnassignVehicles" runat="server" CssClass="MultilingualBtn"
                                                                    OnClientClick="return CheckSelectionForManipulation(2,'btnUnassignTUserVehicles');">
                                                                    <span id="Span5" runat="server" class="MultilingualBtnspan">
                                                                        <div class="UnassignVehicle">
                                                                            <div id="UnassignVehiclesDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Unassign
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix padding-sm-lrb"></div>
                                                </div>
                                            </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>
            </asp:UpdatePanel>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="pnlProgress"
                TargetControlID="Button1">
            </cc1:ModalPopupExtender>
            <asp:Button ID="Button1" Style="display: none;" runat="server" />
            <asp:Panel ID="pnlProgress" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                <center>
                    <br />
                    <img id="imgLoad" runat="server" 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>
            <asp:HiddenField ID="hdnLogout" runat="server" />

            <asp:Panel ID="pnlLeaseSettings" runat="server" Style="display: none;" CssClass="col-sm-6 nullpadding">
                <asp:UpdatePanel ID="upLeaseSettings" runat="server">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblLeaseSettings" Text="Tracking vehicle Assignment Settings" runat="server"></asp:Label></h1>
                                <%--<div class="close">
                                                <asp:ImageButton ID="imgCloseLeaseSettings" runat="server" OnClientClick="CloseLeaseAssignmentSettingsPopup(); return false;"
                                                    ImageUrl="~/Images/popup-close.gif" />
                                            </div>--%>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <%--<tr><td>
                                            <asp:CheckBox ID="chkDelayNotification" runat="server" Text="Delay Notifications" />
                                    </td></tr>--%>
                                <asp:Panel ID="PnlContractSettings" runat="server" GroupingText="">
                                    <div class="col-sm-12">
                                        <div class="form-horizontal">
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label1" runat="server" Text="From"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtEffectiveFrom" runat="server" onkeypress="return false" onpaste="return false"
                                                        CssClass="form-control" TabIndex="12"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label2" runat="server" Text="To"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtRouteEndDate" runat="server" onkeypress="return false" onpaste="return false"
                                                        CssClass="form-control FutureDate"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label8" runat="server" Text="Email "></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtEmail" runat="server" CssClass="form-control" MaxLength="200"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeypress="return chkDescription(event,this,199);"
                                                        onkeydown="return DisableEnterkey(event);"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label9" runat="server" Text="MobileNo "></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtMobile" runat="server" CssClass="form-control" MaxLength="15" onkeypress="return chkPhoneMobile(event);"
                                                        oncopy="return false" ondrop="return false" onpaste="return false"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label10" runat="server" Text="Remarks "></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtRemarks" runat="server" CssClass="form-control" MaxLength="300"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeydown="return DisableEnterkey(event);"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <div class="col-sm-12">
                                    <div class="form-horizontal">
                                        <div class="">
                                            <span style="color: Red">*</span>
                                            <asp:Label ID="lblMandatory" runat="server" Text="Required Fields"></asp:Label>
                                        </div>
                                        <div id="divClose" runat="server" class="">
                                            <div class="col-xs-12 padding-width-sm">
                                                <div class="pull-right">
                                                    <asp:Button ID="btnCloseLeaseSettings" runat="server" Text="Cancel"
                                                        OnClientClick="return CloseTUserVehAssignmentSettingsPopup();" OnClick="btnCloseLeaseSettings_Click" />
                                                    <asp:Button ID="btnSaveLeaseSettings" runat="server" Text="Confirm"
                                                        OnClientClick="return ValidateTempUserVehicleAssignmentSettings();" OnClick="AssignVehicles" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="clear clearfix"></div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>

            <asp:Panel ID="pnlUnassignTUserVehicle" runat="server" Style="display: none;" CssClass="col-sm-6 nullpadding">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="Label17" Text="Tracking vehicle Unassignment" runat="server"></asp:Label></h1>
                                <%--<div class="close">
                                                <asp:ImageButton ID="imgCloseLeaseSettings" runat="server" OnClientClick="CloseLeaseAssignmentSettingsPopup(); return false;"
                                                    ImageUrl="~/Images/popup-close.gif" />
                                            </div>--%>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <div class="form-tbl">
                                    <div class="form-horizontal">
                                        <div class="form-group">
                                            <div class="col-sm-4 padding-width-sm icon-img">
                                                <asp:Label ID="Label18" runat="server" Text="Unassign Remarks"></asp:Label>
                                                <span style="color: Red">*</span>
                                            </div>
                                            <div class="col-sm-4 padding-width-sm">
                                                <asp:TextBox ID="txtVehUnassignRemarks" runat="server" CssClass="form-control" TabIndex="12"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <div class="form-horizontal">
                                        <div class="">
                                            <span style="color: Red">*</span>
                                            <asp:Label ID="Label23" runat="server" Text="Required Fields"></asp:Label>
                                        </div>
                                        <div id="div1" runat="server" class="">
                                            <div class="col-xs-12 padding-width-sm">
                                                <div class="pull-right">
                                                    <asp:Button ID="btnUnassignVehicleCancel" runat="server" Text="Cancel"
                                                        OnClientClick="return CloseTUserVehUnAssignmentSettingsPopup();" OnClick="btnCloseLeaseSettings_Click" />
                                                    <asp:Button ID="btnUnassignVehicleConfirm" runat="server" Text="Confirm"
                                                        OnClientClick="return ValidateTempUserVehicleUnAssignmentSettings();" OnClick="UnassignVehicles" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="clear clearfix"></div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <script lang="JavaScript1.2" type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>
            <script lang="javascript" type="text/javascript" src="../js/TempUserVehicleAssignmentScript.js"></script>
            <script lang="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>
            <script language="javascript" type="text/javascript">
                function HidePopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').hide();
                    }
                }
                function ShowPopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').show();
                    }
                }
            </script>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
