<%@ Page Title="" Language="C#" MasterPageFile="~/Application.Master" AutoEventWireup="true" CodeBehind="DoorAccessUsers.aspx.cs" Inherits="ICDAS_3_0_Web_App.ICDAS_3_0.Configuration.DoorAccessUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%@ Register Src="~/User_Controls/ucSearchGrid.ascx" TagPrefix="ucSearchGrid" TagName="ucSearchGrid" %>
    <%@ Register Src="~/User_Controls/ucToolBar.ascx" TagPrefix="ucToolBar" TagName="ucToolBar" %>
    <%@ Register Src="~/User_Controls/ucUserValidation.ascx" TagPrefix="ucValidate" TagName="ucUserValidation" %>


    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            font-family: Arial;
        }

        .loadingmodal {
            position: fixed;
            z-index: 999 !important;
            height: 100%;
            width: 100%;
            top: 0;
            background-color: white;
            filter: alpha(opacity=60);
            opacity: 0.8;
            -moz-opacity: 1;
        }

        .loadingcenter {
            z-index: 1000 !important;
            width: 200px;
            height: 100px;
            position: absolute;
            left: 45%;
            top: 60%;
            margin-left: -150px;
            margin-top: -150px;
            opacity: 1;
            /*-moz-opacity: 1;*/
            background: url("Images/loading.gif") no-repeat;
        }
    </style>

</asp:Content>
<asp:Content ID="cotMain" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upnlwzDoorAccessUsers">
        <ProgressTemplate>
            <div class="loadingmodal">
                <div class="loadingcenter">
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="upnlwzDoorAccessUsers" UpdateMode="Always" runat="server">
        <ContentTemplate>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_content">

                            <asp:HiddenField ID="hdnRecordId" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnRecordIds" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnRowIndex" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnEquipmentId" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnBannerText" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnUsernameDisplay" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnBiometricIPAddress" Value="" runat="server" />
                            <asp:HiddenField ID="hdnOldAccessUserCode" Value="" runat="server" />
                            <asp:HiddenField ID="hdnOldAccessUserName" Value="" runat="server" />
                            <asp:HiddenField ID="hdnNewAccessUserCode" Value="" runat="server" />
                            <asp:HiddenField ID="hdnNewAccessUserName" Value="" runat="server" />
                            <asp:HiddenField ID="hdnUpdatedUsers" Value="" runat="server" />
                            <asp:HiddenField ID="hdnUpdatedCardNo" Value="" runat="server" />
                            <asp:HiddenField ID="hdnBranchId" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnOldSelectedUsers" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnDoorAccess" Value="0" runat="server" />
                            <asp:HiddenField ID="hdncomments" Value="0" runat="server" />
                            <div class="x_title">
                                <h4>
                                    <asp:Label ID="lblFormTitle" runat="server"></asp:Label></h4>
                                <div class="clearfix"></div>
                            </div>
                            <div id="wizard" class="form_wizard wizard_horizontal">
                                <ul class="wizard_steps">
                                    <li>
                                        <a runat="server" id="aStep1" class="selected">
                                            <span class="step_no">1</span>
                                            <small>Search Records</small>
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a runat="server" id="aStep2" class="disabled">
                                            <span class="step_no">2</span>
                                            <small>Manage Records</small>
                                            </span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12">
                                <ucToolBar:ucToolBar runat="server" ID="ucToolBar" DisplaySaveAs="N" Displayadd="N" displaydelete="N" displayPrint="N" />
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12">
                                <asp:Wizard ID="wzMain" CssClass="col-sm-12" DisplaySideBar="false" OnActiveStepChanged="wzMain_ActiveStepChanged"
                                    runat="server" class="form_wizard wizard_horizontal">
                                    <WizardSteps>
                                        <asp:WizardStep ID="Step0" runat="server">
                                            <div id="dvControl" runat="server" style="width: 100%; overflow: auto; position: relative; overflow-x: hidden">
                                                <ucSearchGrid:ucSearchGrid runat="server" ID="ucSearchGrid" />
                                            </div>
                                        </asp:WizardStep>
                                        <asp:WizardStep ID="Step1" runat="server">
                                            <div class="row">
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Equipment Name</span>
                                                        <asp:TextBox ID="txtEquipmentName" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" />
                                                    </div>
                                                </div>
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <asp:TextBox ID="txtStatus" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">IP Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <asp:TextBox ID="txtEquipmentId" CssClass="form-control text-right" runat="server" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" Style="text-align: left;" />
                                                    </div>
                                                </div>
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Login Interval&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <asp:TextBox ID="txtLoginInterval" CssClass="form-control" runat="server" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Equipment Type&nbsp;</span>
                                                        <asp:TextBox ID="txtEquipmentType" MaxLength="40" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" />
                                                    </div>
                                                </div>
                                                <div class="col-xs-12 col-sm-12 col-lg-6">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Door Access Type</span>
                                                        <asp:TextBox ID="txtDoorAccessType" MaxLength="40" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" ReadOnly="true" />
                                                        <%--<ucSearchGrid:ucDropDown runat="server" ID="ucDropDown1" />--%>
                                                    </div>
                                                </div>
                                            </div>
                                            <div id="divForPLC" runat="server" visible="false">
                                                <div class="row">
                                                    <div class="col-xs-12 col-sm-12 col-lg-12">
                                                        <table id="tblHeader0" runat="server" width="100%" style="background-color: #b7ecd3" class="table table-bordered dt-responsive nowrap ">
                                                            <tr>
                                                                <td style="width: 6%; text-align: center">Sr No.</td>
                                                                <td style="width: 94%; text-align: center">Door Access Users</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    <div class="col-xs-12 col-sm-12 col-lg-12">
                                                        <div id="dvScroll" runat="server" style="height: 350px; overflow-y: auto; overflow-x: hidden;">
                                                            <asp:GridView ID="grdPLC" runat="server" Width="100%" CssClass="table table-bordered dt-responsive nowrap" AutoGenerateColumns="False" CellPadding="0" CellSpacing="0" ShowHeader="false">

                                                                <Columns>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:Label Width="6%" Text='<%# Eval("RowNumber")%>' runat="server"></asp:Label>

                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="6%" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:TextBox Width="94%" ID="txtPLCDoorAccessUsers" Text='<%# Eval("DoorAccessUsers")%>' MaxLength="100" runat="server" class="form-control" onkeypress="return blockSpecialChar(event)" /><%-- --%>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="94%" />
                                                                    </asp:TemplateField>
                                                                </Columns>

                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div id="divForBiometric" runat="server" visible="false">
                                                <div class="row">
                                                    <div class="col-xs-12 col-sm-12 col-lg-6">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">Biometric Banner Text</span>
                                                            <asp:TextBox ID="txtBioMetricBannerText" MaxLength="100" runat="server" CssClass="form-control" AutoCompleteType="Disabled" autocomplete="off" required />
                                                        </div>
                                                    </div>
                                                    <div class="col-xs-12 col-sm-12 col-lg-6">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">Door Access Username Display:</span>
                                                            <asp:RadioButtonList ID="rdbDoorAccess" runat="server" CssClass="form-control" RepeatDirection="Horizontal">
                                                                <asp:ListItem Value="0" Selected="True" style="margin-right: 20px">Active</asp:ListItem>
                                                                <asp:ListItem Value="1" style="margin-right: 30px">Not Active</asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12 col-sm-12 col-lg-6">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">Biometric IP Address</span>
                                                            <asp:TextBox ID="txtBioIPAddress" MaxLength="100" runat="server" CssClass="form-control" pattern="^(?=.*[^\.]$)((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.?){4}$" title="eg : 192.168.1.1" AutoCompleteType="Disabled" autocomplete="off" required />
                                                        </div>
                                                    </div>
                                                    <div class="col-xs-12 col-sm-12 col-lg-4">
                                                        <div class="input-group">
                                                            <span class="input-group-addon">Door Access Users</span>
                                                            <asp:DropDownList runat="server" ID="ddlBioMetricUsers" CssClass="form-control" OnSelectedIndexChanged="ddlBioUsers_SelectedIndexChanged" AutoPostBack="true">
                                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                                <asp:ListItem Value="6">6</asp:ListItem>
                                                                <asp:ListItem Value="7">7</asp:ListItem>
                                                                <asp:ListItem Value="8">8</asp:ListItem>
                                                                <asp:ListItem Value="9">9</asp:ListItem>
                                                                <asp:ListItem Value="10">10</asp:ListItem>
                                                                <asp:ListItem Value="11">11</asp:ListItem>
                                                                <asp:ListItem Value="12">12</asp:ListItem>
                                                                <asp:ListItem Value="13">13</asp:ListItem>
                                                                <asp:ListItem Value="14">14</asp:ListItem>
                                                                <asp:ListItem Value="15">15</asp:ListItem>
                                                                <asp:ListItem Value="16">16</asp:ListItem>
                                                                <asp:ListItem Value="17">17</asp:ListItem>
                                                                <asp:ListItem Value="18">18</asp:ListItem>
                                                                <asp:ListItem Value="19">19</asp:ListItem>
                                                                <asp:ListItem Value="20">20</asp:ListItem>
                                                                <asp:ListItem Value="21">21</asp:ListItem>
                                                                <asp:ListItem Value="22">22</asp:ListItem>
                                                                <asp:ListItem Value="23">23</asp:ListItem>
                                                                <asp:ListItem Value="24">24</asp:ListItem>
                                                                <asp:ListItem Value="25">25</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12 col-sm-12 col-lg-12">
                                                        <table id="Table1" runat="server" width="100%" style="background-color: #b7ecd3" class="table table-bordered dt-responsive nowrap ">
                                                            <tr>
                                                                <td style="width: 6%; text-align: center">Sr No.</td>
                                                                <td style="width: 47%; text-align: center">Door Access Users</td>
                                                                <td style="width: 47%; text-align: center">Access Card No</td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    <div class="col-xs-12 col-sm-12 col-lg-12">
                                                        <div id="dvBioMetric" runat="server" style="height: 250px; overflow-y: auto; overflow-x: hidden;">
                                                            <asp:GridView ID="grdBioMetric" runat="server" Width="100%" CssClass="table table-bordered dt- responsive nowrap" AutoGenerateColumns="False" CellPadding="0" CellSpacing="0" OnRowDataBound="grdBioMetric_RowDataBound" ShowHeader="false">
                                                                <Columns>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="RowNumber" Text='<%# Eval("RowNumber")%>' runat="server"></asp:Label>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="6%" HorizontalAlign="Center" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="txtBioDoorAccessUsers" Text='<%# Eval("DoorAccessUsers")%>' MaxLength="100" runat="server" class="form-control" required   /><%-- --%>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="47%" />
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField>
                                                                        <ItemTemplate>
                                                                            <asp:TextBox ID="txtBioAccessCardNo" TextMode="Number" Text='<%# Eval("AccessCardNo")%>' Max="99999" runat="server" class="form-control" required  /><%-- --%>
                                                                        </ItemTemplate>
                                                                        <ItemStyle Width="47%" />
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 col-sm-12 col-lg-4">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Username*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <asp:TextBox ID="txtUsername" MaxLength="100" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" required ReadOnly="true" />
                                                    </div>
                                                </div>
                                                <div class="col-xs-12 col-sm-12 col-lg-4">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Password*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <asp:TextBox ID="txtPassword" TextMode="Password" MaxLength="15" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" required onkeypress="return blockSpecialChar(event)" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col-xs-12 col-sm-12 col-lg-8">
                                                    <div class="input-group">
                                                        <span class="input-group-addon">Comments*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                        <%--                    <asp:TextBox ID="txtComments" MaxLength="255" runat="server" class="form-control" AutoCompleteType="Disabled" autocomplete="off" TextMode="MultiLine" required
                                                            placeholder="Give Your Comments.." />--%>
                                                        <textarea id="txtComments" maxlength="255" runat="server" class="form-control" autocomplete="Off" cols="20" rows="2"
                                                            placeholder="Give Your Comments.. (max length 255)" onkeypress="return blockSpecialChar(event)"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                            <asp:Button ID="btnSave" Visible="false" runat="server" Text="Save" CssClass="btn btn-primary btn-sm alignright" OnClick="btnSave_Click" />
                                        </asp:WizardStep>
                                    </WizardSteps>
                                    <StartNavigationTemplate>
                                        <asp:Button ID="btnNextButton" Visible="false" runat="server" Text="Next" CommandName="MoveNext" CssClass="btn btn-primary btn-sm" />
                                    </StartNavigationTemplate>
                                    <FinishNavigationTemplate>
                                        <br />
                                        <asp:Button ID="btnPrevious" runat="server" formnovalidate="true" Text="Previous" CssClass="btn btn-success btn-sm" ToolTip="MOVE BACK TO PREVIOUS SCREEN" CommandName="MovePrevious" />
                                    </FinishNavigationTemplate>
                                </asp:Wizard>
                            </div>

                        </div>


                    </div>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
