<%@ page language="C#" autoeventwireup="true" inherits="SetSpeedTimer, App_Web_setspeedtimer.aspx.dbcc866c" enableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControls/iERPSaveBar.ascx" TagName="iERPSaveBar" 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) - 10) + "px";
                //cObj.style.width = parseInt(w) +"px";
            }

            //            var cObj = document.getElementById("PanelSearchEntry");
            //            if (cObj != null)
            //            {
            //                cObj.style.height = (parseInt(h)-5) + "px";
            //            }
            //            
            //            
            //            var cObjTab = document.getElementById("tabInstrument");
            //            if (cObjTab != null) {
            //                //cObj.style.height = parseInt((h*79)/100) +"px";
            //                cObjTab.style.height = (parseInt(h) - 195) + "px";
            //                //cObj.style.width = parseInt(w) +"px";
            //            }

            hideWait();
        }

        function validateRecord() {
            var doc = document.forms[0];
            re = /[0-9]/;
            re1 = /[a-zA-Z]/;

            return true;
        }
        function GetSelectedSearch() {
            var grid = document.getElementById("<%#GVSearch.ClientID %>");
            //variable to contain the cell of the grid
            var cell;
            var hdnRecordKeys = document.getElementById("<%#hdnRecordKeys.ClientID %>");
            var hdnRecordRows = document.getElementById("<%#hdnRecordRows.ClientID %>");
            hdnRecordKeys.value = "";
            hdnRecordRows.value = "";
            if (grid.rows.length > 0) {
                //loop starts from 1. rows[0] points to the header.
                for (i = 1; i < grid.rows.length; i++) {
                    //get the reference of first column
                    cell = grid.rows[i].cells[0];

                    //loop according to the number of childNodes in the cell
                    for (j = 0; j < cell.childNodes.length; j++) {
                        //if childNode type is CheckBox                 
                        if (cell.childNodes[j].type == "checkbox") {
                            //assign the status of the Select All checkbox to the cell checkbox within the grid
                            //cell.childNodes[j].checked = document.getElementById(id).checked;

                            if (cell.childNodes[j].checked == true) {
                                if (hdnRecordKeys.value != "")
                                    hdnRecordKeys.value += ",";

                                hdnRecordKeys.value += (grid.rows[i].cells[1].textContent || grid.rows[i].cells[1].innerText || grid.rows[i].cells[1].text);

                                if (hdnRecordRows.value != "")
                                    hdnRecordRows.value += ",";
                                hdnRecordRows.value += (parseInt(i) - 1).toString();
                            }
                        }
                    }
                }
            }
        }
        function ShowPnlEdit() {
            var cObj = document.getElementById("divEdit");
            if (cObj != null) {
                cObj.style.visibility = "visible";
                cObj.style.display = "block";
            }
        }
        function HidePnlEdit() {
            var cObj = document.getElementById("divEdit");
            if (cObj != null) {
                cObj.style.visibility = "hidden";
                cObj.style.display = "none";
            }
        }
        

    </script>

</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); resizeHolder(); init(); initScreenSaver('1',<%=Session["AutoLogOutTime"]%>);">
    <form id="Form1" runat="server" class="formbg">
    <asp:ToolkitScriptManager runat="Server" EnablePartialRendering="true" AsyncPostBackTimeout="0"
        ID="ToolkitScriptManager1" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" class="formbg">
        <tr>
            <td valign="top" align="left">
                <div id="divMainBody" align="center" runat="server" width="100%" height="100%">
                    <div id="divHeader" runat="server" style="border-style: none; height: 26px; width: 100%;
                        position: absolute; left: 1px; top: 8px;" align="center">
                        <dsip:iERPSaveBar ID="iERPSaveBar1" runat="server" Caption="Transaction Maintainence"
                            PageAccess="11111" ValidateLogin="true" />
                    </div>
                    <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="hdnSearchName" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchQuery" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchDelete" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchKey" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchPara" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchValue" runat="server" Value="" />
                            <asp:HiddenField ID="hdnRecordKeys" runat="server" Value="" />
                            <asp:HiddenField ID="hdnRecordRows" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchGridPageNo" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnSearchComboValue" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnSearchTextValue" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchcmbSearchValue" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchcmbValue" runat="server" Value="" />
                            <asp:HiddenField ID="hdnSearchdllValue" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBookMode" runat="server" Value="" />
                            <asp:HiddenField ID="hdnLoginComments" runat="server" Value="" />
                            <asp:HiddenField ID="hdnUserName" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnActionName" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnActionStatus" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnCurrentStatus" runat="server" Value="0" />
                            <div id="divChildBody" runat="server" style="overflow: auto; width: 99%;">
                                <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                    <tr height="62px">
                                        <td colspan="3">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="left">
                                            Filter
                                        </td>
                                        <td width="30%" align="left" valign="top">
                                            <asp:DropDownList ID="cmbSearch" runat="server" Width="100%" onChange="setComboValue(this);">
                                                <asp:ListItem Value="0">Search Option</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <td width="60%">
                                            <asp:TextBox ID="txtSearch" runat="server" Width="70%" AutoPostBack="false"></asp:TextBox>
                                            &nbsp;&nbsp;Page Size&nbsp;
                                            <asp:TextBox ID="txtGridPageSize" runat="server" CssClass="numInput" Width="10%"
                                                MaxLength="5">25</asp:TextBox>
                                            <asp:Button ID="btnDblclickRow" runat="server" BorderWidth="0px" Height="0px" Style="visibility: hidden;"
                                                Width="0px" Text="" OnClick="btnDblclickRow_Click" />
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                    <tr>
                                        <td>
                                            <asp:TabContainer ID="tabInstrument" runat="server" ActiveTabIndex="0" ScrollBars="Auto"
                                                CssClass="tabCont">
                                                <asp:TabPanel ID="tabInstrumentList" runat="server" TabIndex="1">
                                                    <HeaderTemplate>
                                                        Equipment List
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                                            <tr>
                                                                <td>
                                                                    <tr>
                                                                        <td class="frametitle" align="center" style="height: 20px" width="99%">
                                                                            <font size="2"><b>Reset Shaker Speed
                                                                                </b>&nbsp;<strong>[Records Found :
                                                                                    <asp:Label ID="lblRecCount" runat="server"></asp:Label>]</strong> </font>
                                                                        </td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td align="left">
                                                                            <asp:Panel ID="PanelSearchEntry" runat="server" ScrollBars="Auto" Width="99%" CssClass="panelgrid">
                                                                                <asp:GridView ID="GVSearch" Width="100%" runat="server" CellPadding="0" AllowPaging="True"
                                                                                    AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="SearchRowDataBound"
                                                                                    OnPageIndexChanging="SearchChangePage" OnSorting="SearchSortRecords" BorderColor="#E0E4EA">
                                                                                    <Columns>
                                                                                        <asp:TemplateField>
                                                                                            <HeaderTemplate>
                                                                                                <asp:CheckBox ID="chkAll" onclick="javascript:SelectAllCheckboxes(this);GetSelectedSearch();"
                                                                                                    runat="server" AutoPostBack="false" ToolTip="Select/Deselect All"></asp:CheckBox>
                                                                                            </HeaderTemplate>
                                                                                            <ItemTemplate>
                                                                                                <asp:CheckBox ID="chkRecordId" runat="server" onclick="GetSelectedSearch();"></asp:CheckBox>
                                                                                            </ItemTemplate>
                                                                                            <ItemStyle HorizontalAlign="Center" />
                                                                                            <HeaderStyle HorizontalAlign="Center" CssClass="DGR_HEADER" />
                                                                                        </asp:TemplateField>
                                                                                    </Columns>
                                                                                    <RowStyle CssClass="DGR_ITEM" />
                                                                                    <HeaderStyle CssClass="DGR_FIXEDHEADER" Height="25px" />
                                                                                    <AlternatingRowStyle CssClass="DGR_ALTERNATE" />
                                                                                    <PagerSettings Position="TopAndBottom" />
                                                                                </asp:GridView>
                                                                            </asp:Panel>
                                                                        </td>
                                                                    </tr>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ContentTemplate>
                                                </asp:TabPanel>
                                                <asp:TabPanel ID="TabPanel1" runat="server" TabIndex="1">
                                                    <HeaderTemplate>
                                                        Equipment Write Event
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <asp:Panel runat="server" ID="pnlWriteEvent" ScrollBars="Auto" Width="100%" Visible="true">
                                                            <table class="tablebg" id="Table2" cellspacing="1" cellpadding="1" width="99%" 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: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" />
                                                                                </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%"></HeaderStyle>
                                                                                    <ItemStyle Width="15%"></ItemStyle>
                                                                                </asp:BoundField>
                                                                                <asp:BoundField DataField="LogDatetime" HeaderText="Write Date time" ItemStyle-HorizontalAlign="Center">
                                                                                    <HeaderStyle Width="15%"></HeaderStyle>
                                                                                    <ItemStyle Width="15%"></ItemStyle>
                                                                                </asp:BoundField>
                                                                                <asp:BoundField DataField="SettingParameterLabel" HeaderText="Parameter Label" ItemStyle-HorizontalAlign="Left">
                                                                                    <HeaderStyle Width="20%"></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%"></HeaderStyle>
                                                                                    <ItemStyle Width="15%"></ItemStyle>
                                                                                </asp:BoundField>
                                                                                <asp:BoundField DataField="Status" HeaderText="Status" ItemStyle-HorizontalAlign="Center">
                                                                                    <HeaderStyle Width="10%"></HeaderStyle>
                                                                                    <ItemStyle Width="10%"></ItemStyle>
                                                                                </asp:BoundField>
                                                                                <asp:BoundField DataField="StatusDescription" HeaderText="Status Description" ItemStyle-HorizontalAlign="Center">
                                                                                    <HeaderStyle Width="25%"></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>
                                                                    </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>
                                                        <asp:UpdatePanel ID="upnlTimer1" UpdateMode="Conditional" runat="server">
                                                            <ContentTemplate>
                                                                <asp:Timer ID="Timer1" runat="server" Interval="5000" Enabled="false" OnTick="Timer1_Tick">
                                                                </asp:Timer>
                                                            </ContentTemplate>
                                                            <Triggers>
                                                                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
                                                            </Triggers>
                                                        </asp:UpdatePanel>
                                                    </ContentTemplate>
                                                </asp:TabPanel>
                                            </asp:TabContainer>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="divEdit" runat="server" align="center" style="width: 100%; height: 1500px;
                                top: 0px; left: 0px; position: absolute; visibility: visible; display: block;
                                z-index: 1; background-color: #333333; padding-left: 10%; text-align: center;
                                vertical-align: middle; filter: alpha(opacity=90); opacity: 0.90;">
                                <br />
                                <br />
                                <br />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
