<%@ page language="C#" autoeventwireup="true" inherits="Forms_VendorVehicleMapping, App_Web_f1guidzd" %>

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

    <%--********* 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/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>
    <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="VendorVehicleMapping.aspx">
                                                            <asp:Label ID="lblAssignmentCaption" Text="Lease Vehicle Assignment" runat="server"></asp:Label>
                                                        </a>
                                                    </span>
                                                </p>
                                            </div>
                                            <div class="col-sm-9 head-part-btns">
                                                <div class="pull-right">
                                                    <%--<asp:ImageButton ImageUrl="~/images/btn-user-assignment.jpg" ID="btnAssignUsers"
                                                            runat="server" PostBackUrl="~/Forms/GroupingUserAssignment.aspx" />--%>
                                                    <%--<asp:HyperLink ID="btnAssignUsers1" ImageUrl="~/images/btn-user-assignment.jpg" runat="server"
                                                            NavigateUrl="~/Forms/GroupingUserAssignment.aspx" Visible="false"></asp:HyperLink>
                                                        <asp:LinkButton ID="btnAssignUsers" runat="server" CssClass="MultilingualBtn" NavigateUrl="~/Forms/GroupingUserAssignment.aspx">
                                                            <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                               <div class="AssignUsers" >
                                                                <div id="AssignUsersDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    User Assignment
                                                                </div></div>
                                                            </span>
                                                        </asp:LinkButton>--%>
                                                    <asp:LinkButton ID="lbtManageVendors" runat="server" CssClass="MultilingualBtn" OnClick="lbtManageVendors_Click">
                                                        <span id="Span2" runat="server" class="MultilingualBtnspan">
                                                            <div class="ManageVendors">
                                                                <div id="ManageVendorsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Manage Vendor
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="lbtManageCustomers" runat="server" CssClass="MultilingualBtn" OnClick="lbtManageCustomers_Click">
                                                        <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                            <div class="ManageCustomers">
                                                                <div id="ManageCustomersDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Manage Customer
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <%--<asp:ImageButton ID="lbtConfiguration" runat="server" PostBackUrl="~/Forms/ConfigurationSetup.aspx"
                                                                ImageUrl="~/images/btn-back-to-configuration.jpg" />--%>
                                                    <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="Vendor / Customer Selection"></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 icon-label 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="Vendor / Customer Name"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-4 col-md-2 padding-width-sm">
                                                            <asp:DropDownList ID="ddlVendorCustomer" runat="server" onchange="ShowPopUp();" AutoPostBack="true"
                                                                OnSelectedIndexChanged="ddlVendorCustomer_SelectedIndexChanged" CssClass="form-control">
                                                                <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%">
                                                                <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="DisplayName" Caption="Sensor Display Name" VisibleIndex="6"
                                                                Width="30%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgUnAssSenDisplayName" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblUnAssSenDisplayName" runat="server" Text="Sensor Display Name"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="Location" Caption="Location" VisibleIndex="6"
                                                                Width="40%">
                                                                <HeaderCaptionTemplate>
                                                                    <table cellpadding="0" cellspacing="0" style="padding-top: 1">
                                                                        <tr>
                                                                            <td style="padding-top: 1">
                                                                                <asp:Image ID="imgUnAssLocation" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif" />
                                                                            </td>
                                                                            <td>&nbsp;<asp:Label ID="lblUnAssLocation" runat="server" Font-Bold="false" Text="Location"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </HeaderCaptionTemplate>
                                                                <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,'btnAssignLeaseVehicles');">
                                                                    <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="VehicleId" 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="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 Name" 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 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="imgAssVehVehicleType" runat="server" ImageUrl="..\Images\icn-vehicle-type.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label runat="server" ID="lblAssVehVehicleType" 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="imgAssVehMake" ImageUrl="..\Images\icn-make-name.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblAssVehMake" 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 runat="server" ID="imgAssVehModel" ImageUrl="..\Images\icn-model-name.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblAssVehModel" runat="server" Text="Model"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="ModelYear" Caption="Year" VisibleIndex="6" Width="10%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgAssVehYear" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                            alt="" align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblAssVehYear" runat="server" Text="Year"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="DisplayName" Caption="Sensor Display Name" VisibleIndex="6"
                                                                Width="30%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgAssSenDisplayName" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                            align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblAssSenDisplayName" runat="server" Text="Sensor Display Name"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataColumn FieldName="Location" Caption="Location" VisibleIndex="6"
                                                                Width="40%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon" style="padding-top: 3">
                                                                        <asp:Image ID="imgAssLocation" Style="padding-top: 3" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblAssLocation" runat="server" Text="Location"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </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"
                                                                    OnClick="UnassignVehicles" OnClientClick="return CheckSelectionForManipulation(2,'btnUnassignVehicles');">
                                                                    <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="Lease 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="Contract Settings">
                                    <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="Contract 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="Contract To"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtEffectiveTo" runat="server" onkeypress="return false" onpaste="return false"
                                                        CssClass="form-control"></asp:TextBox>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>
                                <asp:Panel ID="pnlNotificationSettings" runat="server" GroupingText="Notification Settings">
                                    <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="Label3" runat="server" Text="Expiry Notification Type"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:DropDownList ID="ddlExpNotificationType" runat="server" CssClass="form-control">
                                                        <asp:ListItem Text="Running Distance" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="Running Hours" Value="2"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label4" runat="server" Text="Expiry Notification Level1"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtExpNotifyLevel1" runat="server" CssClass="form-control" MaxLength="2"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-1 padding-width-sm icon-label">
                                                    <span>(%)</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label5" runat="server" Text="Expiry Notification Level2"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtExpNotifyLevel2" runat="server" CssClass="form-control" MaxLength="2"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-1 padding-width-sm icon-label">
                                                    <span>(%)</span>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label6" runat="server" Text="Monthly Running Distance Limit"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtRunningDistLimit" runat="server" CssClass="form-control" MaxLength="6"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-1 padding-width-sm icon-label">
                                                    <span>(Kms)</span>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:CheckBox ID="chkIsRunningDistNotify" runat="server" Text="Is Notify" CssClass="checkbox" />
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4 padding-width-sm icon-img">
                                                    <asp:Label ID="Label7" runat="server" Text="Monthly Running Hours Limit"></asp:Label>
                                                    <span style="color: Red">*</span>
                                                </div>
                                                <div class="col-sm-4 padding-width-sm">
                                                    <asp:TextBox ID="txtEngineHrsLimit" runat="server" CssClass="form-control" MaxLength="6"
                                                        oncopy="return false" ondrop="return false" onpaste="return false" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-1 padding-width-sm icon-label">
                                                    <span>(Hrs)</span>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:CheckBox ID="chkIsEngineHrsNotify" runat="server" Text="Is Notify" CssClass="checkbox" />
                                                </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>
                                                </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>
                                    </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 CloseLeaseAssignmentSettingsPopup();" OnClick="btnCloseLeaseSettings_Click" />
                                                    <asp:Button ID="btnSaveLeaseSettings" runat="server" Text="Confirm"
                                                        OnClientClick="return ValidateLeaseAssignmentSettings();" OnClick="AssignVehicles" />
                                                </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/FleetVehicleAssignmentScript.js"></script>
            <script lang="javascript" type="text/javascript" src="../js/LeaseManagement.js"></script>
            <script src="../js/myformvalidations.js" type="text/javascript"></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>
