<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Comm_Group.aspx.cs" Inherits="Neclog_3_0.Comm_Group" %>

<%@ Register Src="~/UserControls/ucSearchControl.ascx" TagName="ucSearchControl" TagPrefix="ucSearch" %>
<%@ Register TagPrefix="OBgrid" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function grdSearch_OnClientDblClick(recordIndex) {
            grdSearch_OnInternalClientDblClick(recordIndex);
            var cObj = document.getElementById("<%= btnEdit.ClientID%>");
            cObj.click();
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class='divtable'>
        <asp:HiddenField ID="hdnRecordKeyId" runat="server" />
        <div class='form-box'>
            <div class="box box-success">
                <div class="box-header with-border">
                    <div class='row'>
                        <div class='col-md-7'>
                            <asp:Label ID="lblTitle" runat="server" class="box-title"></asp:Label>
                            <asp:HiddenField ID="hdnHeaderNote" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnFooterNote" Value="0" runat="server" />
                            <asp:HiddenField ID="hdnInstrumentCreationLicense" runat="server" />
                            <asp:HiddenField ID="hdnInstrumentCount" runat="server" />
                        </div>
                        <div class='col-md-5' align="right">
                            <asp:UpdatePanel runat="server" UpdateMode="Always">
                                <ContentTemplate>
                                    <asp:Button ID="btnSearch" runat="server" Text="Find" OnClick="SearchData" CssClass="myButton" CausesValidation="false" ToolTip="Find" />&nbsp;
                                    <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="AddData" CssClass="myButton" CausesValidation="false" Visible="false" ToolTip="Add" />&nbsp;
                                    <asp:Button ID="btnEdit" runat="server" Text="Edit" OnClick="btnEdit_Click" CssClass="myButton" ToolTip="Edit" />&nbsp;
                                    <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="SaveData" CssClass="myButton" ToolTip="Update" />&nbsp;
                                    <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClientClick="return validateDelete();" OnClick="btnDelete_Click" CssClass="myButton" CausesValidation="false" ToolTip="Delete" />&nbsp;
                                    <asp:Button ID="btnPrint" runat="server" Text="Print" OnClick="btnPrint_Click" CssClass="myButton" CausesValidation="false" ToolTip="Print" />
                                </ContentTemplate>
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnPrint" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->

                <div class="form-horizontal">
                    <div class="box-body" id="divFormContent" runat="server">
                        <div class="form-group" id="divCommGroup" runat="server">
                            <asp:Label ID="Label1" runat="server" Text="Comm. Group*" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:TextBox runat="server" ID="txtBusinessUnitName" MaxLength="30" class="form-control" />
                            </div>
                            <div id="divCode" runat="server" class="col-sm-3">
                            </div>
                            <div class="col-sm-5">
                                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtBusinessUnitName"
                                    CssClass="text-alert" ErrorMessage="Comm. Group field is required." />
                            </div>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label32" runat="server" Text="Soft Key" CssClass="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-6">
                                <asp:Label ID="lblSoftKey" runat="server" Text="Soft Key Not Generated Yet, Please Start Service To Generate Soft Key" CssClass="control-label"></asp:Label>
                            </div>
                            <div class="col-sm-3">
                                <asp:Button ID="btnGenerateKey" runat="server" Text="Generate Key for additional 5 Instrument" OnClick="btnGenerateKey_Click" OnClientClick="return confirm('Are you sure, you want to generate keys for additional Instrument.');" CssClass="myButton" />
                            </div>
                            <asp:Timer ID="tmrSoftkey" Enabled="false" Interval="10000" OnTick="tmrSoftkey_Tick" runat="server"></asp:Timer>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label34" runat="server" Text="Activation Key" class="col-sm-2 control-label"></asp:Label>
                            <div class="col-sm-5">
                                <asp:TextBox ID="txtActivationKey" runat="server" MaxLength="35" CssClass="form-control"></asp:TextBox>
                            </div>
                            <div class="col-sm-5">
                                <asp:Label ID="lblActivationStatus" runat="server" CssClass="control-label" Text="Invalid Activation key"></asp:Label>
                            </div>
                        </div>
                        <div id="divProgressBar" visible="false" runat="server">
                            <asp:HiddenField ID="hdnProgressBarCount" Value="3" runat="server" />
                            <asp:Label runat="server" Text="PLEASE WAIT CONNECTING EQUIPMENT. DO NOT HIT REFRESH OR CLOSE THE WINDOW" CssClass="control-label"></asp:Label>
                            <div style="height: 30vh; width: 100%">
                                <img alt="Prcessing" src="~/../Images/AnimatedProgressBar1.gif" />
                            </div>
                        </div>
                        <div id="divActivationKeyLog" visible="false" runat="server" style="border: solid; border-width: 1px;">
                            <div class="form-group">
                                <div class="col-sm-1" align="center"    >
                                    <b>
                                        <asp:Literal Text="Sr No" runat="server" /></b>
                                </div>
                                <div class="col-sm-5" align="center">
                                    <b>
                                        <asp:Literal Text="Soft Key" runat="server" /></b>
                                </div>
                                <div class="col-sm-6" align="center">
                                    <b>
                                        <asp:Literal Text="Activation Key" runat="server" /></b>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-1" align="center">
                                    <asp:Literal ID="litSrNo" runat="server" />
                                </div>
                                <div class="col-sm-5" align="center">
                                    <asp:Literal ID="litSoftKey" runat="server" />
                                </div>
                                <div class="col-sm-6" align="center">
                                    <asp:Literal ID="litActivationKey" runat="server" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="box-body" id="divSearchContent" runat="server" visible="false">
                    <ucSearch:ucSearchControl ID="ucSearch" runat="server" strSearchProcedurename="BusinessUnit_Search"
                        strDelePrecedure="BusinessUnit_Delete" strDeletekeys="0,-1" strDeleteColName="@hdnRecordKeyId,@sssUserId" blnOutParameter="true"
                        strColWidth="0,60,35" />
                </div>
            </div>

        </div>
    </div>


</asp:Content>
