<%@ page language="C#" autoeventwireup="true" inherits="RealTimeSummary, App_Web_realtimesummary.aspx.b1e99372" enableEventValidation="false" %>

<%@ Register Src="~/UserControls/ucOnline.ascx" TagName="iERPLift" TagPrefix="iERPLift" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControls/iERPUtilityBar.ascx" TagName="iERPUtilityBar" TagPrefix="dsip" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head id="Head1" runat="server">
    <title>..:: ICDAS 2.1 ::..</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
   
    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/js_functions.js"> </script>

    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/ScreenSaverStar.js"> </script>

    <script type="text/javascript" language="javascript">
        function resizeObject() {

            var w = getBrowserWindowSize().width;
            var h = getBrowserWindowSize().height - 5;
            //window.resizeTo(w, h);
            var cObj = document.getElementById("divChildBody");
            if (cObj != null) {
                //cObj.style.height = parseInt((h*79)/100) +"px";
                cObj.style.height = (parseInt(h) - 50) + "px";
            }

        }


        function validateRecord() {
            var doc = document.forms[0];

            return true;
        }

        function validateSave() {
            var doc = document.forms[0];

            if (Trim(doc.txtFollowUpDate.value) == "") {
                alert("Please Enter Followup Date...");
                document.forms[0].txtFollowUpDate.focus()
                return false;
            }
            else {
                return true;
            }
        }
    </script>

</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); initScreenSaver('1',<%=Session["AutoLogOutTime"]%>);">
    <form id="Form1" runat="server" class="tablefont">
    <asp:ToolkitScriptManager runat="Server" EnablePartialRendering="true" AsyncPostBackTimeout="0"
        ID="ToolkitScriptManager1" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" class="real-time-summary-bg">
        <tr>
            <td valign="top" align="left">
                <div id="divMainBody" align="center" runat="server" width="100%" height="100%">
                    <table style="width: 100%; table-layout: fixed;">
                        <tr>
                            <td class="headerbg" align="left" style="border-style: none; height: 26px; width: 100%;
                                position: absolute; left: 1px; top: 8px;">
                                <asp:Label ID="lblCaption" runat="server" Text="Real Time Summary" Width="100%" Font-Bold="true"
                                    Font-Names="Tahoma" ForeColor="AntiqueWhite" Font-Size="Medium"></asp:Label>
                            </td>
                        </tr>
                        <tr height="40px">
                            <td>
                                &nbsp
                            </td>
                        </tr>
                    </table>
                    <asp:UpdatePanel ID="uplChildBody" runat="server" UpdateMode="Always">
                        <ContentTemplate>
                            <asp:HiddenField ID="hdnRecordKeyId" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnRecordIds" runat="server" Value="" />
                            <asp:HiddenField ID="hdnUserId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBusinessUnitId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBranchId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnLoginComments" runat="server" Value="" />
                            <div id="divChildBody" runat="server" style="overflow: auto; width: 99%;">
                                <table cellspacing="0" cellpadding="0" align="left" border="0" style="width: 100%;
                                    height: 100%; background-image: url(../Images/home-bg.JPG); background-repeat: repeat;">
                                    <tr>
                                        <td valign="top">
                                            <%--<asp:UpdatePanel ID="upnlTimer2" UpdateMode="Conditional" runat="server">
                                        <ContentTemplate>--%>
                                            <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                                <tr>
                                                    <td>
                                                        <asp:Panel ID="pnlPaging" runat="server" Visible="True">
                                                            <table width="252" align="right" cellpadding="3" cellspacing="1" class="page-brd">
                                                                <tr>
                                                                    <td class="tablegreybg">
                                                                        <table width="100%" align="center" cellspacing="0">
                                                                            <tr>
                                                                                <td width="30%" height="25" align="right">
                                                                                    <asp:ImageButton ID="cmdFirst" runat="server" Text=" &laquo; " OnClick="cmdFirst_Click"
                                                                                        class="title" ImageUrl="~/Images/previous.jpg" ToolTip="First" Height="30px"
                                                                                        Width="30px"></asp:ImageButton>
                                                                                    <asp:ImageButton ID="cmdPrev" runat="server" Text=" &#8249; " OnClick="cmdPrev_Click"
                                                                                        class="title" ImageUrl="~/Images/left.jpg" ToolTip="Previous" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                </td>
                                                                                <td width="40%" align="center" class="txtblack">
                                                                                    <asp:DataList ID="dlPaging" runat="server" RepeatDirection="Horizontal" OnItemCommand="dlPaging_ItemCommand"
                                                                                        OnItemDataBound="dlPaging_ItemDataBound">
                                                                                        <ItemTemplate>
                                                                                            <asp:LinkButton ID="lnkbtnPaging" runat="server" ForeColor="Blue" CommandArgument='<%# Eval("PageIndex") %>'
                                                                                                CommandName="Paging" Text='<%# Eval("PageText") %>'></asp:LinkButton>&nbsp;
                                                                                        </ItemTemplate>
                                                                                    </asp:DataList>
                                                                                </td>
                                                                                <td width="40%" align="left">
                                                                                    <asp:ImageButton ID="cmdNext" runat="server" Text=" &#8250; " OnClick="cmdNext_Click"
                                                                                        class="title" ImageUrl="~/Images/right.jpg" ToolTip="Next" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                    <asp:ImageButton ID="cmdLast" runat="server" Text=" &raquo; " OnClick="cmdLast_Click"
                                                                                        class="title" ImageUrl="~/Images/last.jpg" ToolTip="Last" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:DataList ID="DLProduct" runat="server" RepeatColumns="4" RepeatDirection="Horizontal"
                                                            HorizontalAlign="Left" CellPadding="2" CellSpacing="2" OnItemDataBound="DLProduct_ItemDataBound">
                                                            <SeparatorStyle HorizontalAlign="Left" />
                                                            <ItemTemplate>
                                                                <table width="100%" border="0" cellpadding="0" cellspacing="1" class="disccription-table">
                                                                    <tr>
                                                                        <td colspan="3" align="center" valign="top" class="h2" style="background-color: #005621;">
                                                                            <asp:Label ID="lblheader" runat="server" Text='<%# Eval("EquipmentName") %>'> </asp:Label>
                                                                            <asp:HiddenField ID="hdnEquipmentMasterId" Value='<%# Eval("EquipmentMasterId") %>'
                                                                                runat="server" />
                                                                            <asp:HiddenField ID="hdnTempratureLowerLowerLimit" Value='<%# Eval("TempratureLowerLowerLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnTempratureLowerLimit" Value='<%# Eval("TempratureLowerLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnTempratureUpperLimit" Value='<%# Eval("TempratureUpperLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnTempratureUpperUpperLimit" Value='<%# Eval("TempratureUpperUpperLimit") %>' runat="server" />
                                                                            
                                                                            <asp:HiddenField ID="hdnHumidityLowerLowerLimit" Value='<%# Eval("HumidityLowerLowerLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnHumidityLowerLimit" Value='<%# Eval("HumidityLowerLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnHumidityUpperLimit" Value='<%# Eval("HumidityUpperLimit") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnHumidityUpperUpperLimit" Value='<%# Eval("HumidityUpperUpperLimit") %>' runat="server" />
                                                                            
                                                                            <asp:HiddenField ID="hdnEquipmentTypeGroup" Value='<%# Eval("EquipmentTypeGroup") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnParameterType1" Value='<%# Eval("ParameterType1") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnParameterType2" Value='<%# Eval("ParameterType2") %>' runat="server" />
                                                                            <asp:HiddenField ID="hdnVersion" Value='<%# Eval("Version") %>' runat="server" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td width="40%" height="25" align="left" valign="middle" class="h4">
                                                                            Status
                                                                        </td>
                                                                        <td colspan="2" height="25" align="center" valign="middle" class="h4">
                                                                            <asp:HiddenField ID="hdListViewStatus" Value='<%# Eval("EquipmentOnlineStatus") %>'
                                                                                runat="server" />
                                                                            <asp:Image ID="imgListViewStatus" runat="server" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td width="40%" height="25" align="left" valign="middle" style="border-color: #005621;
                                                                            border-width: 2px; background-color: #e3f9df;" class="h3">
                                                                            Parameter
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="h4">
                                                                            SV
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="h4">
                                                                            PV
                                                                        </td>
                                                                    </tr>
                                                                    <tr runat="server" id="trParameter1" >
                                                                        <td width="40%" height="25" align="left" valign="middle" style="border-color: #005621;
                                                                            border-width: 2px; background-color: #e3f9df;" class="h3">
                                                                            <asp:Label ID="lblParameterName1" runat="server" Text='<%# Eval("ParameterName1") %>'></asp:Label>
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="h4">
                                                                            <asp:Label ID="lblTempratureSetValue" runat="server" Text='<%# Eval("TempratureSetValue") %>'></asp:Label>
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="real-time-summary-text2" id="td1" runat="server">
                                                                            <asp:Label ID="lblParameterRealValue1" runat="server" Text='<%# Eval("ParameterRealValue1") %>' Width="100%" Height="25px"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                    <tr runat="server" id="trParameter2">
                                                                        <td width="40%" height="25" align="left" valign="middle" style="border-color: #005621;
                                                                            border-width: 2px; background-color: #e3f9df;" class="h3">
                                                                            <asp:Label ID="lblParameterName2" runat="server" Text='<%# Eval("ParameterName2") %>'></asp:Label>
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="h4">
                                                                            <asp:Label ID="lblHumiditySetValue" runat="server" Text='<%# Eval("HumiditySetValue") %>'></asp:Label>
                                                                        </td>
                                                                        <td width="30%" height="25" align="center" valign="middle" class="real-time-summary-text2" id="td2" runat="server">
                                                                            <asp:Label ID="lblParameterRealValue2" runat="server" Text='<%# Eval("ParameterRealValue2") %>' Width="100%"  Height="25px"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Wrap="True" />
                                                        </asp:DataList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:Panel ID="pnlPagingBottom" runat="server" Visible="True">
                                                            <table width="252" align="right" cellpadding="3" cellspacing="1" class="page-brd">
                                                                <tr>
                                                                    <td class="tablegreybg">
                                                                        <table width="100%" align="center" cellspacing="0">
                                                                            <tr>
                                                                                <td width="30%" height="25" align="right">
                                                                                    <asp:ImageButton ID="cmdFirstBottom" runat="server" Text=" &laquo; " OnClick="cmdFirst_Click"
                                                                                        class="title" ImageUrl="~/Images/previous.jpg" ToolTip="First" Height="30px"
                                                                                        Width="30px"></asp:ImageButton>
                                                                                    <asp:ImageButton ID="cmdPrevBottom" runat="server" Text=" &#8249; " OnClick="cmdPrev_Click"
                                                                                        class="title" ImageUrl="~/Images/left.jpg" ToolTip="Previous" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                </td>
                                                                                <td width="40%" align="center" class="txtblack">
                                                                                    <asp:DataList ID="dlPagingBottom" runat="server" RepeatDirection="Horizontal" OnItemCommand="dlPaging_ItemCommand"
                                                                                        OnItemDataBound="dlPaging_ItemDataBound">
                                                                                        <ItemTemplate>
                                                                                            <asp:LinkButton ID="lnkbtnPaging" runat="server" ForeColor="Blue" CommandArgument='<%# Eval("PageIndex") %>'
                                                                                                CommandName="Paging" Text='<%# Eval("PageText") %>'></asp:LinkButton>&nbsp;
                                                                                        </ItemTemplate>
                                                                                    </asp:DataList>
                                                                                </td>
                                                                                <td width="40%" align="left">
                                                                                    <asp:ImageButton ID="cmdNextBottom" runat="server" Text=" &#8250; " OnClick="cmdNext_Click"
                                                                                        class="title" ImageUrl="~/Images/right.jpg" ToolTip="Next" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                    <asp:ImageButton ID="cmdLastBottom" runat="server" Text=" &raquo; " OnClick="cmdLast_Click"
                                                                                        class="title" ImageUrl="~/Images/last.jpg" ToolTip="Last" Height="30px" Width="30px">
                                                                                    </asp:ImageButton>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:Timer ID="tmrGrid" runat="server" Interval="1000" Enabled="true" OnTick="tmrGrid_Tick">
                                            </asp:Timer>
                                            <%--</ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="tmrGrid" EventName="Tick" />
                                        </Triggers>
                                    </asp:UpdatePanel>--%>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    </form>

    <script type="text/javascript">

        var xPos, yPos;
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequestHandler);
        function BeginRequestHandler(sender, args) {
            xPos = $get('<%=divChildBody.ClientID %>').scrollLeft;
            yPos = $get('<%=divChildBody.ClientID %>').scrollTop;
        }
        function EndRequestHandler(sender, args) {
            $get('<%=divChildBody.ClientID %>').scrollLeft = xPos;
            $get('<%=divChildBody.ClientID %>').scrollTop = yPos;
        }
    </script>

</body>
</html>
