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

<%@ Register Src="~/UserControls/Notification_List.ascx" TagPrefix="uc3" TagName="NotificationsList" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/TrinetraGrid.ascx" TagName="FleetGrid" TagPrefix="uc5" %>
<%@ Register Src="~/UserControls/TrinetraGrid.ascx" TagName="EmailGrid" TagPrefix="uc4" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%--<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>--%>

<%--<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>
<%@ 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.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>--%>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <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" />
    <title>tSense-IoT Configuration</title>
    <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="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="" />
    <link id="datepicker" 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" />

    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>

    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>

    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>

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

    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>

    <script type="text/javascript" src="../js/ui.datepicker.js"></script>

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

    <script language="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>
    <link href="../App_Themes/Office2003Blue/GridView/grid.css" rel="Stylesheet" />
    <link href="../App_Themes/Office2003Blue/Editors/styles.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/wow.min.js"></script>
</head>
<body>
    <div id="container">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel runat="server" ID="updVenDetails" UpdateMode="Conditional">
                <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 -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content">
                                            <div id="heading">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationCaption" runat="server">Configuration</asp:Literal></h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server">Home</asp:LinkButton><span>&gt;</span><asp:LinkButton
                                                    ID="lnkVendorMgmt" PostBackUrl="RefFuelconsumption.aspx" runat="server" Text="Fuel Consumption"
                                                    OnClick="lnkVendorMgmt_Click"></asp:LinkButton>
                                            </div>
                                            <div id="control-box">
                                                <table border="0" cellpadding="0" cellspacing="0" id="control-tbl" width="100%">
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <table cellpadding="0" cellspacing="0" border="0" class="ManageGeozoneTableAlign">
                                                                    <tr height="20px">
                                                                        <td></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            <asp:ImageButton ID="lbtnAddVendor1" runat="server" CausesValidation="false" OnClick="lbtnAddVendor_Click"
                                                                                ImageUrl="~/images/btn-add-vehicle.jpg" Visible="false" />
                                                                            <asp:LinkButton ID="lbtnAddVendor" runat="server" CssClass="MultilingualBtn" CausesValidation="false"
                                                                                OnClick="lbtnAddVendor_Click">
                                                                                <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="AddRefrigeratorFuel">
                                                                                        <div id="AddVendorDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Add Fuel Details
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                        <td></td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                        <td>
                                                                            <asp:ImageButton ID="lbtnVehSeveritySetting1" PostBackUrl="MsgSeveritySettings.aspx"
                                                                                runat="server" CausesValidation="false" ImageUrl="~/images/btn-vehicle-msg.jpg"
                                                                                Visible="false" />
                                                                            <asp:LinkButton ID="lbtnVehSeveritySetting" runat="server" CssClass="MultilingualBtn"
                                                                                CausesValidation="false" PostBackUrl="~/Forms/VendorVehicleMapping.aspx" Visible="false">
                                                                                <span id="Span3" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="SeveritySettings">
                                                                                        <div id="SeveritySettingsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Vehicle Assignment
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                        <td>
                                                                            <asp:ImageButton ID="btnBack1" runat="server" OnClick="btnBack_Click" CausesValidation="false"
                                                                                ImageUrl="~/images/btn-back-to-configuration.jpg" Visible="false" />
                                                                            <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" CausesValidation="false"
                                                                                PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                                                <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="Back">
                                                                                        <div id="BacktoConfigurationDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Back to Configuration
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel ID="pnlContainer" runat="server" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon" style="padding-top: 5">
                                                        <img src="../images/vehicle-icon.gif" alt="" title="" /></span>
                                                    <asp:Label ID="lblVenInfoHeading" runat="server" Text="Fuel Details"></asp:Label></h1>
                                                <table cellspacing="5px" border="0" class="form-tbl">
                                                    <tr style="height: 3px; padding-left: 15px">
                                                        <td colspan="7"></td>
                                                    </tr>
                                                    <tr style="padding-left: 15px; padding-bottom: 25px">
                                                        <td style="height: 8px; padding-left: 35px"></td>
                                                        <td style="vertical-align: top; padding-top: 2px">
                                                            <asp:Label ID="lblVName" runat="server" Text="Refrigerator Name " CssClass="label"></asp:Label>
                                                            <span style="color: red">*</span>
                                                        </td>
                                                        <td style="vertical-align: top">
                                                            <asp:DropDownList ID="ddlRefrigerator" runat="server" CssClass="textboxcss" TabIndex="1"
                                                                AutoPostBack="true" OnSelectedIndexChanged="ddlRefrigerator_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td style="padding-left: 35px">
                                                            <asp:Label ID="lblMainDays" runat="server" Text="Mileage"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtMileage" CssClass="textboxcss" runat="server" MaxLength="12"
                                                                oncopy="return false" TabIndex="7" ondrop="return false;" onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td style="padding-top: 2px">
                                                            <asp:Label ID="lblcontractfrom" runat="server" Text="Meter Reading"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtmeterReading" runat="server" CssClass="textboxcss" MaxLength="7"
                                                                oncopy="return false" TabIndex="2" onchange="CurConsumpton();" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td style="padding-left: 35px">
                                                            <asp:Label ID="lblworkorder" runat="server" Text="Average Consumption (Litres)" CssClass="label"></asp:Label>
                                                            <%-- <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>--%>
                                                            <span style="color: Red">*</span>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtavgConsumption" runat="server" oncopy="return false" oncut="return false"
                                                                onpaste="return false" CssClass="textboxcss" TabIndex="8" MaxLength="4" onchange="Excess();"
                                                                onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td>
                                                            <asp:Label ID="lblFleet" runat="server" Text="Date" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtPurchasedDate1" runat="server" oncopy="return false" oncut="return false"
                                                                onpaste="return false" onkeyDown="return CalendarTab(event);;" CssClass="textboxcss"
                                                                TabIndex="3"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                        <td style="padding-left: 35px">
                                                            <asp:Label ID="lblContractTo" runat="server" Text="Current Consumption (Litres)"></asp:Label>
                                                            <span style="color: Red">*</span>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtCurrentConsumption" runat="server" oncopy="return false" oncut="return false"
                                                                onpaste="return false" CssClass="textboxcss" TabIndex="9" MaxLength="4" onchange="Excess();"
                                                                onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td>
                                                            <asp:Label ID="lblVehicle" runat="server" Text="Fuel Quantity (Litres)" CssClass="label"></asp:Label>
                                                            <span style="color: Red">*</span>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtfuelQty" runat="server" CssClass="textboxcss" MaxLength="12"
                                                                onchange="CurConsumpton();Price();" oncopy="return false" TabIndex="4" onkeypress="return chkDecNums(event, this);"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td style="padding-left: 35px">
                                                            <asp:Label ID="lblKmMonth" runat="server" Text="Variance in %" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtVariance" CssClass="textboxcss" runat="server" MaxLength="4"
                                                                oncopy="return false" TabIndex="10" ondrop="return false;" onkeypress="return chkNumeric_only(event);"
                                                                onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                        <td rowspan="5"></td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td>
                                                            <asp:Label ID="lblDHT" runat="server" Text="Value" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtValue" CssClass="textboxcss" runat="server" MaxLength="12" oncopy="return false"
                                                                TabIndex="5" ondrop="return false;" onchange="Price();" onkeypress="return chkDecNums(event, this);"></asp:TextBox>
                                                            &nbsp;
                                                        </td>
                                                        <td></td>
                                                        <td style="padding-left: 35px">
                                                            <asp:Label ID="lblExtraCostHR" runat="server" Text="Excess\Less Qty (Litres)"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtExcessLessQty" CssClass="textboxcss" runat="server" MaxLength="4"
                                                                oncopy="return false" TabIndex="11" onkeypress="return chkNumeric_only(event);"
                                                                onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td>
                                                            <asp:Label ID="lblFixRateMonth" runat="server" Text="Price/Litre"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtPrice" CssClass="textboxcss" runat="server" MaxLength="12" oncopy="return false"
                                                                TabIndex="6" ondrop="return false;" onkeyDown="return CalendarTab(event);"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                        <td style="padding-left: 35px">&nbsp;
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 8px;"></td>
                                                        <td></td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 5px;"></td>
                                                        <td colspan="4">
                                                            <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                        <asp:Label ID="lblIndicatesMandatory" runat="server">Required Fields</asp:Label><br />
                                                            <br />
                                                        </td>
                                                        <td>
                                                            <asp:HiddenField runat="server" ID="hdnDateFormat" Value="dd-MMM-yyyy" />
                                                            <asp:HiddenField runat="server" ID="hdnRefVehicles" />
                                                        </td>
                                                        <td>
                                                            <asp:HiddenField ID="hdnOdometer" runat="server" />
                                                            <asp:HiddenField ID="hdnImportMode" runat="server" />
                                                        </td>
                                                    </tr>

                                                    <tr>
                                                        <td align="left"></td>
                                                        <td></td>
                                                        <td valign="top">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr>
                                                                    <td>
                                                                        <%--<div id="divUpdate" runat="server">--%>
                                                                        <asp:LinkButton ID="ibtnUpdateContainer" ValidationGroup="vgVeh" runat="server" CssClass="MultilingualBtn"
                                                                            CausesValidation="false" OnClientClick="return ValidateFuelInformation(true);"
                                                                            OnClick="ibUpdate_Click">
                                                                            <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                                                <div class="Update">
                                                                                    <div id="UpdateVehicleButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Update
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton><%--</div>
                                                                    <div id="divSave" runat="server">--%>
                                                                        <asp:LinkButton ID="ibtnAddContainer" runat="server" CssClass="MultilingualBtn" ValidationGroup="vgVeh"
                                                                            TabIndex="13" OnClientClick="return ValidateFuelInformation(true);" OnClick="ibSave_Click">
                                                                            <span id="Span7" runat="server" class="MultilingualBtnspan">
                                                                                <div class="Save">
                                                                                    <div id="AddVehicleButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Save
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>
                                                                        &nbsp;
                                                                    <asp:LinkButton ID="btnCancelContainer" runat="server" CssClass="MultilingualBtn"
                                                                        OnClick="ibCancel_Click" CausesValidation="false">
                                                                        <%--OnClientClick="return ClearData();"--%>
                                                                        <span id="Span8" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Cancel">
                                                                                <div id="UserCancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Cancel
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                </table>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlGridContainers" runat="server">
                                        <div id="grid-dsply">
                                            <div id="top">
                                                <div class="right-col">
                                                    <span class="txt">
                                                        <asp:ImageButton ID="btnImportGeozones" runat="server" ImageUrl="~/images/import.jpg" />
                                                    </span><span class="dropdown">
                                                        <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                            ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0" EnableTheming="true" Theme="Office2003Blue"
                                                            CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                            <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" />
                                                            </Items>
                                                        </dxw:ASPxComboBox>
                                                    </span>&nbsp;<span class="txt" style="vertical-align: top">
                                                        <asp:ImageButton ID="btnExport1" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                            OnClick="btnExport_Click" Visible="false" />
                                                        <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click">
                                                            <span id="Span9" runat="server" class="MultilingualBtnspan">
                                                                <div class="Export">
                                                                    <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                        Export
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                    </span>
                                                </div>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                            <dxw:ASPxGridView ID="gvcontainserFuelDetails" ClientInstanceName="gvContainerDetails"
                                                EnableTheming="true" Border-BorderColor="Black" KeyFieldName="RefgId" runat="server"
                                                CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue" Theme="Office2003Blue"
                                                Width="100%" AutoGenerateColumns="False" OnHtmlRowCreated="gvcontainserFuelDetails_OnHtmlRowCreated">
                                                <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 AlternatingRow-Enabled="True" CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css"
                                                    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>
                                                <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="175" />
                                                <Columns>
                                                    <dxw:GridViewDataColumn Caption="Refrigerator Name" Width="15%" FieldName="ContName"
                                                        VisibleIndex="2" CellStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/26.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Refrigerator Name"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings AllowAutoFilter="True" />
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Odometer" Width="14%" FieldName="Odometer" CellStyle-Wrap="True"
                                                        Visible="true" VisibleIndex="3" CellStyle-HorizontalAlign="Center">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/58.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Odometer"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Fuel Qty" Width="12%" FieldName="FuelQty" Visible="true"
                                                        VisibleIndex="3" CellStyle-HorizontalAlign="right" CellStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/57.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Fuel Qty"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Value" Width="12%" FieldName="Value" Visible="true"
                                                        VisibleIndex="4" CellStyle-HorizontalAlign="right" CellStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/83.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Value"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Avg Consumption" Width="12%" FieldName="AvgConsumption"
                                                        VisibleIndex="5" CellStyle-Wrap="True" Visible="false">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/59.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Avg Consumption"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings AllowAutoFilter="False" />
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Date" Width="12%" FieldName="DateSort" VisibleIndex="6"
                                                        CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/date.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Date"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <DataItemTemplate>
                                                            <asp:Label ID="lblDescription1" runat="server" Text='<%#Eval("Date")%>'></asp:Label></span>
                                                        </DataItemTemplate>
                                                        <Settings AllowAutoFilter="False" />
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Variance" Width="12%" FieldName="Variance" VisibleIndex="7"
                                                        CellStyle-Wrap="True">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/60.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="Variance"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings AllowAutoFilter="False" />
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="ExsLess Qty" Width="15%" FieldName="ExsLessQty"
                                                        CellStyle-Wrap="True" Visible="true" VisibleIndex="8">
                                                        <HeaderCaptionTemplate>
                                                            <span class="icon">
                                                                <img id="imgDescription" src="../images/61.png" alt="" /></span> <span class="label">
                                                                    <asp:Label ID="lblDescription" runat="server" Text="ExsLess Qty"></asp:Label></span>
                                                        </HeaderCaptionTemplate>
                                                        <Settings AllowAutoFilter="False" />
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataTextColumn Caption="View" Width="3%" Visible="false">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="ibnView" runat="server" CommandArgument='<%# Eval("Sno")+ "," + 2 %>'
                                                                OnClientClick="ShowPopUp();" Style="text-decoration: none;"> <img src="../images/icn-view.gif" alt="View" title="Click here to View"/> </asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" Name="Edit" VisibleIndex="9">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="btnEdit" runat="server" CommandArgument='<%# Eval("Sno")+ "," + 2 %>'
                                                                OnClientClick="ShowPopUp();" AlternateText="Edit" OnClick="btnEditContainer_click"
                                                                ToolTip="Click here to Edit"><img src="../images/icn-edit.gif" alt="" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Delete" VisibleIndex="10" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center" Width="3%">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("Sno")+ "," + 2 %>'
                                                                AlternateText="Delete" ToolTip="Click here to Delete" OnClick="btnDelete_click"> <img src="../images/delete-icon.gif" alt="" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataColumn Caption="CurrentConsumption" Width="19%" FieldName="CurrConsumption"
                                                        CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center" Visible="false">
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Price/Litre" Width="19%" FieldName="Price" CellStyle-Wrap="True"
                                                        CellStyle-HorizontalAlign="Center" Visible="false">
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn Caption="Distance Covered" Width="19%" FieldName="Mileage"
                                                        CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center" Visible="false">
                                                    </dxw:GridViewDataColumn>
                                                </Columns>
                                                <%--<ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />--%>
                                                <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowGroupPanel="false" />
                                                <SettingsText EmptyDataRow="No Data Identified" />
                                                <SettingsBehavior ColumnResizeMode="NextColumn" AllowSort="true" AllowDragDrop="true"
                                                    AllowGroup="true" AllowFocusedRow="false" AllowMultiSelection="false" />
                                                <SettingsPager PageSize="10" Mode="ShowPager" AlwaysShowPager="true">
                                                </SettingsPager>
                                            </dxw:ASPxGridView>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvcontainserFuelDetails"
                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\qc\b\fs28 User Details\par\pard\par\par}
">
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </asp:Panel>
                                    <br />
                                    <span style="font-style: italic">Note:If there is no previous entry for the refrigerator
                                    then Current Consumption,Milleage, Variance and Excess\Less Qty will be considered as Zero.</span>
                                </div>
                            </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>
                    <asp:Button ID="btnLoadModel" runat="server" CssClass="btn" Style="display: none"></asp:Button>
                    <asp:Button ID="btnTest" runat="server" CssClass="ControlHide" Text="Test" />
                    <cc1:ModalPopupExtender ID="mpeGeozoneDetailsLoad" runat="server" BackgroundCssClass="modalbackground"
                        PopupControlID="pnlImportGeozones" TargetControlID="btnImportGeozones" X="280"
                        CancelControlID="ibtnCancelImport">
                    </cc1:ModalPopupExtender>
                    <asp:HiddenField ID="hdnStudentID" runat="server" />
                    <asp:HiddenField ID="hdnRowCount" runat="server" />
                    <asp:HiddenField ID="hdnDriverImage" runat="server" />
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="ibtnAddContainer" />
                    <asp:PostBackTrigger ControlID="ibtnUpdateContainer" />
                    <asp:PostBackTrigger ControlID="btnExport" />
                    <asp:PostBackTrigger ControlID="btnTest" />
                    <asp:PostBackTrigger ControlID="btnCancelContainer" />
                </Triggers>
            </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:Panel ID="pnlImportGeozones" runat="server" Style="display: none; position: absolute; top: -600px; width: 375px; height: 210px;">
                <asp:UpdatePanel ID="updImportGeozones" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div id="Div1">
                            <table cellpadding="0" cellspacing="0" border="0" width="98%" class="popup">
                                <tr>
                                    <td class="top-l" id="ImportFuelEntryPnlTopl" runat="server">&nbsp;
                                    </td>
                                    <td class="top-m">&nbsp;
                                    </td>
                                    <td class="top-r" id="ImportFuelEntryPnlTopr" runat="server">&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td class="left" id="ImportFuelEntryPnlLeft" runat="server">&nbsp;
                                    </td>
                                    <td>
                                        <div class="top">
                                            <h1>
                                                <asp:Label ID="lblFile" Text="Bulk Import Fuel Consumption" runat="server"></asp:Label></h1>
                                            <div class="close">
                                                <asp:ImageButton ID="ibtnClose" OnClientClick="$find('mpeGeozoneDetailsLoad').hide(); return false;"
                                                    CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <div class="popup-cont">
                                            <table class="form-tbl" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="lblDriverDetails" runat="server" Text="Select File" CssClass="label"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:FileUpload ID="fuGeozones" runat="server" onchange="return validateCSVFileUpload(this);" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td></td>
                                                    <td>
                                                        <asp:ImageButton ID="ibtnUpdateDrivers1" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                            Visible="false" />
                                                        <asp:LinkButton ID="ibtnUpdateGeozoneEntry" runat="server" CssClass="MultilingualBtn"
                                                            TabIndex="17" OnClick="ibtnUpdateGeozoneEntry_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="ImageButton1" 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>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                    <td class="right" id="ImportFuelEntryPnlRight" runat="server">&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td class="bottom-l" id="ImportFuelEntryPnlBottoml" runat="server">&nbsp;
                                    </td>
                                    <td class="bottom-m">&nbsp;
                                    </td>
                                    <td class="bottom-r" id="ImportFuelEntryPnlBottomr" runat="server">&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="ibtnUpdateGeozoneEntry" />
                        <asp:PostBackTrigger ControlID="ibtnCancelImport" />
                        <asp:PostBackTrigger ControlID="lbtnDownloadTemp" />
                    </Triggers>
                </asp:UpdatePanel>
            </asp:Panel>

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

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

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

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

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

            <script language="javascript" type="text/javascript">
                function HidePopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').hide();
                    }
                }
                function ShowPopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').show();
                    }
                }
            </script>

            <script language="javascript" type="text/javascript">
                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 type="text/javascript">
                Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
                if (navigator.userAgent.indexOf('WebKit/') > -1) {
                    Sys.Browser.agent = Sys.Browser.WebKit;
                    Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
                    Sys.Browser.name = 'WebKit';
                }
            </script>

            <script type="text/javascript">
                function CheckText(textBox) {
                    if (textBox.value.length == 0)
                        textBox.value = textBox.defaultValue.substr(0, 1);
                }
                function CurConsumpton() {
                    var currentReading = document.getElementById('txtmeterReading').value;
                    var CurLitre = document.getElementById('txtfuelQty').value;
                    var Mode = 2;
                    var Odometer = document.getElementById('hdnOdometer');
                    var ddl = document.getElementById('ddlRefrigerator').value;  //ddlVehicleName.GetValueString();
                    var result = 0;
                    if (ddl != "- Select -") {
                        if (Odometer.value == '') {
                            Odometer.value = 0;
                            document.getElementById('txtMileage').value = 0;
                        }

                        if ((currentReading - Odometer.value) != 0) {
                            result = CurLitre / (currentReading - Odometer.value);
                            document.getElementById('txtCurrentConsumption').value = result.toFixed(2);
                        }
                        else {
                            document.getElementById('txtCurrentConsumption').value = 0;
                        }
                        var avgConsumption = document.getElementById('txtavgConsumption').value;


                        if (CurLitre != '' && CurLitre != 0 && currentReading != '' && currentReading != 0 && Odometer.value != 0) {
                            var currentConsumption = document.getElementById('txtCurrentConsumption').value;
                            if (currentConsumption != null && avgConsumption != 0) {
                                var trim = (avgConsumption - currentConsumption);
                                document.getElementById('txtExcessLessQty').value = trim.toFixed(2);
                                var Varaince = ((avgConsumption - currentConsumption) / avgConsumption) * 100;
                                document.getElementById('txtVariance').value = Varaince.toFixed(2)
                                var Mileage = 0;
                                if ((currentReading - Odometer.value) != 0) {
                                    Mileage = (currentReading - Odometer.value) / CurLitre;
                                }

                                document.getElementById('txtMileage').value = Mileage.toFixed(2);
                            }
                        }
                        else {
                            document.getElementById('txtCurrentConsumption').value = 0;
                            document.getElementById('txtExcessLessQty').value = 0;
                            document.getElementById('txtVariance').value = 0;
                        }
                    }
                    else {
                        alert('Please select Refrigerator');
                    }
                }

                function ImportVeh() {
                    var hdn = document.getElementById('Hf');
                    hdn.value = 1;
                }

                function ImportCon() {
                    var hdn = document.getElementById('Hf');
                    hdn.value = 2;
                }

                function Price() {
                    var Litre = document.getElementById('txtfuelQty').value;
                    var ValueperLitre = document.getElementById('txtValue').value;
                    //var Mode = document.getElementById('ddlManageFuel').value;
                    var Odometer = document.getElementById('hdnOdometer');

                    var Result;

                    if (Litre != null && ValueperLitre != null) {
                        Result = (ValueperLitre / Litre);
                        if (ValueperLitre != '') {
                            document.getElementById('txtPrice').value = Result.toFixed(2);
                        }
                    }
                }
            </script>

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