<%@ page language="C#" autoeventwireup="true" inherits="Forms_IButtonMaster, App_Web_yrv3p3d4" %>

<%@ 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, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="exp" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>--%>

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

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head id="Head1" 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 KeyMaster</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" />
    <%--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 id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />

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

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

    <script lang="JavaScript1.2" type="text/javascript" src="../js/IButtonScript.js"></script>

    <style type="text/css">
        #container {
            width: 99.8%;
            border: 1px solid #CCC;
            position: static;
            top: 300px;
            right: 5px;
        }

        #col_left {
            float: center;
            width: 99.8%;
            height: 265px;
            margin: 0 0 0 0;
        }

        .style1 {
            height: 5%;
        }
    </style>

    <%--********* 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>
    <%--********* For Bootstrap Implementation *************--%>
    <div class="pageContainer">
        <%--********* End of Bootstrap Implementation *************--%>
        <form id="form1" runat="server" autocomplete="off">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel runat="server" ID="updAPNDetails">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="container-fluid head-part">
                                            <div id="heading" class="col-sm-4 col-md-4">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" Text="Configuration" runat="server"></asp:Literal>
                                                </h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton><span>&gt;</span>
                                                <span><a href="IButtonMaster.aspx">
                                                    <asp:Label ID="lblMngDriver" Text="Key Master" runat="server"></asp:Label></a></span>
                                            </div>
                                            <div id="" class="col-sm-7 col-md-7 pull-right">
                                                <div class="pull-right btn-wrap">

                                                    <asp:ImageButton ID="ibtnBulkUpdate" runat="server" ImageUrl="~/images/import.jpg" OnClientClick="popUpAdvancedSearch(1);HidePopUp();return false;" />

                                                    <asp:ImageButton ID="ibtnBackToConfig" runat="server" CausesValidation="false" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                        PostBackUrl="~/Forms/ConfigurationSetup.aspx" />


                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                        </div>
                                        <%--  <cc1:ModalPopupExtender ID="mpKeyDetailsLoad" runat="server" BackgroundCssClass="modalbackground"
                                            PopupControlID="pnlImportVehicles" TargetControlID="ibtnBulkUpdate" X="280" CancelControlID="ibtnCancel"  RepositionMode="RepositionOnWindowResizeAndScroll">
                                        </cc1:ModalPopupExtender>--%>
                                        <asp:Panel ID="pnlImportVehicles" runat="server" Style="display: none;" CssClass="iButtonPanelImport col-sm-5 col-md-5 col-lg-4">

                                            <div class="popup">
                                                <div class="top">
                                                    <h1>
                                                        <asp:Label ID="lblFile" Text="Bulk Update Key Details" runat="server"></asp:Label></h1>
                                                    <div class="close">
                                                        <asp:ImageButton ID="ibtnClose" OnClientClick="popUpAdvancedSearch(0);HidePopUp();return false;"
                                                            CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                                                    </div>
                                                    <div class="clear clearfix">
                                                    </div>
                                                </div>
                                                <div class="popup-cont">
                                                    <div class="form-box form-landmark NullBorder">
                                                        <div class="row form-group">
                                                            <div class="col-sm-3">
                                                                <asp:Label ID="lblDriverDetails" runat="server" Text="Select File"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-8">
                                                                <asp:FileUpload ID="fuKeys" runat="server" onchange="return validateCSVFileUpload(this);" />
                                                            </div>
                                                        </div>
                                                        <div class="row form-group">
                                                            <div class="col-sm-4">
                                                            </div>
                                                            <div class="col-sm-8">
                                                                <%--  <asp:ImageButton ID="ibtnUpdateKeys" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                    OnClick="ibtnUpdateKeys_Click" />--%>
                                                                <asp:LinkButton ID="ibtnUpdateKeys" runat="server" CssClass="MultilingualBtn"
                                                                    TabIndex="17" OnClick="ibtnUpdateKeys_Click">
                                                                    <span id="Span12" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Update">
                                                                            <div id="UpdateDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Update
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton ID="ibtnCancel" runat="server" CssClass="MultilingualBtn" TabIndex="19">
                                                                    <span id="Span13" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Cancel">
                                                                            <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Cancel
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton ID="lbtnDownloadTemp" runat="server" Text="Download Template" OnClick="Download_Template"></asp:LinkButton>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix">
                                        </div>
                                        <table style="height: 150px; width: 100%" border="0">
                                            <tr>
                                                <td class="style1">
                                                    <asp:Panel ID="pnlIbuttonSettings" runat="server" Width="100%">
                                                        <div class="form-box">
                                                            <h1>
                                                                <span class="icon">
                                                                    <img id="imgManageFleet" src="../images/drive-key.png" runat="server" alt="" /></span>
                                                                <asp:Label ID="lblManageFleet" Text="Key Settings" runat="server"></asp:Label>
                                                            </h1>
                                                            <div class="col-sm-12 form-box">

                                                                <div class="col-sm-8 form-controls">
                                                                    <div class="col-sm-12 form-group">
                                                                        <div class="col-sm-2 col-xs-10 col-lg-1 caption">
                                                                            <asp:Label ID="lblType" Style="white-space: nowrap;" runat="server" Text="Type" CssClass="label"></asp:Label>
                                                                            <asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>
                                                                        </div>
                                                                        <div class="col-sm-4 dropdown">
                                                                            <dxw:ASPxComboBox ID="ASPxType" runat="server" ValueType="System.String" Width="100px" Height="20px" ShowImageInEditBox="false"
                                                                                ClientInstanceName="ASPxType" SelectedIndex="0" EnableTheming="true" Theme="Office2003Blue"
                                                                                CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                Style="display: none" AutoPostBack="true" OnSelectedIndexChanged="ASPxType_SelectedIndexChanged">
                                                                                <Items>
                                                                                    <dxw:ListEditItem Text="IButton" Value="1" />
                                                                                    <dxw:ListEditItem Text="Card Reader" Value="2" />
                                                                                    <dxw:ListEditItem Text="RFID" Value="3" />
                                                                                    <dxw:ListEditItem Text="Finger Print" Value="4" />
                                                                                </Items>
                                                                            </dxw:ASPxComboBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-8 form-controls">
                                                                    <div class="col-sm-12 form-group">
                                                                        <div class="col-sm-2 col-xs-10 col-lg-1 caption">
                                                                            <asp:Label ID="lblIButtonKey" Style="white-space: nowrap;" runat="server" Text="Key"
                                                                                CssClass="label"></asp:Label>
                                                                            <asp:Label ID="Label5" runat="server" ForeColor="Red">*</asp:Label>
                                                                        </div>
                                                                        <div class="col-sm-4">
                                                                            <asp:Label ID="lblTypeofKey" Style="white-space: nowrap;" runat="server" Text="Key"
                                                                                CssClass="label" Visible="false"></asp:Label>
                                                                            <asp:TextBox ID="txtIButtonKey" runat="server" class="form-control" MaxLength="16" TabIndex="5" onkeypress="return chkAlphaNumeric(event)"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-8 form-controls">
                                                                    <div class="col-sm-12 form-group">
                                                                        <div class="col-sm-2 col-xs-10 col-lg-1 caption">
                                                                            <asp:Label ID="lblIButtonName" runat="server" CssClass="label" Text="Name"></asp:Label>
                                                                            <asp:Label ID="Label13" runat="server" ForeColor="Red">*</asp:Label>
                                                                        </div>
                                                                        <div class="col-sm-4">
                                                                            <asp:TextBox ID="txtIButtonname" class="form-control" runat="server" MaxLength="15" TabIndex="8" onkeypress="return chkAlphaNumeric(event)"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-8 form-controls">
                                                                    <div class="col-sm-12 form-group">
                                                                        <div class="col-sm-3 col-xs-10 col-lg-2 caption">
                                                                            <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                    <asp:Label ID="lblIndicatesMandatory" runat="server" Text="Required fields"></asp:Label>
                                                                        </div>
                                                                        <div class="col-sm-4">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-sm-8 form-controls">
                                                                    <div class="col-sm-12 form-group">
                                                                        <div class="col-sm-1 caption">
                                                                        </div>
                                                                        <div class="col-sm-6 col-lg-6">
                                                                            <asp:ImageButton ID="ibtnUpdateIButton" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                                OnClick="ibtnUpdateIButton_Click" TabIndex="13" OnClientClick="return ValidationIButtonEntry();" />
                                                                            <asp:ImageButton ID="ibtnAddIButton" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                                                OnClick="ibtnAddIButton_Click" TabIndex="11" OnClientClick="return ValidationIButtonEntry();" />
                                                                            <asp:ImageButton ID="btnIButtonCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                OnClick="btnIButtonCancel_Click" TabIndex="12" />
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                        </table>

                                        <asp:Panel ID="pnlIButtonDetails" runat="server">
                                            <div id="grid-dsply">
                                                <div id="top">
                                                    <div class="col-xs-12 gridheader">
                                                        <div class="col-sm-12 col-md-9 col-lg-7">
                                                            <span class="icon txt">
                                                                <asp:Image ID="Image1" runat="server" ImageUrl="../images/key-details.png" alt="" />
                                                                <asp:Label ID="lblKeyDetails" runat="server" Font-Bold="true" Text="Key Details"></asp:Label>
                                                            </span><span class="dropdown">
                                                                <dxw:ASPxComboBox ID="ASPxTypeFilter" runat="server" ValueType="System.String" Width="80px" Height="20px" ShowImageInEditBox="false"
                                                                    ClientInstanceName="ASPxType" SelectedIndex="0" EnableTheming="true" Theme="Office2003Blue"
                                                                    CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                    Style="display: none" AutoPostBack="True" OnSelectedIndexChanged="ASPxTypeFilter_SelectedIndexChanged">
                                                                    <Items>
                                                                        <dxw:ListEditItem Text="IButton" Value="1" />
                                                                        <dxw:ListEditItem Text="Card Reader" Value="2" />
                                                                        <dxw:ListEditItem Text="RFID" Value="3" />
                                                                        <dxw:ListEditItem Text="Finger Print" Value="4" />
                                                                    </Items>
                                                                </dxw:ASPxComboBox>
                                                            </span>
                                                        </div>
                                                        <div class="col-sm-12 col-md-3 col-lg-5">
                                                            <div class="pull-right">
                                                                <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" Style="display: none">
                                                                        <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><span class="txt">
                                                                    <asp:LinkButton ID="ibtnExport" runat="server" CssClass="MultilingualBtn" OnClick="ibtnExport_Click">
                                                                        <span id="Span5" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Export">
                                                                                <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Export
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                    <asp:ImageButton ID="ibtnExport1" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                        OnClick="ibtnExport_Click" Visible="false" /></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div style="width: 99%; overflow: auto;">
                                                    <div class="table-responsive">
                                                        <dxw:ASPxGridView ID="gvIButtonDetails" ClientInstanceName="gvIButtonDetails" TabIndex="15"
                                                            runat="server" Width="100%" KeyFieldName="IButtonId" EnableTheming="true" Theme="Office2003Blue"
                                                            CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue">
                                                            <%--<ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(1); }" />
                                                    <SettingsBehavior ProcessSelectionChangedOnServer="false" />--%>
                                                            <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                        <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/GridView/gvCollapsedButton.png"
                                                            Width="11px" />
                                                        <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                            Width="11px" />
                                                        <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                            Width="11px" />
                                                        <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                            Width="11px" />
                                                    </Images>--%>
                                                            <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                                CssPostfix="Office2003_Blue">
                                                                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                                </Header>
                                                                <LoadingPanel ImageSpacing="10px">
                                                                </LoadingPanel>
                                                                <PagerBottomPanel CssClass="PageFooter">
                                                                </PagerBottomPanel>
                                                                <PagerTopPanel CssClass="PageFooter">
                                                                </PagerTopPanel>
                                                            </Styles>
                                                            <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif">
                                                            </SettingsPager>
                                                            <Columns>
                                                                <dxw:GridViewDataColumn Caption="IButtonId" FieldName="IButtonId" CellStyle-Wrap="True"
                                                                    Visible="false" Width="15%" VisibleIndex="1">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <img src="../images/incentive-name.png" alt="" align="top" visible="false" />&nbsp;
                                                                    <asp:Label ID="lbl" runat="server" Text="IButtonId" Visible="false"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataColumn>
                                                                <dxw:GridViewDataColumn FieldName="IButtonKey" Caption="Key" Width="35%" VisibleIndex="2">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image runat="server" ID="imgUserName" ImageUrl="..\Images\drive-key.png" align="top" /></span>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblMakeName" runat="server" Text="Key"></asp:Label>
                                                                        </span>
                                                                    </HeaderCaptionTemplate>
                                                                    <Settings AllowAutoFilter="True" />
                                                                </dxw:GridViewDataColumn>
                                                                <dxw:GridViewDataColumn Caption="Name" FieldName="IButtonKeyName" Width="35%" VisibleIndex="3">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <img src="..\Images\key-name.png" alt="" align="top" /></span> <span class="label">
                                                                                <asp:Label ID="lblMakeName" runat="server" Text="Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                    <Settings AllowAutoFilter="True" />
                                                                </dxw:GridViewDataColumn>
                                                                <dxw:GridViewDataColumn Caption="User" FieldName="Keyuser" Width="35%" VisibleIndex="4">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="lblDriver" runat="server" ImageUrl="..\Images\icn-message-details.gif" /></span>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblMakeName" runat="server" Text="User"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                    <Settings AllowAutoFilter="True" />
                                                                </dxw:GridViewDataColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Edit" Width="30px" Name="Edit" VisibleIndex="5" HeaderStyle-HorizontalAlign="Center"
                                                                    CellStyle-HorizontalAlign="Center">
                                                                    <HeaderTemplate>
                                                                    </HeaderTemplate>
                                                                    <DataItemTemplate>
                                                                        <asp:LinkButton ID="lbnEdit" runat="server" AlternateText="Update" ToolTip="Click here to Update"
                                                                            ImageAlign="Middle" CommandArgument='<%#Eval("IButtonId") %>' OnClick="lbtnEdit_Click"
                                                                            TabIndex="14"><img src="../images/icn-edit.gif" alt="" /></asp:LinkButton>
                                                                    </DataItemTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Delete" Width="30px" Name="Delete" VisibleIndex="6" HeaderStyle-HorizontalAlign="Center"
                                                                    CellStyle-HorizontalAlign="Center">
                                                                    <HeaderTemplate>
                                                                    </HeaderTemplate>
                                                                    <DataItemTemplate>
                                                                        <asp:LinkButton ID="lbnDelete" runat="server" AlternateText="Delete" ToolTip="Click here to Delete"
                                                                            OnClientClick="return confirm('Do you want to really delete?');" ImageAlign="Middle"
                                                                            CommandArgument='<%#Eval("IButtonId") %>' OnClick="lbtnDelete_Click" TabIndex="14"><img src="../images/delete-icon.gif" alt="" /></asp:LinkButton>
                                                                    </DataItemTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                            </Columns>
                                                            <%-- <ClientSideEvents ColumnSorting="function(s, e) {document.getElementById('btnTest').click();}"
                                                        EndCallback="" />--%>
                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="155" />
                                                            <Settings ShowFilterRow="true" />
                                                            <SettingsBehavior AllowSort="true" />
                                                            <SettingsText EmptyDataRow="No Key details found" />
                                                        </dxw:ASPxGridView>
                                                    </div>
                                                </div>
                                                <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvIButtonDetails"
                                                    ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}{\f1\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\qc\ul\b\f0\fs28 Vehicle Plan Assignment\par
\pard\ulnone\f1\par
\par
}
"
                                                    DetailHorizontalOffset="1" DetailVerticalOffset="1" MaxColumnWidth="12000">
                                                    <Styles>
                                                        <Default VerticalAlign="Middle">
                                                        </Default>
                                                        <Header BackColor="#D1D1D1" Font-Bold="True" Font-Names="Arial" Font-Size="10pt"
                                                            ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True">
                                                        </Header>
                                                        <Cell VerticalAlign="Middle">
                                                        </Cell>
                                                    </Styles>
                                                    <PageHeader VerticalAlignment="None">
                                                        <Font Bold="False" Size="10pt"></Font>
                                                    </PageHeader>
                                                    <PageFooter Right="[Page # of Pages #]">
                                                    </PageFooter>
                                                </dxw:ASPxGridViewExporter>
                                            </div>
                                        </asp:Panel>

                                    </div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                        </div>
                        <!-- Main Content Ends Here -->
                        <%--<div id="left">
                        </div>
                        <div class="clear clearfix">
                        </div>--%>
                    </div>
                    <div id="right">
                    </div>
                    <div class="clear clearfix">
                    </div>
                    </div>
                    <%-- </div>--%>
                    <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" />
                    <asp:HiddenField ID="hdnIsAllowance" runat="server" />
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="ibtnExport" />
                    <asp:PostBackTrigger ControlID="lbtnDownloadTemp" />
                    <asp:PostBackTrigger ControlID="ibtnUpdateKeys" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:UpdateProgress ID="uprDataLoading" runat="server" DynamicLayout="True" AssociatedUpdatePanelID="updAPNDetails">
                <ProgressTemplate>
                    <asp:Panel ID="pnlProgress" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                        <center>
                            <br />
                            <img 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>
                </ProgressTemplate>
            </asp:UpdateProgress>

            <script type="text/javascript" language="javascript">

                function validateCSVFileUpload(obj) {
                    var fileName = new String();
                    var fileExtension = new String();
                    var validFileExtensions = "csv";
                    var flag = false;
                    // store the file name into the variable
                    fileName = obj.value;
                    // extract and store the file extension into another variable
                    fileExtension = fileName.substr(fileName.length - 3, 3);
                    // Check over the valid file extensions to compare them with uploaded file
                    if (fileExtension.toLowerCase() == validFileExtensions.toString().toLowerCase()) {
                        flag = true;

                    }
                    // display the alert message box according to the flag value
                    if (flag == false) {
                        alert('"' + fileExtension.toUpperCase() + AlertFileType);
                        var file = document.getElementById("fuKeys");
                        file.select();
                        cmd = file.createTextRange();
                        cmd.execCommand('delete');
                        file.focus();
                        return false;
                    }
                    else {
                        return true;
                    }
                }

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

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

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

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

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