<%@ page language="C#" autoeventwireup="true" inherits="Forms_FuelManualEntry, App_Web_tnfq0fem" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<%@ Register Src="~/UserControls/Notification_List.ascx" TagPrefix="uc3" TagName="NotificationsList" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>

<%--<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>--%>

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

<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT 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 id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="updatedcss" runat="server" href="../css/Updated_css.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

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

    <%--BootStrap Css--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--End of BootStrap Css--%>

    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <script type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>
    <script type="text/javascript" src="../js/ScriptToClearCtrls.js"></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>
            <asp:UpdatePanel ID="updService" runat="server">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-3">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" Text="Configuration" runat="server"></asp:Literal>
                                                </h1>
                                                <a href="Dashboard.aspx">
                                                    <asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label>
                                                </a>
                                                <span>&gt;</span>
                                                <span>
                                                    <a href="FuelManualEntry.aspx">
                                                        <asp:Label ID="lblMaintenanceService" Text="Fuel Entry" runat="server"></asp:Label>
                                                    </a>
                                                </span>
                                            </div>
                                            <div class="col-sm-9 head-part-btns">
                                                <div class="pull-right">
                                                    <div class="col-sm-5 padding-width-md" id="btnFuelEntry" runat="server">
                                                        <asp:ImageButton ID="ibtnFuelEntry" runat="server" CausesValidation="False" OnClientClick="ShowPopUp();"
                                                            OnClick="ibtnManualEntry_Click" ImageUrl="~/Images/btn-add-fuelentry.png" CssClass="nullpadding" />
                                                        <div class="clear clearfix"></div>
                                                    </div>
                                                    <div class="col-sm-5 padding-width-md">
                                                        <asp:HyperLink ID="btnBack" runat="server" ImageUrl="~/Images/btn-back-to-configuration.jpg"
                                                            NavigateUrl="~/Forms/ConfigurationSetup.aspx"></asp:HyperLink>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="clear clearfix"></div>
                                        </div>
                                        <div class="clear clearfix"></div>
                                        <asp:Panel ID="pnlFuelEntryInfo" runat="server" CssClass="ControlShow">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/icn-fuelmanagement.png" alt="" />
                                                    </span>
                                                    <asp:Label ID="lblFuelEntry" runat="server" Text="Fuel Entry"></asp:Label>
                                                </h1>
                                                <div class="form-tbl col-sm-12">
                                                    <div class="col-sm-12 padding-sm-lrt">
                                                        <div class="form-horizontal">
                                                            <div class="form-group">
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <span>
                                                                        <asp:Image ID="imgFleetIcon" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name"
                                                                            runat="server" align="middle" />
                                                                    </span>
                                                                    <asp:Label ID="lblFleet" runat="server" Text="Fleet"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm form-controllinebreak">
                                                                    <asp:DropDownList ID="ddlFleet" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged"
                                                                        TabIndex="1" AppendDataBoundItems="True" CssClass="form-control">
                                                                    </asp:DropDownList>
                                                                </div>
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <span>
                                                                        <asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif"
                                                                            AlternateText="Vehicle Name" align="middle" />
                                                                    </span>
                                                                    <asp:Label ID="lblVehicle" runat="server" Text="Vehicle"></asp:Label>
                                                                    <span class="redtxt" id="mVehicle" runat="server">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm ">
                                                                    <asp:DropDownList ID="ddlVehicle" runat="server" TabIndex="2" AutoPostBack="true"
                                                                        AppendDataBoundItems="True" CssClass="form-control">
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <span>
                                                                        <asp:Image ID="imgInterval" ImageUrl="../images/interval.png" AlternateText="Duration"
                                                                            runat="server" align="middle" />
                                                                    </span>
                                                                    <asp:Label ID="lblFromDate" runat="server" Text="From Date"></asp:Label>
                                                                    <%--<asp:Label ID="lblFromDate" runat="server" Text="Gas Filled Date"></asp:Label>--%>
                                                                    <span class="redtxt" id="mFromDate" runat="server">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm form-controllinebreak">
                                                                    <asp:TextBox ID="txtStartDate" runat="server" CssClass="date form-control" oncopy="return false"
                                                                        oncut="return false" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                        onpaste="return false" ToolTip="dd/MMM/yyyy" TabIndex="3"></asp:TextBox>
                                                                </div>
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <span>
                                                                        <asp:Image ID="Image1" ImageUrl="../images/interval.png" AlternateText="Duration"
                                                                            runat="server" align="middle" />
                                                                    </span>
                                                                    <asp:Label ID="lblToDate" runat="server" Text="To Date"></asp:Label>
                                                                    <span class="redtxt" id="mToDate" runat="server">*</span>
                                                                </div>
                                                                <div class="col-sm-3 col-md-2 padding-width-sm form-controllinebreak">
                                                                    <asp:TextBox ID="txtEndDate" runat="server" CssClass="date form-control" oncopy="return false"
                                                                        oncut="return false" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                        onpaste="return false" ToolTip="dd/MMM/yyyy" TabIndex="4"></asp:TextBox>
                                                                    <div id="enddate" runat="server" class="time1 Responsivetime">
                                                                        <MKB:TimeSelector ID="tsHrs" runat="server" AmPm="AM" DisplaySeconds="False" Hour="8"
                                                                            Font-Size="10pt" Height="20px" SelectedTimeFormat="Twelve" Visible="false" Style="vertical-align: middle;">
                                                                        </MKB:TimeSelector>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-1 padding-width-sm">
                                                                    <asp:ImageButton ID="ibtnSearch" runat="server" ImageUrl="~/images/btn-search.jpg"
                                                                        OnClick="ibtnSearch_Click" OnClientClick="return ValidationFuelEntrySearch(); ShowPopUp();" />
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="trFuel" runat="server">
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <asp:Label ID="lblFuel" runat="server" Text="Fuel"></asp:Label>
                                                                    <span class="redtxt">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm">
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:TextBox ID="txtFuel" runat="server" MaxLength="12" oncopy="return false" ondrop="return false"
                                                                            onkeypress="return chkDecNums(event, this);" onpaste="return false" CssClass="form-control"
                                                                            TabIndex="5" />
                                                                    </div>
                                                                    <div class="col-xs-6 padding-width-sm icon-label form-controllinebreak">
                                                                        <asp:Label ID="lblGallonsLitres" runat="server"></asp:Label>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <%--<asp:Label ID="lblFuelCost" runat="server" Text="Fuel Cost"></asp:Label>--%>
                                                                    <asp:Label ID="lblFuelCost" runat="server" Text="Cost/ltr"></asp:Label>
                                                                    <span class="redtxt">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm">
                                                                    <asp:TextBox ID="txtFuelCost" runat="server" MaxLength="12" oncopy="return false"
                                                                        ondrop="return false" onkeypress="return chkDecNums(event, this);" onpaste="return false"
                                                                        CssClass="form-control" TabIndex="5" />
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="Gas" runat="server" visible="false">
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <asp:Label ID="lblGasStation" runat="server" Text="Fuel Station Name"></asp:Label>
                                                                    <span class="redtxt">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm ">
                                                                    <asp:TextBox ID="txtGasStation" runat="server" MaxLength="250" oncopy="return false"
                                                                        ondrop="return false" onkeypress="return chkDescription(event,this,249);" onblur="return disallowScriptTags(this);"
                                                                        CssClass="form-control" Height="45px" TabIndex="6" TextMode="MultiLine" />
                                                                    <asp:Label ID="Label2" runat="server"></asp:Label>
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="trcomments" runat="server">
                                                                <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                                                    <asp:Label ID="lblComments" runat="server" Text="Comments"></asp:Label>
                                                                    <span class="redtxt">*</span>
                                                                </div>
                                                                <div class="col-sm-3 padding-width-sm ">
                                                                    <asp:TextBox ID="txtComments" CssClass="form-control" runat="server" TextMode="MultiLine" Height="45px"
                                                                        MaxLength="250" onkeypress="return chkDescription(event,this,249);" onblur="return disallowScriptTags(this);"
                                                                        TabIndex="8"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="trRequired" runat="server">
                                                                <div class="col-sm-3 padding-width-sm">
                                                                    <asp:Label ID="Label12" runat="server" ForeColor="Red">*</asp:Label>
                                                                    <asp:Label ID="lblRequiredField" runat="server" Text="Required field"></asp:Label>
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="trUpdate" runat="server">
                                                                <div class="col-xs-3"></div>
                                                                <div class="col-xs-9 padding-width-sm icon-img">
                                                                    <asp:ImageButton ID="ibtnUpdate" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                        TabIndex="9" OnClientClick="return ValidationFuelEntry();" OnClick="ibtnUpdateModelDriver_Click" />
                                                                    &nbsp;&nbsp;
                                                                    <asp:ImageButton ID="ibtncancelupdate" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                        TabIndex="10" OnClick="ibtncancelupdate_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                                </div>
                                                            </div>
                                                            <div class="form-group" id="trsave" runat="server">
                                                                <div class="col-xs-3"></div>
                                                                <div class="col-xs-9 padding-width-sm icon-img">
                                                                    <asp:ImageButton ID="ibtnSave" runat="server" ImageUrl="~/images/btn-save.jpg" OnClick="ibtnSave_Click1"
                                                                        OnClientClick="return ValidationFuelEntry();" TabIndex="10" />
                                                                    &nbsp;&nbsp;
                                                                    <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                        OnClick="ibtnCancel_Click1" TabIndex="11" />&nbsp;&nbsp;&nbsp;&nbsp;
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix"></div>
                                        <div class="clear clearfix"></div>
                                        <asp:Panel ID="pnlFuelEntryDetailsList" runat="server">
                                            <div id="grid-dsply">
                                                <div id="top">
                                                    <div class="col-xs-12 gridheader">
                                                        <div class="col-sm-6 padding-width-sm">
                                                            <span class="txt">
                                                                <asp:Label ID="Label10" Text="Fuel Entry Details" runat="server"></asp:Label>
                                                            </span>
                                                        </div>
                                                        <div class="col-sm-6 nullpadding line-height-default">
                                                            <div class="pull-right">
                                                                <span class="dropdown padding-width-sm">
                                                                    <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                        ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                        <Items>
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                            <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                        </Items>
                                                                    </dxw:ASPxComboBox>
                                                                </span>
                                                                <asp:ImageButton ID="btnExport" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                    OnClick="btnExport_Click" />&nbsp;
                                                                <asp:ImageButton ID="btnImportFuel" runat="server" ImageUrl="~/images/import.jpg"
                                                                    OnClientClick="popUpAdvancedSearch(1);HidePopUp();return false;" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix"></div>
                                                <div class="table-responsive">
                                                    <dxw:ASPxGridView ID="gvFuelEntry" runat="server" Width="100%" KeyFieldName="FuelEntryID"
                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                        EnableTheming="true" Theme="Office2003Blue">
                                                        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="160" />
                                                        <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/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">
                                                        </SettingsPager>
                                                        <Columns>
                                                            <dxw:GridViewDataColumn FieldName="VehicleId" Caption="Vehicle ID" VisibleIndex="0"
                                                                Visible="false">
                                                            </dxw:GridViewDataColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="VehicleName" Caption="Vehicle Name" VisibleIndex="1"
                                                                HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="12%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ID="imgUserName" ImageUrl="..\Images\usermanage-icon.gif"
                                                                            align="top" Visible="false" /></span> <span class="label"></span><span class="label">
                                                                                <asp:Label ID="lblVehicleName" runat="server" Font-Bold="false" Text="Vehicle Name"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="True" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="DriverName" Caption="Driver Name" VisibleIndex="2"
                                                                HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Width="8%"
                                                                CellStyle-Wrap="True">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFuelFilled" runat="server" Font-Bold="false" Text='<%# Eval("DriverName") %>'></asp:Label>
                                                                    </span>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="FuelStation" Caption="Fuel Station" VisibleIndex="3"
                                                                HeaderStyle-HorizontalAlign="Center" Width="10%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Left">
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="FromDateSort" Caption="Fuel Filled Date"
                                                                VisibleIndex="4" HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="10%"
                                                                CellStyle-HorizontalAlign="Center">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgVehDisc" runat="server" ImageUrl="../images/vehicledesc-icon.gif"
                                                                            Visible="false" />
                                                                    </span><span class="label">&nbsp;<asp:Label ID="lblFromDate" runat="server" Font-Bold="false"
                                                                        Text="Fuel Filled Date"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFDate" runat="server" Text='<%# Eval("FromDate") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="FromDate" Caption="Fuel Filled Date" VisibleIndex="2"
                                                                HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="10%" CellStyle-HorizontalAlign="Center"
                                                                Visible="false">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgVehDisc" runat="server" ImageUrl="../images/vehicledesc-icon.gif"
                                                                            Visible="false" />
                                                                    </span><span class="label">&nbsp;<asp:Label ID="lblFromDate" runat="server" Font-Bold="false"
                                                                        Text="From Date"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFDate" runat="server" Text='<%# Eval("FromDate") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="ToDateSort" Caption="To Date" VisibleIndex="5"
                                                                HeaderStyle-HorizontalAlign="Center" Width="10%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSeverity" runat="server" ImageUrl="../images/icn-severity.gif"
                                                                            Visible="false" />
                                                                    </span><span class="label">&nbsp;<asp:Label ID="lblToDate" runat="server" Font-Bold="false"
                                                                        Text="To Date"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFDate" runat="server" Text='<%# Eval("ToDate") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="ToDate" Caption="To Date" VisibleIndex="3"
                                                                HeaderStyle-HorizontalAlign="Center" Width="10%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center"
                                                                Visible="false">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSeverity" runat="server" ImageUrl="../images/icn-severity.gif"
                                                                            Visible="false" />
                                                                    </span><span class="label">&nbsp;<asp:Label ID="lblToDate" runat="server" Font-Bold="false"
                                                                        Text="To Date"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFDate" runat="server" Text='<%# Eval("ToDate") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="FuelFilled" Caption="Fuel Filled" VisibleIndex="6"
                                                                HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Width="10%" CellStyle-Wrap="True">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblFuelFilled" runat="server" Font-Bold="false" Text='<%# Eval("FuelFilled") %>'></asp:Label>
                                                                    </span>
                                                                </DataItemTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="FuelCost" Caption="Fuel Cost" VisibleIndex="7"
                                                                HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Width="7%"
                                                                CellStyle-Wrap="True">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgEmailUserNameList" ImageUrl="../images/icn-email-users.gif" runat="server"
                                                                            Visible="false" />
                                                                    </span><span class="label">&nbsp;<asp:Label ID="lblFuel" runat="server" Font-Bold="false"
                                                                        Text="Fuel Cost"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Distance" Caption="Distance Traveled" VisibleIndex="8"
                                                                HeaderStyle-HorizontalAlign="Center" Width="15%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Mileage" Caption="Mileage" VisibleIndex="9"
                                                                HeaderStyle-HorizontalAlign="Center" Width="15%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Comments" Caption="Comments" VisibleIndex="10"
                                                                HeaderStyle-HorizontalAlign="Center" Width="8%" CellStyle-Wrap="True">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSMSUserNameList" ImageUrl="../images/icn-sms-users.gif" runat="server"
                                                                            Visible="false" />
                                                                    </span><span class="label">
                                                                        <asp:Label ID="lblComments" runat="server" Font-Bold="false" Text="Comments"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="UserName" Caption="User Name" VisibleIndex="11"
                                                                HeaderStyle-HorizontalAlign="Center" Width="8%" CellStyle-Wrap="True">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSMSUserNameList" ImageUrl="../images/icn-sms-users.gif" runat="server"
                                                                            Visible="false" />
                                                                    </span><span class="label">
                                                                        <asp:Label ID="lblUserName" runat="server" Font-Bold="false" Text="User Name"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <Settings AllowAutoFilter="False" />
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit" HeaderStyle-HorizontalAlign="Center"
                                                                CellStyle-HorizontalAlign="Center">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lbnEdit" runat="server" AlternateText="Update" ToolTip="Click here to Update"
                                                                        ImageAlign="Middle" CommandArgument='<%#Eval("FuelEntryID") %>' OnClick="lbnEdit_Click"><img src="../images/icn-edit.gif" alt="" /></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Delete" Name="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                                CellStyle-HorizontalAlign="Center">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lbnDelete" runat="server" AlternateText="Delete" OnClientClick="return confirm('Do you want to really delete this record?');"
                                                                        ToolTip="Click here to Delete" CommandArgument='<%#Eval("FuelEntryID") %>' OnClick="lbnDelete_Click"><img src="../images/delete-icon.gif" alt="" /></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                        </Columns>
                                                        <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                        <SettingsText EmptyDataRow="No Fuel Entry details found" />
                                                    </dxw:ASPxGridView>
                                                </div>
                                                <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter" runat="server" GridViewID="gvFuelEntry"
                                                    MaxColumnWidth="90">
                                                    <Styles>
                                                        <Default VerticalAlign="Middle">
                                                        </Default>
                                                        <Header BackColor="#D1D1D1" Font-Bold="True" Font-Names="Arial" Font-Size="10pt"
                                                            ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True">
                                                        </Header>
                                                        <Cell VerticalAlign="Middle" Wrap="True" Font-Size="8pt" Font-Names="Arial" HorizontalAlign="Center"
                                                            ForeColor="Black">
                                                        </Cell>
                                                    </Styles>
                                                    <PageHeader Center="Fuel Entry Details" VerticalAlignment="Far">
                                                        <Font Bold="True" Names="Arial" Size="10pt" Underline="True"></Font>
                                                    </PageHeader>
                                                    <PageFooter Right="[Page # of Pages #]">
                                                    </PageFooter>
                                                </dxw:ASPxGridViewExporter>
                                            </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>
                    <%--<cc1:ModalPopupExtender ID="mpDriverDetailsLoad" runat="server" BackgroundCssClass="modalbackground"
                        PopupControlID="pnlImportFuelEntry" TargetControlID="btnImportFuel" X="280" CancelControlID="ibtnCancelImport">
                    </cc1:ModalPopupExtender>--%>
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="btnExport" />
                    <asp:PostBackTrigger ControlID="btnImportFuel" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:HiddenField ID="hdnDistance" runat="server" />
            <asp:Panel ID="pnlNotificationsList" runat="server" CssClass="manageNotificationPanel col-xs-9 nullpadding">
                <asp:UpdatePanel ID="updNotify" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <uc3:NotificationsList ID="ucNotificationList" runat="server" NotificationType="7" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlAddEditServiceCategory" runat="server" Style="display: none" CssClass="landmarkPanel">
                <asp:UpdatePanel ID="upServiceCategory" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblServiceCategoryHeading" Text="Add / Edit Service Package" runat="server"></asp:Label></h1>
                                <div class="close">
                                    <asp:ImageButton ID="ibtClose" runat="server" OnClientClick="CategoryPopup(false);"
                                        ImageUrl="~/Images/popup-close.gif" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <div class="form-tbl">
                                    <div class="form-group">
                                        <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                            <asp:Label ID="lblCategoryName" runat="server" Text="Service Package Name" CssClass="label"></asp:Label>
                                            <span class="redtxt">*</span>
                                        </div>
                                        <td>
                                            <asp:TextBox ID="txtCategoryName" runat="server" MaxLength="50" onpaste="return false"
                                                ondrop="return false" onkeypress="return chkAlphaNumericWithSpace(event,this,49);"
                                                CssClass="form-control" TabIndex="1"></asp:TextBox>
                                        </td>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-2 col-md-1 padding-width-sm icon-img">
                                            <asp:Label ID="lblDescription" runat="server" Text="Description" CssClass="label"></asp:Label>
                                        </div>
                                        <td>
                                            <asp:TextBox ID="txtDescription" TextMode="MultiLine" runat="server" Rows="5" TabIndex="2"
                                                CssClass="form-control" MaxLength="250" onkeypress="return chkDescription(event,this,249);"
                                                onblur="return disallowScriptTags(this);"></asp:TextBox>
                                        </td>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-9">
                                            <asp:ImageButton ID="ibtnSaveServiceCategory" runat="server" CausesValidation="true"
                                                TabIndex="5" ImageUrl="~/images/btn-save.jpg" />
                                            <asp:ImageButton ID="ibtnCancelCatetory" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                CausesValidation="false" TabIndex="7" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlImportFuelEntry" runat="server" CssClass="iButtonPanelImport col-sm-5 col-md-5 col-lg-4" Style="display: none;">
                <div class="popup">
                    <div class="top">
                        <h1>
                            <asp:Label ID="lblFile" Text="Bulk Update Fuel Entry" runat="server"></asp:Label>
                        </h1>
                        <div class="close">
                            <asp:ImageButton ID="ibtnClose" OnClientClick="popUpAdvancedSearch(0);HidePopUp();return false;"
                                CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <div class="popup-cont">
                        <div class="form-tbl">
                            <div class="form-group">
                                <div class="col-sm-2 icon-img">
                                    <asp:Label ID="lblDriverDetails" runat="server" Text="Select File" CssClass="label"></asp:Label>
                                </div>
                                <div class="col-sm-10">
                                    <asp:FileUpload ID="fuFuel" runat="server" onchange="return validateCSVFileUpload(this);" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-2"></div>
                                <div class="col-sm-10">
                                    <asp:ImageButton ID="ibtnUpdateDrivers1" runat="server" ImageUrl="~/images/btn-update.jpg"
                                        Visible="false" />
                                    <asp:LinkButton ID="ibtnUpdateFuelEntry" runat="server" CssClass="MultilingualBtn"
                                        TabIndex="17" OnClick="ibtnUpdateFuelEntry_Click" OnClientClick="ShowPopUp();">
                                        <span id="Span12" runat="server" class="MultilingualBtnspan">
                                            <div class="Update">
                                                <div id="UpdateDiv" runat="server" class="MultilingualBtnTextAlign">
                                                    Update
                                                </div>
                                            </div>
                                        </span>
                                    </asp:LinkButton>
                                    <asp:ImageButton ID="ibtnCancel1" runat="server" ImageUrl="~/images/btn-Cancel.jpg"
                                        Visible="false" />&nbsp;
                                    <asp:LinkButton ID="ibtnCancelImport" runat="server" CssClass="MultilingualBtn" TabIndex="19">
                                        <span id="Span13" runat="server" class="MultilingualBtnspan">
                                            <div class="Cancel">
                                                <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                    Cancel
                                                </div>
                                            </div>
                                        </span>
                                    </asp:LinkButton>&nbsp;&nbsp;
                                    <asp:LinkButton ID="lbtnDownloadTemp" runat="server" Text="Download Template"
                                        OnClick="Download_Template"></asp:LinkButton>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                <br />
                <img 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" />

            <script src="../js/myformvalidations.js" type="text/javascript"></script>
            <script type="text/javascript" language="javascript" src="../js/DateValidations.js"></script>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />

    <script>
        var AlertFileType = 'files are not allowed.\n\n Please upload only xls/xlsx files.';
        var AlertSelectStudent = 'Please select one or more Student.';
        var totalRecordCount = '';
        var totalPageCount = '';
        var _selectNumber = 0;
        var _all = false;
        var _handle = true;
        function setAlertMessageFileType(Filetype) {
            AlertFileType = Filetype;
        }
        function validateCSVFileUpload(obj) {
            var fileName = new String();
            var fileExtension = new String();
            var validfileextensions = "xls";
            var validfileextensions1 = "xlsx";
            var flag = false;
            // store the file name into the variable
            filename = obj.value;
            // extract and store the file extension into another variable
            fileextension = filename.substr(filename.length - 3, 3);
            // check over the valid file extensions to compare them with uploaded file
            if (fileextension.toLowerCase() == validfileextensions.toString().toLowerCase() || fileextension.toLowerCase() == validfileextensions1.toString().toLowerCase()) {
                flag = true;

            }
            else {
                alert(AlertFileType);
            }
        }
    </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();
            }
        }

        function popUpAdvancedSearch(PanelStatus) {
            if (document.getElementById('pnlImportFuelEntry') != null) {
                if (PanelStatus == 1)
                    document.getElementById('pnlImportFuelEntry').style.display = "inline-block";
                else
                    document.getElementById('pnlImportFuelEntry').style.display = "none";
            }
        }
    </script>
</body>
</html>
