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

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

<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>--%>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>
<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head runat="server">
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <title>tSense-IoT Vehicle Cost Assignment</title>
    <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="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="updatedcss" runat="server" href="../css/Updated_css.css" rel="stylesheet"
        type="text/css" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <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" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

    <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 src="../js/myformvalidations.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript" src="../js/ReportScripts.js"></script>
    <%--********* 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 class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
            </asp:ScriptManager>
            <uc1:Header ID="ucHeader" runat="server" />
            <div id="outer">
                <div id="inner">
                    <div id="float-wrap">
                        <div id="content">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnSave" />
                                    <asp:PostBackTrigger ControlID="btnCancel" />
                                    <asp:PostBackTrigger ControlID="btnExport" />
                                    <asp:PostBackTrigger ControlID="btnAssignVehicles" />
                                    <asp:PostBackTrigger ControlID="btnBack" />
                                </Triggers>
                                <ContentTemplate>
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-4 col-md-3 col-lg-3">
                                                <img class="icon" src="../images/ROI_Header.png" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblPreferencesCaption" Text="Cost Assignment" runat="server"></asp:Literal></h1>
                                                <a href="Dashboard.aspx">
                                                    <asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label></a><span>&gt;</span><span><a
                                                        href="ManageVehicleCost.aspx">
                                                        <asp:Label ID="lblPreferenceCaption" Text="Cost Assignment" runat="server"></asp:Label></a>
                                                    </span>
                                            </div>
                                            <div class="col-sm-8  col-md-9 col-md-9 head-part-btns">
                                                <div class="pull-right">

                                                    <asp:LinkButton ID="lnkAddVehicleCost" runat="server" CssClass="MultilingualBtn"
                                                        Visible="true" OnClick="lnkAddVehicleCost_Click">
                                                        <span id="Span2" runat="server" class="MultilingualBtnspan">
                                                            <div class="AssignVehicle">
                                                                <div id="Div1" runat="server" class="MultilingualBtnTextAlign">
                                                                    Assign Vehicle Cost
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>

                                                    <asp:LinkButton ID="btnAssignVehicles" runat="server" CssClass="MultilingualBtn"
                                                        PostBackUrl="~/Forms/ManageROI.aspx">
                                                        <span id="Span3" runat="server" class="MultilingualBtnspan">
                                                            <div class="ROICosts">
                                                                <div id="AssignVehiclesDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    ROI Costs
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>

                                                    <asp:HyperLink ID="btnBack1" runat="server" ImageUrl="~/Images/btn-back-to-configuration.jpg"
                                                        NavigateUrl="~/Forms/ConfigurationSetup.aspx" Visible="false"></asp:HyperLink>
                                                    <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/ROI.aspx">
                                                        <span id="Span5" runat="server" class="MultilingualBtnspan">
                                                            <div class="Back">
                                                                <div id="BacktoConfigurationDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Back to ROI
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>

                                                    <div class="ControlHide">
                                                        <asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/Images/btn-back-to-configuration.jpg"
                                                            NavigateUrl="~/Forms/ConfigurationSetup.aspx" Visible="false"></asp:HyperLink>
                                                        <asp:LinkButton ID="lnkback" runat="server" CssClass="MultilingualBtn" OnClick="lnkback_Click">
                                                            <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                                <div class="Back">
                                                                    <div id="Div2" runat="server" class="MultilingualBtnTextAlign">
                                                                        Back
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <div class="form-box">
                                            <asp:Panel ID="pnlROICostDetails" runat="server" Visible="false">
                                                <h1>
                                                    <span class="icon">
                                                        <asp:Image ID="imgUserPreferences" runat="server" ImageUrl="../images/CostVehicleAssignment.png" /></span>
                                                    <asp:Label ID="lblUserPreferences" runat="server" Text="Assign Vehicle Cost"></asp:Label>
                                                </h1>
                                                <div class="form-tbl col-sm-12 nullpadding">
                                                    <div class="form-horizontal">
                                                        <div class="col-sm-6">
                                                            <div id="trTypesOfCost" class="ControlHide">
                                                                <div class="form-group col-sm-12 icon-label">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="lblTypesOfCost" runat="server" Font-Bold="False" Text="Cost Type"
                                                                            CssClass="label"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <dxw:ASPxComboBox ID="ddlCostTypes" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                                            AutoPostBack="false" Width="" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                                            EnableIncrementalFiltering="true" ClientInstanceName="ddlCostTypes" SelectedIndex="0"
                                                                            CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                            EnableTheming="true" Theme="Office2003Blue">
                                                                            <Items>
                                                                                <dxw:ListEditItem Text="Operational Cost" Value="1" />
                                                                                <dxw:ListEditItem Text="Ownership Cost" Value="2" />
                                                                                <dxw:ListEditItem Text="Other Cost" Value="3" />
                                                                            </Items>
                                                                        </dxw:ASPxComboBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div id="trROICosts" class="ControlHide">
                                                                <div class="form-group col-sm-12">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="Label1" runat="server" Font-Bold="False" Text="Cost" CssClass="label"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <dxw:ASPxComboBox ID="ddlROICosts" runat="server" CssClass="form-control" ValueType="System.String" ShowImageInEditBox="false"
                                                                            AutoPostBack="false" Width="" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                                            EnableIncrementalFiltering="true" ClientInstanceName="ddlROICosts" SelectedIndex="0"
                                                                            CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                            EnableTheming="true" Theme="Office2003Blue">
                                                                        </dxw:ASPxComboBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12" style="padding-top: 10px;">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="Label2" runat="server" Font-Bold="False" Text="Fleet" CssClass="label"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlFleet" runat="server" CssClass="form-control" ValueType="System.String" ShowImageInEditBox="false"
                                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlFleet" SelectedIndex="0"
                                                                        AutoPostBack="true" Width="" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                    </dxw:ASPxComboBox>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Label ID="Label3" runat="server" Font-Bold="False" Text="Vehicle" CssClass="label"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlVehicle" CssClass="form-control" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                                        AutoPostBack="false" Width="" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlVehicle" SelectedIndex="0"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                    </dxw:ASPxComboBox>
                                                                </div>
                                                            </div>

                                                            <div id="trEffectiveFrom" class="ControlHide">
                                                                <div class="form-group col-sm-12">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="lblEffectiveFrom" runat="server" Font-Bold="False" Text="Effective From"
                                                                            CssClass="label"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <asp:TextBox ID="txtEffectiveFrom" runat="server" MaxLength="25" Width=""></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div id="trEffectiveTo" class="ControlHide">
                                                                <div class="form-group col-sm-12">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="lblEffectiveTo" runat="server" Font-Bold="False" Text="Effective To"
                                                                            CssClass="label"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <asp:TextBox ID="txtEffectiveTo" runat="server" MaxLength="25" Width=""></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div id="trCostName" class="ControlHide">
                                                                <div class="form-group col-sm-12">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="lblCostNameCaption" runat="server" Font-Bold="False" Text="Cost Name"
                                                                            CssClass="label"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <asp:TextBox ID="txtCostName" runat="server" MaxLength="25" Width=""></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div id="trCostDesc" runat="server" class="ControlHide">
                                                                <div class="form-group col-sm-12">
                                                                    <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                        <asp:Label ID="lblCostDesc" runat="server" Text="Cost Description"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                        <asp:TextBox ID="txtCostDesc" runat="server" TextMode="MultiLine" Width=""></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                                <cc1:TabContainer ID="tcMaintenancePlan" runat="server" class="form-box">
                                                    <cc1:TabPanel ID="tpOperationalCost" runat="server" HeaderText="Operational Cost Details">
                                                        <HeaderTemplate>
                                                            Operational Cost Details
                                                        </HeaderTemplate>
                                                        <ContentTemplate>
                                                            <div id="grid-dsply">
                                                                <div id="top">
                                                                    <div class="left-col">
                                                                        <span class="icon" style="padding-top: 5px">
                                                                            <%-- <img src="../images/icn-vehicle-assignment.gif" alt="" />--%></span>
                                                                        <%--<span class="txt">
                                                                                                       Service Details</span>--%>
                                                                    </div>
                                                                </div>
                                                                <div class="clearfix"></div>
                                                                <div class="table-responsive">
                                                                    <dxw:ASPxGridView ID="gvOperationalCost" runat="server" Width="100%" KeyFieldName="CostId"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                        ClientInstanceName="gvServiceDetails" SettingsPager-Mode="ShowPager"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                        <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                </Images>--%>
                                                                        <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                            CssPostfix="Office2003_Blue">
                                                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                            </Header>
                                                                            <LoadingPanel ImageSpacing="10px">
                                                                            </LoadingPanel>
                                                                            <PagerBottomPanel CssClass="PageFooter">
                                                                            </PagerBottomPanel>
                                                                            <PagerTopPanel CssClass="PageFooter">
                                                                            </PagerTopPanel>
                                                                        </Styles>
                                                                        <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                            PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                            NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                            NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                            PageSize="5">
                                                                        </SettingsPager>
                                                                        <Columns>
                                                                            <dxw:GridViewDataColumn FieldName="CostId" Caption="AutoID" VisibleIndex="0" Visible="false">
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataTextColumn VisibleIndex="1" Width="5%" Caption="Services">
                                                                                <HeaderCaptionTemplate>
                                                                                    <asp:CheckBox ID="chkSelectAllServices" ToolTip="Select all in the current page"
                                                                                        runat="server" onclick="DevExpressGridCheckAll(1);" Text="" />
                                                                                </HeaderCaptionTemplate>
                                                                                <DataItemTemplate>
                                                                                    <asp:CheckBox ID="chkServices" runat="server" Text="" onclick="CheckListOfServiceIDs(this, 'hdnSelectedCostIds',1);" />
                                                                                    <asp:HiddenField ID="hdnServiceId" runat="server" Value='<%# Eval("CostId") %>' />
                                                                                </DataItemTemplate>
                                                                                <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                <CellStyle HorizontalAlign="Center">
                                                                                </CellStyle>
                                                                            </dxw:GridViewDataTextColumn>
                                                                            <dxw:GridViewDataColumn FieldName="CostName" Caption="Cost Name" VisibleIndex="2"
                                                                                Width="25%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn FieldName="Description" Caption="Cost Description" VisibleIndex="3"
                                                                                Width="50%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn Caption="Planned Cost" VisibleIndex="4" Width="10%">
                                                                                <DataItemTemplate>
                                                                                    <asp:TextBox ID="gtxtPlannedCost" runat="server" MaxLength="10" Width="80px" oncopy="return false"
                                                                                        Text='<%# Eval("PlannedCost") %>' ondrop="return false" onpaste="return false"
                                                                                        Style="text-align: right;" onkeypress="return chkDecNums(event, this);" />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                            </dxw:GridViewDataColumn>
                                                                        </Columns>
                                                                        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                        <SettingsText EmptyDataRow=" No costs found" />
                                                                    </dxw:ASPxGridView>
                                                                </div>
                                                            </div>
                                                            <div class="form-tbl">
                                                                <tr>
                                                                    <td>
                                                                        <div class="fleetContent">
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="split">&nbsp;
                                                                    </td>
                                                                    <td colspan="2"></td>
                                                                </tr>
                                                            </div>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel ID="tpOwnershipCost" runat="server" HeaderText="Ownership Cost Details">
                                                        <ContentTemplate>
                                                            <div id="grid-dsply">
                                                                <div id="top">
                                                                    <div class="left-col">
                                                                        <span class="icon" style="padding-top: 5px">
                                                                            <%-- <img src="../images/icn-vehicle-assignment.gif" alt="" />--%></span>
                                                                        <%--<span class="txt">
                                                                                                       Service Details</span>--%>
                                                                    </div>
                                                                </div>
                                                                <div class="clearfix"></div>
                                                                <div class="table-responsive">
                                                                    <dxw:ASPxGridView ID="gvOwnership" runat="server" Width="100%" KeyFieldName="CostId"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                        ClientInstanceName="gvServiceDetails" SettingsPager-Mode="ShowPager"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                        <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                </Images>--%>
                                                                        <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                            CssPostfix="Office2003_Blue">
                                                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                            </Header>
                                                                            <LoadingPanel ImageSpacing="10px">
                                                                            </LoadingPanel>
                                                                            <PagerBottomPanel CssClass="PageFooter">
                                                                            </PagerBottomPanel>
                                                                            <PagerTopPanel CssClass="PageFooter">
                                                                            </PagerTopPanel>
                                                                        </Styles>
                                                                        <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                            PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                            NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                            NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                            PageSize="5">
                                                                        </SettingsPager>
                                                                        <Columns>
                                                                            <dxw:GridViewDataColumn FieldName="CostId" Caption="AutoID" VisibleIndex="0" Visible="false">
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataTextColumn VisibleIndex="1" Width="5%" Caption="Services">
                                                                                <HeaderCaptionTemplate>
                                                                                    <asp:CheckBox ID="chkSelectAllServices" ToolTip="Select all in the current page"
                                                                                        runat="server" onclick="DevExpressGridCheckAll(2);" Text="" />
                                                                                </HeaderCaptionTemplate>
                                                                                <DataItemTemplate>
                                                                                    <asp:CheckBox ID="chkServices" runat="server" Text="" onclick="CheckListOfServiceIDs(this, 'hdnSelectedCostIds',1);" />
                                                                                    <asp:HiddenField ID="hdnServiceId" runat="server" Value='<%# Eval("CostId") %>' />
                                                                                </DataItemTemplate>
                                                                                <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                <CellStyle HorizontalAlign="Center">
                                                                                </CellStyle>
                                                                            </dxw:GridViewDataTextColumn>
                                                                            <dxw:GridViewDataColumn FieldName="CostName" Caption="Cost Name" VisibleIndex="2"
                                                                                Width="25%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn FieldName="Description" Caption="Cost Description" VisibleIndex="3"
                                                                                Width="50%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn Caption="Planned Cost" VisibleIndex="4" Width="10%">
                                                                                <DataItemTemplate>
                                                                                    <asp:TextBox ID="gtxtPlannedCost" runat="server" MaxLength="10" Width="80px" oncopy="return false"
                                                                                        Text='<%# Eval("PlannedCost") %>' ondrop="return false" onpaste="return false"
                                                                                        Style="text-align: right;" onkeypress="return chkDecNums(event, this);" />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn Caption="Planned Cost" VisibleIndex="5" Width="10%" Visible="false">
                                                                                <DataItemTemplate>
                                                                                    <asp:Label ID="glblPlannedCost" runat="server" Width="80px" Style="text-align: right;"
                                                                                        Text='<%# Eval("PlannedCost") %>' />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                            </dxw:GridViewDataColumn>
                                                                        </Columns>
                                                                        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                        <SettingsText EmptyDataRow=" No costs found" />
                                                                    </dxw:ASPxGridView>
                                                                </div>
                                                            </div>
                                                            <div class="form-tbl">
                                                                <tr>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right"></td>
                                                                </tr>
                                                            </div>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel ID="tpOtherCost" runat="server" HeaderText="Other Cost Details">
                                                        <ContentTemplate>
                                                            <div id="grid-dsply">
                                                                <div id="top">
                                                                    <div class="left-col">
                                                                        <span class="icon" style="padding-top: 5px">
                                                                            <%-- <img src="../images/icn-vehicle-assignment.gif" alt="" />--%></span>
                                                                        <%--<span class="txt">
                                                                                                       Service Details</span>--%>
                                                                    </div>
                                                                </div>
                                                                <div class="clearfix"></div>
                                                                <div class="table-responsive">
                                                                    <dxw:ASPxGridView ID="gvOtherCosts" runat="server" Width="100%" ClientInstanceName="gvOtherCosts"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                        SettingsPager-Mode="ShowPager" EnableTheming="true" Theme="Office2003Blue">
                                                                        <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(); }" />
                                                                        <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                </Images>--%>
                                                                        <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                            CssPostfix="Office2003_Blue">
                                                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                            </Header>
                                                                            <LoadingPanel ImageSpacing="10px">
                                                                            </LoadingPanel>
                                                                            <PagerBottomPanel CssClass="PageFooter">
                                                                            </PagerBottomPanel>
                                                                            <PagerTopPanel CssClass="PageFooter">
                                                                            </PagerTopPanel>
                                                                        </Styles>
                                                                        <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                            PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                            NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                            NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                            PageSize="5">
                                                                        </SettingsPager>
                                                                        <Columns>
                                                                            <dxw:GridViewDataColumn FieldName="CostId" Caption="AutoID" VisibleIndex="0" Visible="false">
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataTextColumn VisibleIndex="1" Width="5%" Caption="Services">
                                                                                <HeaderCaptionTemplate>
                                                                                    <asp:CheckBox ID="chkSelectAllServices" ToolTip="Select all in the current page"
                                                                                        runat="server" onclick="DevExpressGridCheckAll(3);" Text="" />
                                                                                </HeaderCaptionTemplate>
                                                                                <DataItemTemplate>
                                                                                    <asp:CheckBox ID="chkServices" runat="server" Text="" onclick="CheckListOfServiceIDs(this, 'hdnSelectedCostIds',1);" />
                                                                                    <asp:HiddenField ID="hdnServiceId" runat="server" Value='<%# Eval("CostId") %>' />
                                                                                </DataItemTemplate>
                                                                                <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                <CellStyle HorizontalAlign="Center">
                                                                                </CellStyle>
                                                                            </dxw:GridViewDataTextColumn>
                                                                            <dxw:GridViewDataColumn FieldName="CostName" Caption="Cost Name" VisibleIndex="2"
                                                                                Width="25%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn FieldName="Description" Caption="Cost Description" VisibleIndex="3"
                                                                                Width="50%">
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn Caption="Planned Cost" VisibleIndex="4" Width="10%">
                                                                                <DataItemTemplate>
                                                                                    <asp:TextBox ID="gtxtPlannedCost" runat="server" MaxLength="10" Width="80px" oncopy="return false"
                                                                                        Text='<%# Eval("PlannedCost") %>' ondrop="return false" onpaste="return false"
                                                                                        Style="text-align: right;" onkeypress="return chkDecNums(event, this);" />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                            </dxw:GridViewDataColumn>
                                                                            <dxw:GridViewDataColumn Caption="Planned Cost" VisibleIndex="5" Width="10%" Visible="false">
                                                                                <DataItemTemplate>
                                                                                    <asp:Label ID="glblPlannedCost" runat="server" Width="80px" Style="text-align: right;" />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="False" AllowSort="False" />
                                                                            </dxw:GridViewDataColumn>
                                                                        </Columns>
                                                                        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                        <SettingsText EmptyDataRow=" No costs found" />
                                                                    </dxw:ASPxGridView>
                                                                </div>
                                                            </div>
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                </cc1:TabContainer>
                                                <div class="form-tbl col-sm-12 nullpadding">
                                                    <div class="form-horizontal">
                                                        <div class="col-sm-6">
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-6 col-lg-3 nullpadding">
                                                                    <asp:ImageButton ImageUrl="~/images/btn-save.jpg" ID="btnSave1" runat="server" OnClick="btnSave_Click"
                                                                        TabIndex="5" Visible="false" />
                                                                    <asp:LinkButton ID="btnSave" runat="server" CssClass="MultilingualBtn" OnClick="btnSave_Click"
                                                                        OnClientClick="return SelectedVehicleCost();">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="Save">
                                                                                <div id="SaveButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Save
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                    &nbsp;
                                                        <asp:ImageButton ImageUrl="~/images/btn-cancel.jpg" ID="btnCancel1" runat="server"
                                                            OnClick="btnCancel_Click" TabIndex="6" Visible="false" />
                                                                    <asp:LinkButton ID="btnCancel" runat="server" CssClass="MultilingualBtn" OnClick="btnCancel_Click">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="Cancel">
                                                                                <div id="CancelButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Cancel
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </div>
                                    <asp:Panel ID="pnlROICosts" runat="server">
                                        <%--VehicleCostAssignment--%>
                                        <div class="ControlHide">
                                            <h1>
                                                <span class="icon">
                                                    <img src="../images/icnVehicleMaintenanceList.png" alt="" /></span>
                                                <asp:Label ID="lblHeading" runat="server" Text="Vehicle Cost Assignment"></asp:Label>
                                            </h1>
                                            <div class="form-tbl col-sm-12 nullpadding">
                                                <div class="form-horizontal">
                                                    <div class="col-sm-6">
                                                        <div id="trSearch" runat="server">

                                                            <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="Fleet"></asp:Label>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Image ID="imgMainPlanType" ImageUrl="../images/vehicle-icon.gif" AlternateText=""
                                                                        runat="server" />
                                                                    <asp:Label ID="lblRecurringServicee" runat="server" Text="Vehicle"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlVehicle1" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                                        AutoPostBack="false" Width="" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlVehicle" SelectedIndex="0"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                    </dxw:ASPxComboBox>
                                                                </div>
                                                            </div>
                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Image ID="Image1" ImageUrl="../images/ROICost.png" AlternateText="" runat="server" />

                                                                    <asp:Label ID="Label4" runat="server" CssClass="label" Text="Cost type"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <dxw:ASPxComboBox ID="ddlCosttype" runat="server" ValueType="System.String" ShowImageInEditBox="false" SelectedIndex="0"
                                                                        AutoPostBack="true" EnableIncrementalFiltering="true" AutoResizeWithContainer="true" Width="" Height="20px" TabIndex="3"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue" OnSelectedIndexChanged="ddlCosttype_SelectedIndexChanged1">
                                                                        <Items>
                                                                            <dxw:ListEditItem Text="All" Value="0" />
                                                                            <dxw:ListEditItem Text="Operational cost" Value="1" />
                                                                            <dxw:ListEditItem Text="Ownership cost" Value="2" />
                                                                            <dxw:ListEditItem Text="Other cost" Value="3" />
                                                                        </Items>
                                                                    </dxw:ASPxComboBox>
                                                                </div>
                                                            </div>

                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:Image ID="Image2" ImageUrl="../images/CostName.gif" AlternateText="" runat="server" />

                                                                    <asp:Label ID="Label5" runat="server" CssClass="label" Text="Cost Name"></asp:Label>
                                                                </div>
                                                                <div class="col-sm-6 col-lg-4 col-xs-8 nullpadding">
                                                                    <asp:DropDownList ID="ddlCostname" runat="server">
                                                                        <asp:ListItem Selected="True" Value="0">All</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                            </div>

                                                            <div class="form-group col-sm-12">
                                                                <div class="col-sm-4 col-lg-3 col-xs-4 nullpadding">
                                                                    <asp:ImageButton ID="ibtnSearch" runat="server" ImageUrl="~/images/btn-search.jpg"
                                                                        OnClientClick="return ShowPopUp();" OnClick="ibtnSearch_Click"></asp:ImageButton>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="grid-dsply">
                                            <div id="top">
                                                <div class="left-col" style="padding-top: 2px;">
                                                    <dxw:ASPxComboBox ID="ddlFleet1" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                        AutoPostBack="true" Width="130" Height="20px" TabIndex="3" AutoResizeWithContainer="true"
                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlFleet1" SelectedIndex="0"
                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                        EnableTheming="true" Theme="Office2003Blue" OnSelectedIndexChanged="ddlFleet1_SelectedIndexChanged">
                                                    </dxw:ASPxComboBox>
                                                </div>
                                                <div class="right-col">
                                                    <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"
                                                            CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue">
                                                            <Items>
                                                                <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                            </Items>
                                                        </dxw:ASPxComboBox>
                                                    </span>&nbsp;<span class="txt">
                                                        <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="Span1" 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>
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvROICost" runat="server" Width="100%" KeyFieldName="CostId"
                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                    EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvROICost_OnHtmlRowCreated">
                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="225" />
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>--%>
                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="Office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewDataColumn FieldName="CostId" Caption="Cost ID" VisibleIndex="0" Visible="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="FleetName" Caption="Fleet Name" VisibleIndex="1"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="15%" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgFleetName" runat="server" ImageUrl="../images/fleet-icon.gif" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblFleetName" runat="server" Font-Bold="false" Text="Fleet Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="VehicleDescription" Caption="Vehicle Name"
                                                            VisibleIndex="2" HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="15%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgFleetName" runat="server" ImageUrl="../images/vehicle-icon.gif" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblFleetName" runat="server" Font-Bold="false" Text="Vehicle Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="CostName" Caption="Cost Name" VisibleIndex="2"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="15%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgFleetName" runat="server" ImageUrl="../images/CostName.gif" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblFleetName" runat="server" Font-Bold="false" Text="Cost Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="CostDesc" Caption="Cost Description" VisibleIndex="4"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="15%" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgVehDisc" runat="server" ImageUrl="../images/CostDescription.png" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblFleetName" runat="server" Font-Bold="false" Text="Cost Description"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="CostTypedesc" Caption="Cost Type" VisibleIndex="5"
                                                            HeaderStyle-HorizontalAlign="Center" CellStyle-Wrap="True" Width="20%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgTypeOfCost" runat="server" ImageUrl="../images/ROICost.png" />
                                                                </span><span class="label">&nbsp;<asp:Label ID="lblDescription" runat="server" Font-Bold="false"
                                                                    Text="Cost Type"></asp:Label>
                                                                </span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Cost" Caption="Cost (Rs)" VisibleIndex="6" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-Wrap="True" Width="15%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ID="imgFleetName" runat="server" ImageUrl="../images/cost.gif" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblFleetName" runat="server" Font-Bold="false" Text="Cost (Rs)"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Edit" VisibleIndex="7" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-HorizontalAlign="Center" Width="3%" Name="Edit" Visible="false">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="btnEdit" runat="server" CommandArgument='<%# Eval("CostId") %>'
                                                                    OnClick="btnEdit_click" Style="text-decoration: none;"><img src="../images/icn-edit.gif" alt="View" title="Click here to Edit"/></asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Delete" VisibleIndex="8" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-HorizontalAlign="Center" Width="3%" Name="Delete" Visible="false">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("CostId") %>'
                                                                    OnClientClick="return confirm('Are you sure want to delete?');" AlternateText="Delete"
                                                                    CommandName="Delete" OnClick="btnDelete_click" ToolTip="Click here to Delete"
                                                                    ImageAlign="Middle" CssClass="handButton">
                                                                    <asp:Image ID="imgDeleteOption" runat="server" ImageUrl="~/images/delete-icon.gif" />
                                                                </asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                    <SettingsText EmptyDataRow="No assigned cost details found" />
                                                </dxw:ASPxGridView>
                                            </div>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvROICost"
                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\qc\b\fs28 Vehicle Cost\par
\pard\par
\par
}
">
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                        <div id="left">
                        </div>
                        <asp:HiddenField ID="hdnOperationalCostIds" runat="server" />
                        <asp:HiddenField ID="hdnOwnershipCostIds" runat="server" />
                        <asp:HiddenField ID="hdnOtherCostIds" runat="server" />
                        <asp:HiddenField ID="hdnSelectedCostIds" runat="server" />
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <div id="right">
                    </div>
                    <div class="clear clearfix">
                    </div>
                </div>
                <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="pnlProgress"
                    TargetControlID="Button1">
                </cc1:ModalPopupExtender>
                <asp:Button ID="Button1" Style="display: none;" runat="server" />
                <%-- <asp:UpdateProgress ID="uprDataLoading" runat="server" DynamicLayout="True" AssociatedUpdatePanelID="updVhDetails">
            <ProgressTemplate>--%>
                <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>
            </div>
            <asp:HiddenField ID="hdnPreference" runat="server" />

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

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

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

            <script type="text/javascript">
                function OrgList() {
                    var rbtDefault = document.getElementById('rbtDefault');
                    var rbtAllOrganizations = document.getElementById('rbtAllOrganizations');
                    if (rbtDefault.checked) {
                        document.getElementById('ddlOrganizations').style.display = "block";
                    }
                    if (rbtAllOrganizations.checked) {
                        document.getElementById('ddlOrganizations').style.display = "none";
                    }
                }

            </script>

            <script type="text/javascript">
                var Alert_Confirm = "Are you sure you want to save the settings?";
                var Alert_PreferedChart = "Select minimum one chart as prefered Dashboard chart.";
                var Alert_FromDate = "Please select the From Date.";
                var Alert_ToDate = "Please select the To Date.";

                function Save(Confirm, Prefered, FromDate, ToDate) {
                    Alert_Confirm = Confirm;
                    Alert_PreferedChart = Prefered;
                    Alert_FromDate = FromDate;
                    Alert_ToDate = ToDate;
                }
                function GetSettings() {
                    if (confirm(Alert_Confirm)) {
                        return true;
                    }
                }
                function DevExpressGridCheckAll(type) {
                    var pageIndex = 0;
                    if (type == 1) { // Operation Cost
                        chkSelectAll = 'tcMaintenancePlan_tpOperationalCost_gvOperationalCost_header1_chkSelectAllServices';
                        controlPrefix = 'tcMaintenancePlan_tpOperationalCost_gvOperationalCost_cell'
                        chkSingleControl = '_1_chkServices';
                        hdnIdHolder = '_1_hdnServiceId';
                        //hdnSelectedIDList = 'hdnOperationalCostIds';
                        hdnSelectedIDList = 'hdnSelectedCostIds';
                    }
                    else if (type == 2) { // Ownership Cost
                        chkSelectAll = 'tcMaintenancePlan_tpOwnershipCost_gvOwnership_header1_chkSelectAllServices';
                        controlPrefix = 'tcMaintenancePlan_tpOwnershipCost_gvOwnership_cell'
                        chkSingleControl = '_1_chkServices';
                        hdnIdHolder = '_1_hdnServiceId';
                        //hdnSelectedIDList = 'hdnOwnershipCostIds';
                        hdnSelectedIDList = 'hdnSelectedCostIds';
                    }
                    else if (type == 3) { // Others Cost
                        chkSelectAll = 'tcMaintenancePlan_tpOtherCost_gvOtherCosts_header1_chkSelectAllServices';
                        controlPrefix = 'tcMaintenancePlan_tpOtherCost_gvOtherCosts_cell'
                        chkSingleControl = '_1_chkServices';
                        hdnIdHolder = '_1_hdnServiceId';
                        //hdnSelectedIDList = 'hdnOtherCostIds';
                        hdnSelectedIDList = 'hdnSelectedCostIds';
                    }

                    var elementID = document.getElementById(chkSelectAll);
                    var i = pageIndex;
                    var str = controlPrefix + i + hdnIdHolder;
                    var str1 = controlPrefix + i + chkSingleControl;
                    var hiddenField = document.getElementById(controlPrefix + i + hdnIdHolder);
                    var dataRowCheckBox = document.getElementById(controlPrefix + i + chkSingleControl);
                    while (dataRowCheckBox != null) {
                        dataRowCheckBox.checked = elementID.checked;
                        if (hiddenField != null) {
                            CheckListOfIDs(dataRowCheckBox, hdnSelectedIDList, hiddenField.value);
                        }
                        i++;
                        dataRowCheckBox = document.getElementById(controlPrefix + i + chkSingleControl);
                        hiddenField = document.getElementById(controlPrefix + i + hdnIdHolder);
                    }
                }
                function CheckListOfIDs(checkBoxItem, hiddenfieldname, ID) {
                    var isIE = CheckBrowser();
                    var hiddenField = document.getElementById(hiddenfieldname);
                    var i = 2;
                    var test = hiddenField.value.split(",");
                    if (Array.contains(test, ID)) {
                        if (!checkBoxItem.checked) {
                            Array.remove(test, ID);
                        }
                    }
                    else if (checkBoxItem.parentNode.getAttribute(isIE ? 'className' : 'class') != 'ControlHide') {
                        if (test[test.length - 1] == "") {
                            Array.insert(test, test.length - 1, ID);
                        }
                        else {
                            Array.add(test, ID);
                        }
                    }
                    hiddenField.value = test.join(",");
                }
                // Fleet Maintenance - Check Services
                function CheckListOfServiceIDs(checkBoxItem, hiddenfieldname, type) //selectAllCheckBox, checkbxPrefix, checkbxSufix)
                {
                    // alert('dfdsf');
                    var isIE = CheckBrowser();
                    var hiddenField = document.getElementById(hiddenfieldname);
                    var i = 2;
                    var ID = document.getElementById(checkBoxItem.id.replace("_1_chkServices", "_1_hdnServiceId")).value;
                    var test = hiddenField.value.split(",");
                    if (Array.contains(test, ID)) {
                        if (!checkBoxItem.checked) {
                            Array.remove(test, ID);
                        }
                    }
                    else if (checkBoxItem.parentNode.getAttribute(isIE ? 'className' : 'class') != 'ControlHide') {
                        if (test[test.length - 1] == "") {
                            Array.insert(test, test.length - 1, ID);
                        }
                        else {
                            Array.add(test, ID);
                        }
                    }
                    hiddenField.value = test.join(",");
                }

                function OnGridSelectionChanged() {
                    // alert(ongridselect);
                    gvOtherCosts.GetSelectedFieldValues('ServiceId', OnGridSelectionComplete);
                }

                function OnGridSelectionComplete(values) {
                    var counter = document.getElementById("hdnSelectedServiceIds");
                    counter.value = '';
                    for (var i = 0; i < values.length; i++) {
                        counter.value = counter.value + values[i] + ',';
                    }
                    //alert(counter.value);
                }
            </script>

            <asp:HiddenField runat="server" ID="hdnDateFormat" Value="dd-MMM-yyyy" />
            <asp:HiddenField ID="hdnDayLight" runat="server" />
            <asp:HiddenField ID="hdnLogout" runat="server" />
            <asp:HiddenField ID="hdnMultiLingualmsg" runat="server" />
        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
