<%@ page language="C#" autoeventwireup="true" inherits="ComponentRunningHours, App_Web_componentrunninghours.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="../FusionCharts/FusionCharts.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];

            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="Running Hours" 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="Conditional">
                        <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="" />
                            <asp:HiddenField ID="hdnVersion" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnEquipmenttypeGroup" runat="server" Value="0" />
                            <div id="divChildBody" runat="server" style="overflow: auto; width: 99%;">
                                <table width="100%" style="vertical-align: top;" align="left" cellpadding="1" cellspacing="0"
                                    border="0">
                                    <tr>
                                        <td>
                                            <table>
                                                <tr>
                                                    <td width="20%" align="left" valign="top">
                                                        Equipment
                                                    </td>
                                                    <td width="80%">
                                                        <asp:DropDownList ID="cmbInstrument" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cmbInstrument_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <br />
                                        </td>
                                    </tr>
                                    <asp:Panel ID="pnlData" runat="server" Visible="true">
                                        <tr>
                                            <td class="real-time-summary-bg">
                                                <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td width="60%" align="left" valign="middle">
                                                            <table width="100%" border="0" cellspacing="2" cellpadding="2" style="background-color: #043c23;">
                                                                <tr>
                                                                    <td width="100%" align="left" valign="top" class="h5">
                                                                        Component Running Hours
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" valign="top">
                                                                        <table width="100%" border="0" cellspacing="1" cellpadding="1" style="background-color: #fff;">
                                                                            <tr>
                                                                                <td>
                                                                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                                                                        <ContentTemplate>
                                                                                            <asp:Timer ID="tmrTemp" runat="server" Interval="1000" Enabled="true" OnTick="tmrTemp_Tick">
                                                                                            </asp:Timer>
                                                                                            <asp:DataList ID="DLCRH" runat="server" RepeatColumns="1" RepeatDirection="Vertical"
                                                                                                BorderColor="#336699" BorderStyle="Solid" BorderWidth="0px" HorizontalAlign="Left"
                                                                                                CellPadding="1" CellSpacing="1" OnItemDataBound="DLCRH_ItemDataBound" Style="table-layout: auto;"
                                                                                                HeaderStyle-Width="10%">
                                                                                                <SeparatorStyle HorizontalAlign="Left" BorderColor="Black" BorderStyle="Solid" />
                                                                                                <ItemTemplate>
                                                                                                    <table width="100%" border="0" cellspacing="1" cellpadding="1">
                                                                                                        <tr>
                                                                                                            <td height="25" align="center" valign="middle" class="real-time-summary-text1">
                                                                                                                <asp:CheckBox ID="chkId" runat="server" AutoPostBack="true" OnCheckedChanged="chkId_SelectedIndexChanged" />
                                                                                                            </td>
                                                                                                            <td width="45%" height="25" align="left" valign="middle" class="real-time-summary-text1">
                                                                                                                <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' Width="100%" Style="word-break: break-all;"></asp:Label>
                                                                                                            </td>
                                                                                                            <td width="25%" height="25" align="center" valign="middle" id="td" runat="server">
                                                                                                                <strong>
                                                                                                                    <asp:Label ID="lblValue" runat="server" Text='<%# Eval("Value") %>' Width="100%"
                                                                                                                        Style="word-break: break-all;"></asp:Label></strong>
                                                                                                            </td>
                                                                                                            <td width="25%" height="25" align="center" valign="middle" class="real-time-summary-text1">
                                                                                                                <asp:Label ID="lblRunHours" runat="server" Text='<%# Eval("RunHours") %>' Width="100%"
                                                                                                                    Style="word-break: break-all;"></asp:Label>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </table>
                                                                                                </ItemTemplate>
                                                                                                <AlternatingItemStyle VerticalAlign="Top" />
                                                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10%" Wrap="True" />
                                                                                            </asp:DataList>
                                                                                        </ContentTemplate>
                                                                                        <Triggers>
                                                                                        </Triggers>
                                                                                    </asp:UpdatePanel>
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="center" class="real-time-summary-bg">
                                                                        <asp:Button ID="btnReset" runat="server" Text="Reset" OnClick="btnReset_Click" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td width="40%" align="left" valign="middle">
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="100%" align="left" valign="middle" colspan="2">
                                                            <asp:Panel runat="server" ID="pnlWriteEvent" ScrollBars="Auto" Width="100%" Visible="false">
                                                                <table class="tablebg" id="Table2" cellspacing="1" cellpadding="1" width="100%" border="0">
                                                                    <tr>
                                                                        <td class="GRIDTITLE" align="left" style="height: 15px">
                                                                            Equipment Write Status
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="tableInnerTr" valign="top" align="center">
                                                                            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                                                                                <ContentTemplate>
                                                                                    <asp:Timer ID="Timer1" runat="server" Interval="5000" Enabled="true" OnTick="Timer1_Tick">
                                                                                    </asp:Timer>
                                                                                    <asp:GridView ID="GVEquipmentWriteStatus" Width="100%" runat="server" CellPadding="0"
                                                                                        CellSpacing="0" AllowSorting="True" AutoGenerateColumns="False" AlternatingRowStyle-CssClass="DGR_ALTERNATE"
                                                                                        OnRowDataBound="ItemDataBoundWriteStatus" RowStyle-CssClass="DGR_ITEM" HeaderStyle-CssClass="DGR_HEADER"
                                                                                        BorderColor="#E0E4EA" HeaderStyle-Height="25px">
                                                                                        <HeaderStyle CssClass="DGR_FIXEDHEADER" />
                                                                                        <Columns>
                                                                                            <asp:TemplateField HeaderStyle-CssClass="">
                                                                                                <HeaderTemplate>
                                                                                                </HeaderTemplate>
                                                                                                <ItemTemplate>
                                                                                                    <asp:CheckBox ID="chkRecordId" runat="server"></asp:CheckBox>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                                                                                                <HeaderStyle HorizontalAlign="Center" Width="10px" CssClass="DGR_HEADER" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:BoundField DataField="EquipmentMasterWriteId" HeaderText="EquipmentMasterWriteId">
                                                                                                <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                                                                <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="EquipmentMasterId" HeaderText="EquipmentMasterId">
                                                                                                <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                                                                <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="EquipmentName" HeaderText="Equipment Name" ItemStyle-HorizontalAlign="Left">
                                                                                                <HeaderStyle Width="15%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="15%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="LogDatetime" HeaderText="Write Date time" ItemStyle-HorizontalAlign="Center">
                                                                                                <HeaderStyle Width="15%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="15%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="SettingParameterLabel" HeaderText="Parameter Label" ItemStyle-HorizontalAlign="Left">
                                                                                                <HeaderStyle Width="20%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="20%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="SettingParameterType" HeaderText="Parameter Type" ItemStyle-HorizontalAlign="Center">
                                                                                                <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                                                                <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="SettingParameterValue" HeaderText="Parameter Value" ItemStyle-HorizontalAlign="Center">
                                                                                                <HeaderStyle Width="15%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="15%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="Status" HeaderText="Status" ItemStyle-HorizontalAlign="Center">
                                                                                                <HeaderStyle Width="10%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="10%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="StatusDescription" HeaderText="Status Description" ItemStyle-HorizontalAlign="Center">
                                                                                                <HeaderStyle Width="25%" CssClass="DGR_HEADER"></HeaderStyle>
                                                                                                <ItemStyle Width="25%"></ItemStyle>
                                                                                            </asp:BoundField>
                                                                                        </Columns>
                                                                                        <RowStyle CssClass="DGR_ITEM" />
                                                                                        <HeaderStyle CssClass="DGR_FIXEDHEADER" />
                                                                                        <AlternatingRowStyle CssClass="DGR_ALTERNATE" />
                                                                                        <PagerSettings Position="TopAndBottom" />
                                                                                    </asp:GridView>
                                                                                </ContentTemplate>
                                                                                <Triggers>
                                                                                </Triggers>
                                                                            </asp:UpdatePanel>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td align="center" class="whitebg">
                                                                            <asp:Button ID="BtnCancel" runat="server" CssClass="buttonbg" Width="80px" Height="25px"
                                                                                Text="Cancel" BorderWidth="0px" OnClick="BtnCancel_Click"></asp:Button>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </asp:Panel>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" valign="top" colspan="2">
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </asp:Panel>
                                </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>
