<%@ page language="C#" autoeventwireup="true" inherits="Forms_VehicleInfoCSS, App_Web_cdte31zm" %>

<%@ 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" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <title>tSense-IoT Manage Vehicle</title>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <style type="text/css">
        </style>

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

    <script src="../js/wow.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel runat="server" ID="updVhDetails" UpdateMode="Conditional">
            <ContentTemplate>
                <div id="container">
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content">
                                            <div id="heading">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>Configuration</h1>
                                                <a href="Dashboard.aspx">Home</a><span>&gt;</span><span><a href="ConfigurationSetup.aspx">Vehicle</a></span><span>&gt;</span><span><a
                                                    href="VehicleInfo.aspx">Manage</a></span>
                                            </div>
                                            <div id="control-box">
                                                <table border="0" cellpadding="0" cellspacing="0" id="control-tbl" width="100%">
                                                    <tr>
                                                        <td>
                                                            <div id="control-btn">
                                                                <table>
                                                                    <tr height="20px">
                                                                        <td></td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            <asp:ImageButton ID="lbtnAddVehicle" runat="server" CausesValidation="false" ImageUrl="~/images/btn-add-vehicle.jpg"
                                                                                OnClick="lbtnAddVehicle_Click" />
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                        <td>
                                                                            <asp:ImageButton ID="btnBack" runat="server" CausesValidation="false" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                                                PostBackUrl="~/Forms/ConfigurationSetup.aspx" />
                                                                        </td>
                                                                        <td>&nbsp;&nbsp;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:Panel ID="pnlVehicleInfo" runat="server" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/vehicle-icon.gif" alt="" /></span>Vehicle Information</h1>
                                                <table align="left" cellspacing="5px" border="0" class="form-tbl">
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblVName" runat="server" Text="Vehicle Name" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label2" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtVehName" MaxLength="50" TabIndex="1" onkeypress="chkAlphaNumericWithSpace(event,this,49)"
                                                                runat="server"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblDisplayName" runat="server" Text="Display Name" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDisplayName" MaxLength="20" onkeypress="return chkDescription(event,this,9);"
                                                                TabIndex="2" runat="server"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblVType" runat="server" Text="Vehicle Type" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label17" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlVehType" runat="server" TabIndex="3" Width="130px">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblCapacity" runat="server" Text="Seat Capacity" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtCapacity" MaxLength="2" runat="server" onkeypress="return chkNumeric_WithoutStartingZero(this.value)"
                                                                TabIndex="4"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblInsurancevalidity" runat="server" CssClass="label" Text="Insurance Expires On"></asp:Label>
                                                            <asp:Label ID="Label11" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtInsuranceValidity" runat="server" MaxLength="30" onkeypress="return false"
                                                                onpaste="return false" TabIndex="5"></asp:TextBox>
                                                            <cc1:CalendarExtender ID="ceInsuranceValidity" runat="server" CssClass="cal_Theme1"
                                                                Format="dd/MM/yyyy" TargetControlID="txtInsuranceValidity" OnClientDateSelectionChanged="checkPastDate">
                                                            </cc1:CalendarExtender>
                                                        </td>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblPermit" runat="server" CssClass="label" Text="Permit Expires On"></asp:Label>
                                                            <asp:Label ID="Label13" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtPermitValidity" runat="server" MaxLength="30" onkeypress="return false"
                                                                onpaste="return false" TabIndex="6"></asp:TextBox>
                                                            <cc1:CalendarExtender ID="cePermitValidity" runat="server" CssClass="cal_Theme1"
                                                                Format="dd/MM/yyyy" TargetControlID="txtPermitValidity" OnClientDateSelectionChanged="checkPastDate">
                                                            </cc1:CalendarExtender>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblLICPlate" runat="server" Text="License Plate" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label6" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLICPlate" MaxLength="20" runat="server" onkeypress="chkAlphaNumericWithoutSpace(event,this,19)"
                                                                TabIndex="7"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblVendorId" runat="server" CssClass="label" Text="Vendor Name"></asp:Label>
                                                            <asp:Label ID="Label5" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlVendor" runat="server" TabIndex="8">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblYear" runat="server" Text="Year" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtYear" runat="server" onkeypress="return chkNumeric_WithoutStartingZero(this.value)"
                                                                MaxLength="4" TabIndex="9"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblInsuranceType" runat="server" CssClass="label" Text="Insurance Type"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtInsuranceType" runat="server" MaxLength="30" onkeypress="chkAlphaNumericWithSpace(event,this,29)"
                                                                TabIndex="10"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblChassisno" runat="server" CssClass="label" Text="Chassis Number"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtChassisNo" runat="server" MaxLength="30" onkeypress="chkAlphaNumericWithoutSpace(event,this,29)"
                                                                TabIndex="11"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblEnginno" runat="server" CssClass="label" Text="Engine Number"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtEnginNo" runat="server" MaxLength="30" onkeypress="chkAlphaNumericWithoutSpace(event,this,29)"
                                                                TabIndex="12"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblColor0" runat="server" CssClass="label" Text="Color"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtColor" runat="server" MaxLength="20" onkeypress="chkCharacter_only(event)"
                                                                TabIndex="13"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblModel0" runat="server" Text="Model" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlModel" runat="server" TabIndex="14" Width="130px">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="split"></td>
                                                        <td>
                                                            <asp:Label ID="lblMake0" runat="server" Text="Make" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlVehMake" runat="server" TabIndex="15" Width="130px">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td colspan="3"></td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td colspan="2">
                                                            <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                        <asp:Label ID="Label3" runat="server">Required Fields</asp:Label>
                                                        </td>
                                                        <td colspan="3"></td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left"></td>
                                                        <td></td>
                                                        <td style="padding: 0; margin: 0">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="ibtnUpdateVehicle" runat="server" CausesValidation="true" ImageUrl="~/images/btn-update.jpg"
                                                                            ValidationGroup="vgVeh" TabIndex="16" OnClick="ibtnUpdateVehicle_Click" OnClientClick="return ValidateVehicleInfocsc();" />
                                                                        <asp:ImageButton ID="ibtnAddVehicle" runat="server" CausesValidation="true" ImageUrl="~/images/btn-save.jpg"
                                                                            ValidationGroup="vgVeh" TabIndex="17" OnClientClick="return ValidateVehicleInfocsc();"
                                                                            OnClick="ibtnAddVehicle_Click" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="btnUserCancel" runat="server" CausesValidation="false" TabIndex="18"
                                                                            ImageUrl="~/images/btn-cancel.jpg" OnClick="btnUserCancel_Click" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlVehicleDetailsList" runat="server">
                                        <div class="form-box">
                                            <h1>
                                                <span class="icon">
                                                    <img src="../images/vehicle-icon.gif" alt="" /></span> Vehicle Details</h1>
                                        </div>
                                        <div id="grid-dsply">
                                            <dxw:ASPxGridView ID="gvVehicles" runat="server" Width="100%" EnableTheming="true" Theme="Office2003Blue"
                                                KeyFieldName="VehicleId" CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.css" CssPostfix="Office2003_Blue">
                                                <Images ImageFolder="~/App_Themes/Office2003 Blue/{0}/">
                                                    <CollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                        Width="11px" />
                                                    <ExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                        Width="11px" />
                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                        Width="11px" />
                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                        Width="11px" />
                                                </Images>
                                                <Styles CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.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 PageSize="10" PrevPageButton-Image-Url="../App_Themes/Office2003 Blue/GridView/pPrev.gif"
                                                    PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003 Blue/GridView/pPrevDisabled.gif"
                                                    NextPageButton-Image-UrlDisabled="../App_Themes/Office2003 Blue/GridView/pNextDisabled.gif"
                                                    NextPageButton-Image-Url="../App_Themes/Office2003 Blue/GridView/pNext.gif">
                                                </SettingsPager>
                                                <Columns>
                                                    <dxw:GridViewDataColumn FieldName="VehicleName" Caption="Vehicle Name" Width="15%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="..\Images\CSC\icn-vehicle-name.gif" alt="" align="top" />&nbsp; Vehicle
                                                            Name</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="VehDisplayName" Caption="Display Name" Width="15%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/icn-vehicle-name.gif" alt="" align="top" />&nbsp; Display Name</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="MakeName" Caption="Make Name" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="..\Images\CSC\icn-make-name.gif" alt="" align="middle" />&nbsp; Make Name</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="ModelName" Caption="Model" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="..\Images\CSC\icn-model-name.gif" alt="" align="middle" />&nbsp; Model</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="LicensePlate" Caption="License Plate" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="..\Images\CSC\license-icon.gif" alt="" align="top" />&nbsp; License Plate</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="VehicleTypeName" Caption="Vehicle Type Name"
                                                        Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="..\Images\CSC\icn-vehicle-type.gif" alt="" align="top" />&nbsp; Vehicle
                                                            Type</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="Capacity" Caption="Capacity" Width="10%" CellStyle-HorizontalAlign="Center">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-vehicle-capacity.gif" alt="" align="top" />&nbsp; Capacity</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:ImageButton ID="btnUpdateVehicle" runat="server" CommandArgument='<%# Eval("VehicleId") %>'
                                                                AlternateText="Update" ImageUrl="~/images/icn-edit.gif" OnClick="btnUpdateVehicle_Click"
                                                                ToolTip="Click here to Update" ImageAlign="Middle" />
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                        CellStyle-HorizontalAlign="Center">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:LinkButton ID="btnDelete" runat="server" CommandArgument='<%# Eval("VehicleId") %>'
                                                                AlternateText="Delete" OnClientClick="return confirm('do you want to really delete this..!');"
                                                                ToolTip="Click here to Delete" OnClick="btnDelete_click"><img src="../images/delete-icon.gif" /></asp:LinkButton>
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                <ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />
                                                <SettingsText EmptyDataRow="No vehicles details found" />
                                            </dxw:ASPxGridView>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvVehicles">
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </asp:Panel>
                                </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>
                <!-- Content Ends Here -->
                </div>
            <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" />
            </ContentTemplate>
            <Triggers>
                <%-- <asp:PostBackTrigger ControlID="btnExport" />--%>
                <asp:PostBackTrigger ControlID="btnTest" />
            </Triggers>
        </asp:UpdatePanel>
        <uc2:Footer ID="ucFooter" runat="server" />

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

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

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

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

        <asp:HiddenField ID="hdnLogout" runat="server" />
    </form>
</body>
</html>
