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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ 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="OTQueueListingUpdatePanel" runat="server">
        <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-cog"></i>
                                                    <asp:Label ID="Label3" runat="server" Text="Maintenance"></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="DetailPanel1" runat="Server">
                                            <div class="contentHolder">
                                                
                                                <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="SearchFromMaintenanceDateLabel" runat="server" Text="From Maintenance Date" Visible="True"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <Date:DatePickerControl DisplayDatePicker="true" ID="SearchFromMaintenanceDatePickerControl" Visible="True" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="outerBox pTop5 col-md-3">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="SearchToMaintenanceDateLabel" runat="server" Text="To Maintenance Date" Visible="True"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <Date:DatePickerControl DisplayDatePicker="true" ID="SearchToMaintenanceDatePickerControl" Visible="True" runat="server" />
                                                    </div>
                                                </div>
                                             
                                                <div class="alignCenter pTop5 col-md-12">
                                                    <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"/>
                                                </div>
                                               
                                                <div id="Div2" class="himssuHeader7WireBox col-md-12" runat="server">
                                                    <div id="VehicleMaintenanceListDetailDiv" runat="server" visible="false">
                                                        
                                                        <div class="himsBoxHeader" id="VehicleMaintenanceListDiv" visible="false" runat="server">
                                                            <div class="leftdiv">
                                                            </div>
                                                            <div class="himsBoxTitle" style="width: 99%">                                                                
                                                                <div align="right" class="fRight" style="margin-top: 0px;">
                                                                    <uc1:GridViewPager ID="VehicleMaintenanceGridViewPager" runat="server" ParentGridView="VehicleMaintenanceGridView"
                                                                        OnFirstRecordClick="VehicleMaintenanceGridViewPager_FirstRecordClick" OnLastRecordClick="VehicleMaintenanceGridViewPager_LastRecordClick"
                                                                        OnNextRecordClick="VehicleMaintenanceGridViewPager_NextRecordClick" OnPrevRecordClick="VehicleMaintenanceGridViewPager_PrevRecordClick"
                                                                        OnTextBoxValueChange="VehicleMaintenanceGridViewPager_TextBoxValueChange" />
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="himsBoxHeader card-head inner" id="Div3" runat="server" style="display:none">
                                                               <%-- <div class="gridHeaderText">
                                                                 <header>
                                                                      <asp:Label ID="Label6" runat="server" Text="Vehicle Maintenance"></asp:Label>
                                                                 </header>
                                                                </div>--%>
                                                             </div>

                                                        <div class="himsBoxContent card-body">
                                                            <div id="Div5" runat="server" visible="false" class="table-responsive">
                                                                <asp:GridView ID="VehicleMaintenanceGridView" runat="server" AutoGenerateColumns="False"
                                                                    AllowPaging="true" PageSize="10" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                                    CssClass="table table-striped table-bordered table-bordered table-hover" DataKeyNames="VehicleMaintenanceId" OnRowDataBound="VehicleMaintenanceGridView_RowDataBound"
                                                                    OnPageIndexChanging="VehicleMaintenanceGridView_PageIndexChanging">
                                                                    <Columns>
                                                                        <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                            HeaderText="">
                                                                            <ItemTemplate>
                                                                                <asp:LinkButton ID="SelectLinkButton" runat="server" CommandName="Select" Text="Select"
                                                                                    CausesValidation="false" OnClick="SelectLinkButton_Click"></asp:LinkButton>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="VehicleName" HeaderText="Vehicle" ItemStyle-Width="20%" />
                                                                        <asp:TemplateField HeaderText="Maintenance Date" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="true">
                                                                            <ItemTemplate>
                                                                                <asp:Label ID="MaintenanceDate" runat="server" Text='<%# Bind("MaintenanceDate", "{0:dd/MM/yyyy}") %>'></asp:Label>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="KmReading" HeaderText="KM Reading" ItemStyle-Width="10%" />
                                                                        <asp:BoundField DataField="VMRemark" HeaderText="Remark" ItemStyle-Width="50%" />
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                                <div class="himssuHeader1WireBox" id="DetailDiv" runat="server" visible="false">
                                    <div class="himssuHeader1WireBox card card-box ">
                                        <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="VehicleMaintenanceLabel" runat="server" Text="Vehicle 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">
                                            <asp:Panel ID="DetailPanel" runat="Server">
                                                <div class="contentHolder">
                                                    <div class="outerBox pTop5 col-md-3" style="margin-bottom: 15PX">
                                                        <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">
                                                            </asp:DropDownList>
                                                            <asp:HiddenField ID="DetailHiddenField" runat="server" />
                                                        </div>
                                                    </div>
                                                 
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="MaintenanceDateLabel" runat="server" Text="Maintenance Date" Visible="True"
                                                                SkinID="MandatoryLabel"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <Date:DatePickerControl DisplayDatePicker="true" ID="MaintenanceDatePickerControl" Visible="True"
                                                                runat="server" />
                                                        </div>
                                                    </div>
                                                  
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="KmReadingLabel" runat="server" Text="KM Reading"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="KmReadingTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                SkinID="CustomWidthTextBox" runat="server" onkeypress="return isNumberKey(event)"> </asp:TextBox>
                                                        </div>
                                                    </div>
                                                   
                                                    <div class="outerBox pTop5 col-md-3">
                                                        <div class="controlLabelWidth">
                                                            <asp:Label ID="RemarkLabel" Text="Remark" runat="server"></asp:Label>
                                                        </div>
                                                        <div class="fLeft pRight5">
                                                            <asp:TextBox ID="RemarkTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="MultiLineTextBox"
                                                                 onmouseenter="showHideTooltip()" MaxLength="200" TextMode="MultiLine"
                                                                Height="40PX"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                  
                                                    <div id="Div1" class="himssuHeader6WireBox box-body box-solid gridviewfont" runat="server" visible="true">
                                                        <div class="himsBoxHeader" id="GridViewPagerDiv" runat="server" visible="True">
                                                            <div class="leftdiv">
                                                            </div>

                                                            <div class="himsBoxHeader card-head inner" id="Div4" runat="server">
                                                                <div class="gridHeaderText">
                                                                 <header>
                                                                      <asp:Label ID="Label1" runat="server" Text="Vehicle Maintenance Detail"></asp:Label>
                                                                 </header>
                                                                </div>
                                                             </div>
                                                            
                                                        </div>
                                                        <div class="himsBoxContent card-body">
                                                            <asp:GridView ID="VehicleMaintenanceDetailGridView" runat="server" class="himssuHeader7WireBox col-md-12 table-responsive"
                                                                AutoGenerateColumns="False" EmptyDataText="No Records Found !!" AllowPaging="false"
                                                                CssClass="table table-striped table-bordered table-hover" ShowHeader="True" DataKeyNames="ExpenseTypeId">
                                                                <Columns>
                                                                    <asp:BoundField DataField="ExpenseTypeName" HeaderText="Expense Type" ItemStyle-Width="30%" />
                                                                    <asp:TemplateField HeaderText="Amount" ItemStyle-Width="20%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="AmountTextBox" runat="server" Width="100%" MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)"
                                                                                onKeypress="javascript:return MaskDecimal(event,10,2)" Text='<%# Bind("Amount") %>'></asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Remark" ItemStyle-Width="50%" ItemStyle-Wrap="true"
                                                                        HeaderStyle-HorizontalAlign="Left">
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="GridViewRemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                                SkinID="MultiLineTextBox" TextMode="MultiLine" Height="40px" runat="server"
                                                                                MaxLength="200" Text='<%# Bind("VMDRemark") %>'> </asp:TextBox>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <PagerSettings Visible="False" />
                                                            </asp:GridView>                                                     
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </div>
                                </div>
                               
                            </div>
                        </tr>
                    </table>                   
                </div>
            </div>
           
        </ContentTemplate>
    </asp:UpdatePanel>   
    <%--<script data-main="../../JavaScript/rjs/encrypt/Vehicle-Maintenance-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/Vehicle-Maintenance")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>