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

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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        debugger;
        window.onload = function () {
            oboutGrid.prototype.restorePreviousSelectedRecord = function () {
                return;
            }
            oboutGrid.prototype.markRecordAsSelectedOld = oboutGrid.prototype.markRecordAsSelected;
            oboutGrid.prototype.markRecordAsSelected = function (row, param2, param3, param4, param5) {
                if (row.className != this.CSSRecordSelected) {
                    this.markRecordAsSelectedOld(row, param2, param3, param4, param5);
                } else {
                    var index = this.getRecordSelectionIndex(row);
                    if (index != -1) {
                        this.markRecordAsUnSelected(row, index);
                    }
                }
            }
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class='divtable'>
        <asp:HiddenField ID="hdnLoginComments" runat="server" />
        <div class='form-box'>
            <div class="box box-success">
                <!-- /.box-header -->
                <div class="box-header with-border">
                    <div class='row'>
                        <div class='col-md-8'>
                            <asp:Label ID="lblTitle" runat="server" class="box-title"></asp:Label>
                        </div>
                    </div>
                </div>

                <!-- form start -->
                <div class="form-horizontal">
                    <div class="box-body" id="divFormContent" runat="server">
                        <div class="form-group">
                            <div>
                                <asp:Wizard ID="EmailSmsSetupWizard" runat="server" HeaderText="" OnCancelButtonClick="EmailSmsSetupWizard_CancelButtonClick"
                                    OnNextButtonClick="SetupWizard_NextButtonClick" Width="100%" StartNextButtonType="Button" DisplaySideBar="false">
                                    <WizardSteps>
                                        <asp:WizardStep ID="Step0" StepType="Step" AllowReturn="true" runat="server">
                                            <div class="form-group">
                                                <asp:Label ID="Label1" runat="server" Text="Instrument Name" class="col-sm-2 control-label"></asp:Label>
                                                <div class="col-sm-4">
                                                    <asp:DropDownList runat="server" ID="ddlInstrumentName" AutoPostBack="true" OnSelectedIndexChanged="ddlInstrumentName_SelectedIndexChanged" CssClass="form-control">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="form-group" style="padding-left: 1%">
                                                <div class="col-sm-6" style="overflow-y: scroll; height: 63vh">
                                                    <OBgrid:Grid ID="grdEmailConfig" AutoGenerateColumns="false" runat="server" CallbackMode="false" OnRowDataBound="grdEmailConfig_RowDataBound"
                                                        ShowTotalNumberOfPages="false" AllowAddingRecords="false" ViewStateMode="Enabled" AllowPaging="false" Width="100%"
                                                        FolderStyle="~/App_Include/StyleSheet/Grid/" AllowPageSizeSelection="false">
                                                        <Columns>
                                                            <OBgrid:Column DataField="AlarmCodeLookUpId" Visible="false" Index="0" runat="server"></OBgrid:Column>
                                                            <OBgrid:CheckBoxSelectColumn ShowHeaderCheckBox="true" Index="1" HeaderAlign="left" Width="10%"></OBgrid:CheckBoxSelectColumn>
                                                            <OBgrid:Column TemplateId="tplAlarmDescription" DataField="Alarmdescription" HeaderText="Active Email Alert for Alarm" Index="2" runat="server" Width="90%"></OBgrid:Column>
                                                            <OBgrid:Column DataField="EquipmentAlarmConfigId" Visible="false" Index="3" runat="server"></OBgrid:Column>
                                                        </Columns>
                                                        <Templates>
                                                            <OBgrid:GridTemplate ID="tplAlarmDescription" ControlID="divAlarmDescription">
                                                                <Template>
                                                                    <div id="divAlarmDescription" runat="server" style="text-align: left; width: 100%"></div>
                                                                </Template>
                                                            </OBgrid:GridTemplate>
                                                        </Templates>
                                                    </OBgrid:Grid>
                                                </div>
                                                <div class="col-sm-6" style="overflow-y: scroll; height: 63vh">
                                                    <OBgrid:Grid ID="grdSmsConfig" AutoGenerateColumns="false" runat="server" CallbackMode="false" OnRowDataBound="grdSmsConfig_RowDataBound"
                                                        ShowTotalNumberOfPages="false" AllowAddingRecords="false" ViewStateMode="Enabled" AllowPaging="false" Width="100%"
                                                        FolderStyle="~/App_Include/StyleSheet/Grid/" AllowPageSizeSelection="false">
                                                        <Columns>
                                                            <OBgrid:Column DataField="AlarmCodeLookUpId" Visible="false" Index="0" runat="server"></OBgrid:Column>
                                                            <OBgrid:CheckBoxSelectColumn ShowHeaderCheckBox="true" Index="1" HeaderAlign="left" Width="10%"></OBgrid:CheckBoxSelectColumn>
                                                            <OBgrid:Column DataField="Alarmdescription" TemplateId="tplAlarmDescriptions" Index="2" HeaderText="Active SMS Alert for Alarm" runat="server" Width="90%"></OBgrid:Column>
                                                            <OBgrid:Column DataField="EquipmentAlarmConfigId" Visible="false" Index="3" runat="server"></OBgrid:Column>
                                                        </Columns>
                                                        <Templates>
                                                            <OBgrid:GridTemplate ID="tplAlarmDescriptions" ControlID="divAlarmDescription">
                                                                <Template>
                                                                    <div id="divAlarmDescription" runat="server" style="text-align: left; width: 100%"></div>
                                                                </Template>
                                                            </OBgrid:GridTemplate>
                                                        </Templates>
                                                    </OBgrid:Grid>
                                                </div>
                                            </div>
                                        </asp:WizardStep>
                                        <asp:WizardStep ID="Step1" StepType="Step" AllowReturn="true" runat="server">
                                            <div class="form-group" style="height: 65vh; padding-left: 5%">
                                                <ucAdminLoginControl:ucAdminLogin ID="ucAdminLogin" runat="server" />
                                            </div>
                                        </asp:WizardStep>
                                        <asp:WizardStep ID="Step2" StepType="Step" AllowReturn="true" runat="server">
                                            <div class="form-group" style="height: 70vh; padding-left: 1%" align="center">
                                                <img alt="Prcessing" src="~/../Images/AnimatedProgressBar1.gif" style="height: auto" />
                                            </div>
                                            <asp:Timer ID="tmrEmailSmsConfig" runat="server" Enabled="false" Interval="1000" ViewStateMode="Enabled" OnTick="tmrEmailSmsConfig_Tick"></asp:Timer>
                                        </asp:WizardStep>
                                    </WizardSteps>
                                    <StepNavigationTemplate>
                                        <div class="form-group">
                                            <asp:Button ID="btnNext" runat="server" Text="Save & Continue" CssClass="myButton" CommandName="MoveNext" Visible="false" ToolTip="Update" />
                                            <asp:Button ID="btnCancel" runat="server" Text="Back" CssClass="myButton" Visible="false" CommandName="Cancel" />
                                        </div>
                                    </StepNavigationTemplate>
                                </asp:Wizard>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
