<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Transport_FuelLogs, App_Web_y4s5qbrn" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="Date" %>
<%@ Register Src="~/UserControls/Common/Transport/TransportDetailBoxControl.ascx" TagName="TransportControl" TagPrefix="Transport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="106"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <Transport:TransportControl ID="TransportUserControl" runat="server" Visible="true" />
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0"
                                            CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <asp:Panel ID="SearchCriteriaPanel" runat="Server">
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchVehicleLabel" Text="Vehicle" runat="server"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <asp:DropDownList ID="SearchVehicleDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                    onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchFromLogDateLabel" runat="server" Text="From Log Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromLogDatePickerControl" runat="server" />
                                            </div>
                                        </div>
                                        <div class="outerBox pTop5 col-md-3">
                                            <div class="controlLabelWidth">
                                                <asp:Label ID="SearchToLogDateLabel" runat="server" Text="To Log Date"></asp:Label>
                                            </div>
                                            <div class="fLeft pRight5">
                                                <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToLogDatePickerControl" runat="server" />
                                            </div>
                                        </div>

                                        <div class="alignCenter pTop5 col-md-12 middle">
                                            <asp:Button ID="SearchButton" Text="&#xf002; Search" runat="Server" OnClick="SearchButton_Click"
                                                SkinID="0" CssClass="btn-search btn fas" />
                                            <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click" SkinID="0" CssClass="btn-reset btn fas" />
                                            <asp:Button ID="SearchPrintButton" runat="server" SkinID="0" Text="&#xf15b; Print" Width="80px" OnClick="SearchPrintButton_Click" CssClass="fas btn btn-report" />
                                            <asp:Button ID="ExportButton" Text="&#xf093; Export" CssClass="btn-examcommon btn fas" Enabled="false" SkinID="0" runat="Server" OnClick="ExportButton_Click" />
                                        </div>

                                    </asp:Panel>
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12" runat="server">
                                        <div id="FuelLogDetailDiv" visible="false" runat="server">

                                            <div class="himsBoxHeader card-head inner" id="Div3" runat="server">
                                                <div class="gridHeaderText">
                                                    <header>
                                                        <asp:Label ID="Label2" runat="server" Text="Fuel Logs"></asp:Label>
                                                    </header>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent card-body">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                            <asp:GridView ID="FuelLogGridView" runat="server" AutoGenerateColumns="False"
                                                                OnRowDataBound="FuelLogGridView_RowDataBound" OnPageIndexChanging="FuelLogGridView_PageIndexChanging" CssClass="table table-striped table-bordered table-hover"
                                                                SkinID="" ShowHeader="true" PagerSettings-Visible="false" DataKeyNames="FuelLogsId">
                                                                <Columns>
                                                                    <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="LinkButton_Click"
                                                                                Text="Select" CausesValidation="false"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="VehicleName" HeaderText="Vehicle Name" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:BoundField DataField="FuelTypeName" HeaderText="Fuel Type" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:TemplateField HeaderText="Log Date" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="LogDate" runat="server" Text='<%# Bind("LogDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="FuelAdded" HeaderText="Fuel Added" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:BoundField DataField="Price" HeaderText="Price" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:BoundField DataField="TotalAmount" HeaderText="Total Amount" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:BoundField DataField="LastReading" HeaderText="Last Reading" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                    <asp:BoundField DataField="CurrentReading" HeaderText="Current Reading" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" />
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-cog"></i>
                                        <asp:Label ID="NewsDetailLabel" runat="server" Text="Maintenance"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">

                                <div id="NumberOfRecordDiv" class="display-flex" runat="server" visible="true">
                                    <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                        runat="server" ImageUrl="~/Images/arrowLlast.gif" CommandName="Page" CommandArgument="First"
                                        OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-fast-backward"></i>
                                    </asp:LinkButton>
                                    <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                        runat="server" ImageUrl="~/Images/arrowLeft.gif" CommandName="Page" CommandArgument="Prev"
                                        OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play fa-rotate-180"></i>
                                    </asp:LinkButton>

                                    <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                    &nbsp;  
                                    <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                    &nbsp; 
                                    <asp:Label ID="ofLabel" Text="of" runat="server" />
                                    &nbsp; 
                                    <asp:Label ID="TotalRecord" runat="server" />
                                    &nbsp; 
                                                            <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                                runat="server" ImageUrl="~/Images/arrowRight.gif" CommandName="Page" CommandArgument="Next"
                                                                OnClick="NextImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                <i class="fa fa-play"></i>
                                                            </asp:LinkButton>
                                    <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                        runat="server" ImageUrl="~/Images/arrowRLast.gif" CommandName="Page" CommandArgument="Last"
                                        OnClick="LastRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                                 <i class="fa fa-fast-forward"></i>
                                    </asp:LinkButton>
                                </div>

                                &nbsp; &nbsp;<asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0"
                                    CssClass="btn btn-back fas" Text="&#xf30a; Back" />

                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="tableContainer">
                                    <cc1:TabContainer Width="100%" ID="FuleLogTabContainer" runat="server" CssClass="ajax__myTab nav nav-tabs tabs-style-iconbox"
                                        AutoPostBack="true" meta:resourcekey="FuleLogSearchTabContainerResource1"
                                        ActiveTabIndex="0">
                                        <cc1:TabPanel Width="100%" ID="SingleEntryTabPanel" runat="server" HeaderText="Single Entry">
                                            <HeaderTemplate>
                                                <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                    <li class="fancyTab">
                                                        <a href="#"><i class="fas fa-gas-pump"></i>Single Entry
                                                        </a>
                                                    </li>
                                                </ul>

                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <div class="contentHolder">
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="VehicleLabel" Text="Vehicle" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:DropDownList ID="VehicleDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                                AutoPostBack="true" OnSelectedIndexChanged="VehicleDropDownList_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:HiddenField ID="IdHiddenField" runat="server" />
                                                            <asp:HiddenField ID="MaxRowHiddenField" runat="server" />
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="LogDateLabel" runat="server" Text="Log Date" Visible="True" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <Date:DatePickerControl DisplayDatePicker="true" ID="LogDatePickerControl" runat="server" />
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="FuelAddedLabel" runat="server" Text="Fuel Added" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="FuelAddedTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)" onchange="getAverage(this);"> </asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="PriceLabel" runat="server" Text="Price" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="PriceTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)" AutoPostBack="true" OnTextChanged="PriceTextBox_TextChanged"></asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="TotalAmountLabel" runat="server" Text="Total Amount" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="TotalAmountTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)"></asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="LastReadingLabel" runat="server" Text="Last Reading" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="LastReadingTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" onchange="getAverage(this);"> </asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="CurrentReadingLabel" runat="server" Text="Current Reading" SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="CurrentReadingTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" onchange="getAverage(this);"> </asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="AverageLabel" runat="server" Text="Average"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="AverageTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" runat="server" Enabled="false"> </asp:TextBox>
                                                        </div>
                                                    </div>

                                                    <br />
                                                </div>
                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                        <cc1:TabPanel Width="100%" ID="BulkEntryTabPanel" runat="server" HeaderText="Bulk Entry">
                                            <HeaderTemplate>

                                                <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                    <li class="fancyTab">
                                                        <a href="#"><i class="fas fa-gas-pump"></i>Bulk Entry
                                                        </a>

                                                    </li>
                                                </ul>
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="BulkVehicalLabel1" Text="Vehicle" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <asp:DropDownList ID="BulkVehicleDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                            onmouseenter="showHideTooltip()" SkinID="CustomWidthDropDownList" CssClass="form-control"
                                                            AutoPostBack="true" OnSelectedIndexChanged="BulkVehicleDropDownList_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                        <%--<asp:HiddenField ID="HiddenField1" runat="server" />
                                                <asp:HiddenField ID="HiddenField2" runat="server" />--%>
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="BulkLogDateLabel" runat="server" Text="Log Date" Visible="True" SkinID="MandatoryLabel"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <Date:DatePickerControl DisplayDatePicker="true" ID="BulkLogDateDatePickerControl" runat="server" />
                                                    </div>
                                                </div>
                                                    <div id="PnlBluckEntry" runat="server" visible="true">

                                                        <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle">
                                                                <div class="pull-right col display-flex ">
                                                                    <asp:DropDownList ID="AddGridDropDownList1" runat="server" SkinID="CustomWidthDropDownList"
                                                                        CssClass="form-control">
                                                                        <asp:ListItem Text="1" Value="0" Selected="True"></asp:ListItem>
                                                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                                    </asp:DropDownList>&nbsp;&nbsp;
                                                                           <asp:Button ID="AddButton" runat="server" SkinID="0" CssClass="btn btn-add fas" OnClick="AddButton_Click"
                                                                               Text=" Add" />
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div id="Div2" class="himssuHeader6WireBox pTop5  col-md-12" runat="server">
                                                            <div class="himsBoxContent table-responsive">
                                                                <asp:GridView ID="FuleLogFormGridView" runat="server" AutoGenerateColumns="False"
                                                                    EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered table-hover"
                                                                    DataKeyNames="Id">
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Fule Added">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="FuleAddedTextBox" MaxLength="500" runat="server" SkinID="CustomWidthTextBox" Text='<%# Bind("FuleAdded") %>' onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)" />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="12%" Wrap="True" />
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Price">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="PriceTextBox" MaxLength="500" runat="server" AutoPostBack="true" OnTextChanged="BulkPriceTextBox_TextChanged" SkinID="CustomWidthTextBox" Text='<%# Bind("Price") %>' onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)"/>
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="18%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Total Amount">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="TotalAmountTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)" Text='<%# Bind("TotalAmount") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Last Reading">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="LastReadingTextBox" onmouseleave="showHideTooltip()" MaxLength="10" onmouseenter="showHideTooltip()" SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" Text='<%# Bind("LastReading") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Current Reading">
                                                                            <ItemTemplate>
                                                                                <asp:TextBox ID="CurrentReadingTextBox" onmouseleave="showHideTooltip()" MaxLength="10" onmouseenter="showHideTooltip()" SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" Text='<%# Bind("CurrentReading") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Delete">
                                                                            <ItemTemplate>
                                                                                <asp:ImageButton SkinID="DeleteImage" ID="DeleteImageButton1" runat="server" CommandName="Select" OnClick="DeleteImageButton1_Click"
                                                                                    ToolTip="Delete" ImageUrl="../../../Images/icons/icon_delete.gif" />
                                                                                <%--<asp:ImageButton ID="DeleteImageButton1" runat="server" CommandArgument='<%# Eval("Id") %>'   ImageUrl="../../../Images/icons/icon_delete.gif" />--%>
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                    <PagerSettings Visible="False" />
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>

                                                
                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                        <cc1:TabPanel Width="100%" ID="ImportTabPanel" runat="server" HeaderText="Import Entry">
                                            <HeaderTemplate>

                                                <ul class="nav nav-tabs tabs-style-iconboxinner ajaxnavtabs">
                                                    <li class="fancyTab">
                                                        <a href="#"><i class="fas fa-gas-pump"></i>Import Entry
                                                        </a>

                                                    </li>
                                                </ul>
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <div class="col-md-12" style="padding-left: 10px">
                                                        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="pointer" NavigateUrl="~/ContentTemplates/Import/FuelLog.xls"><i class="fas fa-angle-double-right"></i>  Fuel Log Template</asp:HyperLink>
                                                    </div>
                                                <div class="alignCenter pTop5">
                                                    <a href="javascript:;" onclick="OpenFileUpload();" class="btn btn-browser">
                                                        <i class="fas fa-upload"></i>Browse</a>
                                                    <asp:FileUpload ID="flUpload" runat="server" onChange="readURL(this);" ClientIDMode="Static" Style="display: none;" />

                                                    <asp:Button ID="ImportFromExcelButton" runat="server" Text="&#xf019; Import From Excel"
                                                        SkinID="0" CssClass="fas btn btn-examcommon" OnClick="ImportFromExcelButton_Click" />
                                                </div>
                                                <asp:Label ID="Label1" runat="server" Text="" Style="padding-left: 10px; font-size: medium;"></asp:Label>
                                                <div class="cBoth">
                                                </div>

                                                <div id="Div4" class="himssuHeader6WireBox pTop5  col-md-12" runat="server">
                                                            <div class="himsBoxContent table-responsive">
                                                                <asp:GridView ID="FuleImportGridView" runat="server" AutoGenerateColumns="False"
                                                                    EmptyDataText="No Records Found !!" CssClass="table table-striped table-bordered table-hover"
                                                                    DataKeyNames="VehicleId">
                                                                    <Columns>
                                                                         <asp:TemplateField HeaderText="Vehicle">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="VehicleTextBox" MaxLength="10" runat="server" SkinID="CustomWidthTextBox" Text='<%# Bind("VehicleName") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="12%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                         <asp:TemplateField HeaderText="Log Date">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="LogDateTextBox" MaxLength="500" runat="server" SkinID="CustomWidthTextBox" Text='<%# Bind("LogDate") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="12%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Fule Added">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="FuleAddedTextBox" MaxLength="500" runat="server" SkinID="CustomWidthTextBox" Text='<%# Bind("FuelAdded") %>' onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)" />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="12%" Wrap="True" />
                                                                        </asp:TemplateField>

                                                                        <asp:TemplateField HeaderText="Price">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="PriceTextBox" MaxLength="10" runat="server" AutoPostBack="true" OnTextChanged="BulkPriceTextBox_TextChanged" SkinID="CustomWidthTextBox" Text='<%# Bind("Price") %>' onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                onKeypress="javascript:return MaskDecimal(event,10,2)"/>
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="18%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Total Amount">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="TotalAmountTextBox" runat="server" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)" Text='<%# Bind("TotalAmount") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Last Reading">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="LastReadingTextBox" onmouseleave="showHideTooltip()" MaxLength="10" onmouseenter="showHideTooltip()" SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" Text='<%# Bind("LastReading") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Current Reading">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="CurrentReadingTextBox" onmouseleave="showHideTooltip()" MaxLength="10" onmouseenter="showHideTooltip()" SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)" Text='<%# Bind("CurrentReading") %>' />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Left" />
                                                                            <ItemStyle Width="10%" Wrap="True" />
                                                                        </asp:TemplateField>
                                                                        <%--<asp:TemplateField HeaderText="Delete">
                                                                            <ItemTemplate>
                                                                                <asp:ImageButton SkinID="DeleteImage" ID="DeleteImageButton2" runat="server" CommandName="Select" OnClick="DeleteImageButton2_Click"
                                                                                    ToolTip="Delete" ImageUrl="../../../Images/icons/icon_delete.gif" />
                                                                                <%--<asp:ImageButton ID="DeleteImageButton1" runat="server" CommandArgument='<%# Eval("Id") %>'   ImageUrl="../../../Images/icons/icon_delete.gif" />
                                                                            </ItemTemplate>
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                        </asp:TemplateField>--%>
                                                                    </Columns>
                                                                    <PagerSettings Visible="False" />
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                    </cc1:TabContainer>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/fuel-logs-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/fuel-logs")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function getAverage() {
            if (document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_FuelAddedTextBox') !== null && document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_FuelAddedTextBox') !== undefined
               && document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_CurrentReadingTextBox') !== null && document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_CurrentReadingTextBox') !== undefined
               && document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_LastReadingTextBox') !== null && document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_LastReadingTextBox') !== undefined) {
                var Fl = document.getElementById("ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_FuelAddedTextBox").value;
                var Cr = document.getElementById("ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_CurrentReadingTextBox").value;
                var Lr = document.getElementById('ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_LastReadingTextBox').value;
                if (Fl != '' && Cr != '' && Lr != '') {
                    var average = (Cr - Lr) / Fl;
                    average = average.toFixed(2);
                    document.getElementById("ctl00_CP_FuleLogTabContainer_SingleEntryTabPanel_AverageTextBox").value = average;
                }
            }
        }
    </script>
</asp:Content>
