<%@ page language="C#" autoeventwireup="true" inherits="Forms_DriverMasterCSS, App_Web_f1guidzd" %>

<%@ 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="X-UA-Compatible" content="IE=7" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <title>tSense-IoT Manage Driver</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="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <style type="text/css">
        </style>
    <%--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" />

    <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">Driver</a></span><span>&gt;</span><span><a
                                                    href="DriverMaster.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="lbtnAddDriver" runat="server" OnClick="lbtnAddDriver_Click"
                                                                                ImageUrl="~/images/CSC/btn-add-drivers.jpg" />
                                                                            <%--<asp:LinkButton ID="lbtnAddDriver" runat="server" Text="Add Driver" OnClick="lbtnAddDriver_Click"></asp:LinkButton>--%>
                                                                        </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="pnlDriverInfo" runat="server" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <img src="../images/CSC/icn-driver-information.gif" alt="" /></span>Driver Information</h1>
                                                <table align="left" cellspacing="5px" border="0" class="form-tbl">
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblDriverName" runat="server" Text="Driver Name" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label2" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDriverName" MaxLength="50" onkeypress="chkCharacter_only(this)"
                                                                TabIndex="1" 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="10" onkeypress="return chkDescription(event,this,9);"
                                                                TabIndex="2" runat="server"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblAddress" runat="server" Text="Address" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtAddress" MaxLength="200" runat="server" TextMode="MultiLine"
                                                                onkeypress="return chkDescription(event,this,199);" TabIndex="3"></asp:TextBox>
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblsex" runat="server" Text="Sex" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label15" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:RadioButton ID="rbtMale" runat="server" Text="Male" GroupName="Sex" TabIndex="4" />
                                                            <asp:RadioButton ID="rbtFemale" runat="server" Text="Female" GroupName="Sex" TabIndex="5" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblPhoneNo" runat="server" Text="Phone No" CssClass="label"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtPhoneNo" MaxLength="20" runat="server" onkeypress="return chkPhone(this);"
                                                                TabIndex="6"></asp:TextBox>
                                                            <br />
                                                            For e.g +91-xxxx-xxxxxx
                                                        </td>
                                                        <td>&nbsp;
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblMobileNo" runat="server" Text="Mobile No" CssClass="label"></asp:Label>
                                                            <asp:Label ID="Label16" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtMobileNo" MaxLength="15" runat="server" onkeypress="return chkMobile(this);"
                                                                TabIndex="7"></asp:TextBox><br />
                                                            For e.g 91xxxxxxxxxx
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblLicense" runat="server" CssClass="label" Text="License Number"></asp:Label>
                                                            <asp:Label ID="Label5" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLicenseNo" runat="server" MaxLength="30" onkeypress="chkAlphaNumericWithSpace(event,this,29)"
                                                                TabIndex="8"></asp:TextBox>
                                                        </td>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblLicenseExpires" runat="server" CssClass="label" Text="License Expires On"></asp:Label>
                                                            <asp:Label ID="Label7" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtLicenseValidity" runat="server" TabIndex="9"></asp:TextBox>
                                                            <cc1:CalendarExtender ID="ceValidity" runat="server" CssClass="cal_Theme1" TargetControlID="txtLicenseValidity"
                                                                OnClientDateSelectionChanged="checkPastDate">
                                                            </cc1:CalendarExtender>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblDateOfBirth" runat="server" CssClass="label" Text="Date Of Birth"></asp:Label>
                                                            <asp:Label ID="Label9" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDateOfBirth" runat="server" onkeypress="return false" onpaste="return false"
                                                                TabIndex="10"></asp:TextBox>
                                                            <cc1:CalendarExtender ID="ceDOB" runat="server" CssClass="cal_Theme1" TargetControlID="txtDateOfBirth"
                                                                OnClientDateSelectionChanged="checkFutureDate">
                                                            </cc1:CalendarExtender>
                                                        </td>
                                                        <td></td>
                                                        <td>
                                                            <asp:Label ID="lblVendorId" runat="server" CssClass="label" Text="Vendor Name"></asp:Label>
                                                            <asp:Label ID="Label10" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlVendor" runat="server">
                                                            </asp:DropDownList>
                                                        </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="ibtnUpdateDriver" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                                            TabIndex="17" OnClientClick="return ValidateDriverInfo();" OnClick="ibtnUpdateDriver_Click" />
                                                                        <asp:ImageButton ID="ibtnAddDriver" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                                            TabIndex="16" OnClientClick="return ValidateDriverInfo();" OnClick="ibtnAddDriver_Click" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="btnDriverCancel" runat="server" TabIndex="18" ImageUrl="~/images/btn-cancel.jpg"
                                                                            OnClick="btnDriverCancel_Click" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlDriverDetailsList" runat="server">
                                        <div class="form-box">
                                            <h1>
                                                <span class="icon">
                                                    <img src="../images/CSC/icn-driver-information.gif" alt="" /></span>
                                                Driver Details</h1>
                                        </div>

                                        <div id="grid-dsply">

                                            <dxw:ASPxGridView ID="gvdrivers" runat="server" Width="100%" KeyFieldName="DriverId"
                                                CssFilePath="~/App_Themes/GridViewBlue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                EnableTheming="true" Theme="Office2003Blue">
                                                <%--<Images ImageFolder="~/App_Themes/GridViewBlue/GridView/">
                                                <CollapsedButton Height="12px" Url="~/App_Themes/GridViewBlue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <ExpandedButton Height="12px" Url="~/App_Themes/GridViewBlue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/GridViewBlue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/GridViewBlue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>--%>
                                                <Styles CssFilePath="~/App_Themes/GridViewBlue/GridView/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/GridViewBlue/GridView/pPrev.gif"
                                                    PrevPageButton-Image-UrlDisabled="../App_Themes/GridViewBlue/GridView/pPrevDisabled.gif"
                                                    NextPageButton-Image-UrlDisabled="../App_Themes/GridViewBlue/GridView/pNextDisabled.gif"
                                                    NextPageButton-Image-Url="../App_Themes/GridViewBlue/GridView/pNext.gif">
                                                </SettingsPager>
                                                <Columns>
                                                    <dxw:GridViewDataColumn FieldName="DisplayName" Caption="Vendor Name" Width="15%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-driver-name.gif" alt="" align="top" />&nbsp; Driver Name</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="Address" Caption="Address" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-address.gif" alt="" align="middle" />&nbsp; Address</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="MobileNo" Caption="Mobile No" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-contact-number.gif" alt="" align="middle" />&nbsp; Mobile No</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="LicenseNo" Caption="LicenseNo" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-license-number.gif" alt="" align="top" />&nbsp; License No</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="LicenseValidityDate" Caption="LicenseValidityDate"
                                                        Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-license-expireson.gif" alt="" align="top" />&nbsp;License Expires On</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataColumn FieldName="VendorName" Caption="VendorName" Width="10%">
                                                        <HeaderCaptionTemplate>
                                                            <span>
                                                                <img src="../images/CSC/icn-vendor-name.gif" alt="" align="top" />&nbsp;Vendor Name</span>
                                                        </HeaderCaptionTemplate>
                                                    </dxw:GridViewDataColumn>
                                                    <dxw:GridViewDataTextColumn Caption="Edit" Width="3%" Name="Edit">
                                                        <HeaderTemplate>
                                                        </HeaderTemplate>
                                                        <DataItemTemplate>
                                                            <asp:ImageButton ID="btnUpdateVehicle" runat="server" CommandArgument='<%# Eval("DriverId") %>'
                                                                AlternateText="Update" ImageUrl="~/images/icn-edit.gif" ToolTip="Click here to Update"
                                                                ImageAlign="Middle" OnClick="btnUpdateDriver_Click" />
                                                        </DataItemTemplate>
                                                    </dxw:GridViewDataTextColumn>
                                                </Columns>
                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                <ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />
                                                <SettingsText EmptyDataRow="No Driver details found" />
                                            </dxw:ASPxGridView>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvDrivers">
                                                <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="btnTest" />
            </Triggers>
            <Triggers>
                <%-- <asp:PostBackTrigger ControlID="btnExport" />--%>
            </Triggers>
        </asp:UpdatePanel>
        <uc2:Footer ID="ucFooter" runat="server" />

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