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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        #ImgWait {
            /*z-index: 1000;
            position: relative;
            /*margin: 50% 50%;*/
            padding-left: 300px;
            padding: 10px;
            position: absolute;
            width: 100%;
            border-radius: 10px;
            filter: alpha(opacity=100);
            opacity: 1;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="upnlwzRealTimeIOStatus" 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 runat="server" ID="hdnEquipTypeGroup" />
                            <div class="x_title">
                                <h4>
                                    <asp:Label ID="lblFormTitle" runat="server"></asp:Label></h4>
                                <div class="clearfix"></div>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-5">
                                <div class="row">
                                    <div class="input-group">
                                        <span class="input-group-addon">Equipment</span>
                                        <asp:DropDownList runat="server" ID="ddlEquipment" AutoPostBack="true" CssClass="form-control" OnSelectedIndexChanged="ddlEquipment_SelectedIndexChanged"></asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="col-xs-12 col-sm-12 col-lg-12">
                                <div class="row">

                                    <asp:UpdatePanel runat="server" ID="upnlIOStatus">
                                        <ContentTemplate>
                                            <asp:Timer Interval="10000" runat="server" ID="tmrIOStatus" OnTick="tmr_Tick"></asp:Timer>
                                            <div id="dvImg" visible="false" runat="server" style="z-index: 1000; position: absolute; margin-left: 45%; margin-top: 100px">
                                                <img src="/Images/loading2.gif" id="ImgWait" runat="Server" alt="" align="absmiddle" />
                                                <p style="background: antiquewhite; font-weight: bold; margin-left: -75px;">Please Wait... Looking For IO Status</p>
                                            </div>
                                            <div id="dvNoIOdataAvailable" runat="server" visible="false">
                                                <h1 class="text-danger text-center">NO DATA AVAILABLE !!!</h1>
                                            </div>
                                            <div id="dvInputStatus" runat="server" visible="false">
                                                <table border="1" style="width: 100%; font-weight: bold" class="text-center">
                                                    <th style="background-color: #3CB371; text-align: center">
                                                        <h3 style="font-weight: bold; color: white">INPUT STATUS</h3>
                                                    </th>
                                                    <tr>
                                                        <asp:DataList ID="dlInputStatus" BorderWidth="1px" CellPadding="1" CellSpacing="1" OnItemDataBound="dlInputStatus_ItemDataBound" Width="100%" runat="server" RepeatColumns="3" Style="table-layout: auto" HorizontalAlign="Left">
                                                            <SeparatorStyle BorderColor="Black" BorderStyle="Solid" />
                                                            <ItemTemplate>
                                                                <table style="width: 100%; font-weight: bold" class="text-center">
                                                                    <tr>
                                                                        <td style="width: 50%; background-color: #cdf9e4; color: black">
                                                                            <asp:Label Text='<%# Eval("IOStatusId") %>' runat="server" ID="lblInputName" />
                                                                        </td>
                                                                        <td style="width: 50%" runat="server" id="tdInputValue">
                                                                            <asp:Label Text='<%# Eval("LastIOValue") %>' runat="server" ID="lblInputValue" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                    </tr>

                                                </table>
                                            </div>

                                            <div id="dvOuputStatus" runat="server" visible="false">
                                                <div style="height: 100px;"></div>
                                                <table border="1" style="width: 100%; font-weight: bold;" class="text-center">
                                                    <th style="background-color: #3CB371; text-align: center">
                                                        <h3 style="font-weight: bold; color: white">OUTPUT STATUS</h3>
                                                    </th>
                                                    <tr>
                                                        <asp:DataList ID="dlOutputList" BorderWidth="1px" CellPadding="1" CellSpacing="1" OnItemDataBound="dlOutputList_ItemDataBound" Width="100%" runat="server" RepeatColumns="3" Style="table-layout: auto" HorizontalAlign="Left">
                                                            <SeparatorStyle BorderColor="Black" BorderStyle="Solid" />
                                                            <ItemTemplate>
                                                                <table style="width: 100%; font-weight: bold" class="text-center">
                                                                    <tr>
                                                                        <td style="width: 50%; background-color: #cdf9e4; color: black">
                                                                            <asp:Label Text='<%# Eval("IOStatusId") %>' runat="server" ID="lblOutputName" />
                                                                        </td>
                                                                        <td style="width: 50%" runat="server" id="tdOutputValue">
                                                                            <asp:Label Text='<%# Eval("LastIOValue") %>' runat="server" ID="lblOutputValue" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                    </tr>
                                                </table>
                                            </div>

                                            <div id="dvRealTimeValue" runat="server" visible="false">
                                              
                                                <div style="height: 100px;"></div>
                                                <table id="tblRealTime" border="1" runat="server" style="width: 100%; font-weight: bold;" class="text-center">
                                                    <tr style="background-color: #3CB371">
                                                        <td colspan="11">
                                                            <h3 style="font-weight: bold; text-align: center; color: white">REAL TIME VALUE</h3>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="PARAMETER" runat="server" />
                                                        </td>
                                                        <td colspan="10" style="width: 90%">
                                                            <table style="width: 100%">
                                                                <tr runat="server" id="ChannelRow">
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr id="trTemperature" runat="server">
                                                        <td runat="server" id="tdTemperature" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="TEMPERATURE" runat="server" ID="lblTemperature" />
                                                        </td>
                                                        <td colspan="10" style="width: 90%">
                                                            <asp:UpdatePanel runat="server" ID="upnlTemperature">
                                                                <ContentTemplate>

                                                                    <table style="width: 100%">
                                                                        <tr runat="server" id="trRealTimeTemp">
                                                                        </tr>
                                                                    </table>

                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                    </tr>

                                                    <tr id="trHumidity" runat="server" visible="false">
                                                        <td runat="server" id="tdHumdity" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="HUMIDITY" runat="server" ID="lblHumidity" /></td>
                                                        <td colspan="10">
                                                            <asp:UpdatePanel runat="server" ID="upnlHumidity">
                                                                <ContentTemplate>

                                                                    <table style="width: 100%">
                                                                        <tr runat="server" id="trRealTimeHumid">
                                                                        </tr>
                                                                    </table>

                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                    </tr>

                                                    <tr id="trThaw" runat="server" visible="true">
                                                        <td runat="server" id="tdSetValue" style="width: 9%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SET VALUE" runat="server" /></td>
                                                        <td colspan="1" style="width: 10%; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSetValue">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSetValue" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdSoakTime" style="width: 9%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SOAK TIME" runat="server" /></td>
                                                        <td colspan="1" style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSoakTime">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSoakTime" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td colspan="2" runat="server" id="tdElaspsedSoakTime" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="ELASPSED SOAK TIME" runat="server" /></td>
                                                        <td colspan="1" style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlElaspsedSoakTime">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblElaspsedSoakTime" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td colspan="4"></td>
                                                    </tr>
                                                    <tr id="trPhotoStability" runat="server" visible="true">
                                                        <td runat="server" id="tdSetLux" style="width: 9%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SET LUX" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSetLux">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSetLux" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdRealLux" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="REAL LUX" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlRealLux">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblRealLux" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdSetUV" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SET UV" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSetUV">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSetUV" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdRealUV" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="REAL UV" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlRealUV">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblRealUV" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSCH" runat="server" visible="false">
                                                        <td runat="server" id="tdSetSpeed" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SET SPEED" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSetSpeed">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSetSpeed" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdMeasuredSpeed" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="MEASURED SPEED" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlMeasuredSpeed">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblMeasuredSpeed" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdSetTime" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SET TIME" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlSetTime">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblSetTime" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdElapsedTime" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="ELAPSED TIME" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlElapsedTime">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblElapsedTime" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdShakerStatus" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="SHAKER STATUS" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlShakerStatus">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblShakerStatus" runat="server" Width="100%">0.0</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                    </tr>
                                                    <tr id="trCycle" runat="server" visible="false">
                                                        <td runat="server" id="tdCycleStatus" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="CYCLE STATUS" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlCycleStatus">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblCycleStatus" runat="server" Width="100%">OFF</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td runat="server" id="tdCycleRunSP" style="width: 10%; border: 1px solid; height: 30px;background-color: #cdf9e4; color: black">
                                                            <asp:Label Text="CYCLE RUN SP" runat="server" /></td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;">
                                                            <asp:UpdatePanel runat="server" ID="upnlCycleRunSP">
                                                                <ContentTemplate>
                                                                    <asp:Label ID="lblCycleRun" runat="server" Width="100%">OFF</asp:Label>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                        </td>
                                                        <td style="width: 10%; border: 1px solid; height: 30px;" colspan="7"></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="tmrIOStatus" EventName="Tick" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

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