<%@ page language="C#" autoeventwireup="true" inherits="MKT, App_Web_mkt.aspx.fe996db7" enableeventvalidation="false" %>

<%@ 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" src="../App_Include/JavaScript/swfobject.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 doc = document.forms[0];
            var w = getBrowserWindowSize().width;
            var h = getBrowserWindowSize().height - 5;


            doc.hdnGWidth.value = w - 100;
            doc.hdnGHeight.value = h - 150;

            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";
            }


            cObj = document.getElementById("<%#PanelSearchEntry.ClientID%>");
            if (cObj != null) {
                cObj.style.height = (parseInt(h) - 200) + "px";
            }
            hideWait();

        }

        function validateRecord() {
            var doc = document.forms[0];
            if (doc.cmbInstrument.selectedIndex == 0) {
                alert("Select Equipment...");
                doc.cmbInstrument.focus();
                return false;
            }
            if (confirm("ARE YOU SURE YOU HAVE VIEWED DATA IN PRINTABLE FORMAT....")) {
                return true;
            }
            else {
                return false;
            }

        }
        function validatePrint() {
            var doc = document.forms[0];
            if (doc.cmbInstrument.selectedIndex == 0) {
                alert("Select Equipment...");
                doc.cmbInstrument.focus();
                return false;
            }
            return true;

        }



        function ShowPnlGraph() {
            var cObj = document.getElementById("divGraph");
            if (cObj != null) {
                cObj.style.visibility = "visible";
                cObj.style.display = "block";
            }
        }
        function HidePnlGraph() {
            var cObj = document.getElementById("divGraph");
            if (cObj != null) {
                cObj.style.visibility = "hidden";
                cObj.style.display = "none";
            }
        }
        function unloadpage() {
            var cObj = document.getElementById("btnUnload");
            if (cObj != null) {
                cObj.click();
            }
        }
               

    </script>
    
     <script type="text/javascript">
                function checkDate(sender, args) {
            if (sender._selectedDate > new Date()) {
                alert("You cannot select a Future date than today!");
                sender._selectedDate = new Date();
                // set the date back to the current date
                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
                        }

        }
    </script>

    <script language="javascript" type="text/javascript">
        function Print(prompt, frame) {

            IdPrint.style.visibility = "hidden";
            factory.printing.portrait = "false";
            factory.printing.Print(true);
            IdPrint.style.visibility = "visible";
        }
    </script>

    <script language="javascript">

        function CloseWindow() {

            window.open('', '_self', '');

            window.close();

        }

    </script>

</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); resizeHolder(); init(); initScreenSaver('1',<%=Session["AutoLogOutTime"]%>);"
    onunload="unloadpage();">
    <object id="factory" style="display: none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
        codebase="../smsx.cab">
    </object>
    <form id="Form1" runat="server" class="tablefont" target="_blank">
    <asp:ToolkitScriptManager runat="Server" EnablePartialRendering="true" AsyncPostBackTimeout="0"
        ID="ToolkitScriptManager1" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" class="tablefont">
        <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:iERPUtilityBar ID="iERPUtilityBar1" runat="server" Caption="Data Log" ValidateLogin="true" />
                    </div>
                    <asp:UpdatePanel ID="uplChildBody" runat="server" UpdateMode="Always">
                        <ContentTemplate>
                            <asp:HiddenField ID="hdnGWidth" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnGHeight" runat="server" Value="0" />
                            <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="hdnRecordKeys" runat="server" Value="" />
                            <asp:HiddenField ID="hdnGRowCount" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnLogType" runat="server" Value="" />
                            <asp:HiddenField ID="hdnReviewedApproved" runat="server" Value="" />
                            <asp:HiddenField ID="hdnFromDateTime" runat="server" Value="" />
                            <asp:HiddenField ID="hdnToDateTime" runat="server" Value="" />
                            <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="5">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="left">
                                            From Date
                                        </td>
                                        <td width="40%" align="left">
                                            <asp:TextBox ID="txtFromDate" runat="server" CssClass="dateInput" MaxLength="20"
                                                onBlur="GetDateField(this);" onFocus="SetDateField(this);" ToolTip="Format : [ddmmyyyy], [d] or [dd], [ddm] or [ddmm], [ ]"
                                                Width="25%"></asp:TextBox>
                                            <img id="imgCal1" style="cursor: pointer;" runat="server" alt="Click to Show Calendar"
                                                align="middle" src="../Images/date.gif" />
                                            <asp:CalendarExtender ID="cal1" runat="server" PopupButtonID="imgCal1" TargetControlID="txtFromDate"
                                                Format="dd-MMM-yyyy" CssClass="zcCalendar" Enabled="True">
                                            </asp:CalendarExtender>
                                        </td>
                                        <td width="0%" align="left">
                                        </td>
                                        <td width="10%" align="left">
                                            To Date
                                        </td>
                                        <td width="40%" align="left">
                                            <asp:TextBox ID="txtToDate" runat="server" CssClass="dateInput" MaxLength="20" onBlur="GetDateField(this);"
                                                onFocus="SetDateField(this);" ToolTip="Format : [ddmmyyyy], [d] or [dd], [ddm] or [ddmm], [ ]"
                                                Width="25%"></asp:TextBox>
                                            <img id="imgCal2" style="cursor: pointer;" runat="server" alt="Click to Show Calendar"
                                                align="middle" src="../Images/date.gif" />
                                            <asp:CalendarExtender ID="cal2" runat="server" PopupButtonID="imgCal2" TargetControlID="txtToDate"
                                                Format="dd-MMM-yyyy" CssClass="zcCalendar" Enabled="True" OnClientDateSelectionChanged="checkDate">
                                            </asp:CalendarExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" height="5px">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%" align="left" valign="middle">
                                            Equipment
                                        </td>
                                        <td width="40%" align="left">
                                            <asp:DropDownList ID="cmbInstrument" runat="server" OnSelectedIndexChanged="cmbInstrument_SelectedIndexChanged"
                                                AutoPostBack="true">
                                            </asp:DropDownList>
                                        </td>
                                        <td width="0%" align="left">
                                        </td>
                                        <td width="10%" align="left" valign="middle">
                                            Action
                                        </td>
                                        <td width="40%">
                                            <asp:DropDownList ID="cmbAction" runat="server">
                                                <asp:ListItem Value="d" Text="Daily" Selected="True"></asp:ListItem>
                                                <asp:ListItem Value="w" Text="Weekly"></asp:ListItem>
                                                <asp:ListItem Value="m" Text="Monthly"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                    <tr>
                                        <td class="frametitle" align="center" style="height: 20px" width="98%">
                                            <font size="2"><b></b>&nbsp;<strong>Equipment Parameters </strong></font>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="PanelSearchEntry" ScrollBars="Auto" runat="server" Visible="true"
                                                HorizontalAlign="Center" Width="99%">
                                                <asp:GridView ID="GVDeviceParameter" Width="100%" runat="server" CellPadding="0"
                                                    AllowSorting="True" AutoGenerateColumns="False" BorderColor="#E0E4EA" OnRowDataBound="ItemDataBound">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                <asp:CheckBox ID="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server"
                                                                    AutoPostBack="false" ToolTip="Select/Deselect All"></asp:CheckBox>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkRecordId" runat="server" AutoPostBack="true" OnCheckedChanged="chkRecordId_SelectedIndexChanged">
                                                                </asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" Width="1%" CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="EquipmentMasterParameterId" HeaderText="EquipmentMasterParameterId">
                                                            <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:TemplateField HeaderText="Name">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblParameterName" runat="server" Text='<%# Eval("ParameterName")%>'
                                                                    MaxLength="25" Width="98%"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Left" Width="70%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Unit" HeaderStyle-HorizontalAlign="Left">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblUnit" runat="server" Text='<%# Eval("ParameterUnit")%>' Width="98%"></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Left" Width="25%" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="rowNum" HeaderText="rowNum">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ParameterName" HeaderText="ParameterName">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ParameterAxis" HeaderText="ParameterAxis">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ParameterColorCode" HeaderText="ParameterColorCode">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ParameterType" HeaderText="ParameterType">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                    </Columns>
                                                    <HeaderStyle CssClass="DGR_FIXEDHEADER" Height="25px" />
                                                    <PagerSettings Position="TopAndBottom" />
                                                    <PagerStyle CssClass="DGR_PAGER"></PagerStyle>
                                                    <RowStyle CssClass="DGR_ITEM" />
                                                </asp:GridView>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
