<%@ page language="C#" autoeventwireup="true" inherits="DataArchive, App_Web_dataarchive.aspx.de3fb1ff" 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 language="javascript" src="App_Include/JavaScript/js_functions.js"> </script>--%>

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

    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/FCalender.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;
            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";
            }

        }

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

            if (doc.cmbInstrument.selectedIndex == 0) {
                alert("Select Instrument...");
                doc.cmbInstrument.focus();
                return false;
            }
            if (Trim(doc.hdnGRowCount.value) == "0") {
                alert("No Records Available...");
                return false;
            }
            else {
                return true;
            }
        }
        function validatePrint() {
            var doc = document.forms[0];
            if (doc.cmbInstrument.selectedIndex == 0) {
                alert("Select Instrument...");
                doc.cmbInstrument.focus();
                return false;
            }
            if (Trim(doc.hdnGRowCount.value) == "0") {
                alert("No Records Available...");
                return false;
            }
            else {
                return true;
            }

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

            if (doc.cmbBranchId.selectedIndex == 0) {
                alert("Select Department Name...");
                doc.cmbBranchId.focus();
                return false;
            }
            else {
                return true;
            }
        }

    </script>

    <style type="text/css">
        .modalBackground
        {
            background-color: #e6e6e6;
            filter: alpha(opacity=60);
            opacity: 0.60;
        }
    </style>
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); 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%">
                    <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="" />
                            <asp:HiddenField ID="hdnRecordKeys" runat="server" Value="" />
                            <asp:HiddenField ID="hdnGRowCount" runat="server" Value="0" />
                            <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="Data Archive" Width="100%" Font-Bold="true"
                                            Font-Names="Tahoma" ForeColor="AntiqueWhite" Font-Size="Medium"></asp:Label>
                                    </td>
                                </tr>
                                <tr height="45px">
                                    <td>
                                        &nbsp
                                    </td>
                                </tr>
                            </table>
                            <div id="divChildBody" runat="server" style="overflow: auto; width: 99%;">
                                <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                    <tr>
                                        <td width="15%" align="left" valign="top">
                                            Department Name*
                                        </td>
                                        <td width="35%" align="left">
                                            <asp:DropDownList ID="cmbBranchId" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cmbBranchId_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                        <td width="0%" align="left">
                                        </td>
                                        <td width="15%" align="left" valign="top">
                                        </td>
                                        <td width="35%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" height="5px">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="15%" align="left">
                                            Data Archive Date <=
                                        </td>
                                        <td width="35%" align="left">
                                            <asp:TextBox ID="txtDate" runat="server" CssClass="dateInput" MaxLength="20" ToolTip="Format : [ddmmyyyy], [d] or [dd], [ddm] or [ddmm], [ ]"
                                                Width="25%" ReadOnly="true"></asp:TextBox>
                                            <%--<img id="imgCal1" style="cursor: pointer;" runat="server" alt="Click to Show Calendar"
                                                align="middle" src="../Images/date.gif" visible="false" />
                                            <asp:CalendarExtender ID="cal1" runat="server" PopupButtonID="imgCal1" TargetControlID="txtDate"
                                                Format="dd-MMM-yyyy" CssClass="zcCalendar" Enabled="True">
                                            </asp:CalendarExtender>--%>
                                        </td>
                                        <td colspan="3" align="left">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" align="center">
                                            <asp:Button ID="btnArchive" runat="server" Text="Archive" OnClick="btnArchive_Click" />
                                            <asp:Button ID="hiddenButton" runat="server" Style="display: none" />
                                            <asp:ModalPopupExtender ID="modalProgress" runat="server" PopupControlID="pnlWait"
                                                TargetControlID="hiddenButton" BackgroundCssClass="modalBackground">
                                            </asp:ModalPopupExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" align="center">
                                            <img src="../Images/DataArchiveBG.png" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
                <div>
                    <asp:Panel ID="pnlWait" runat="server">
                        <table>
                            <tr>
                                <td>
                                    <img src="../Images/AnimatedProgressBar.gif" border="0" />
                                    <asp:Label ID="lblloading" runat="server" Text="...Please Wait..." CssClass="blink-text"
                                        Width="100%"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </div>
            </td>
        </tr>
    </table>
    </form>

    <script type="text/javascript">

        Sys.Net.WebRequestManager.add_invokingRequest(onInvoke);
        Sys.Net.WebRequestManager.add_completedRequest(onComplete);

        function onInvoke(sender, args) {
            $find('<%= modalProgress.ClientID %>').show();
        }

        function onComplete(sender, args) {
            $find('<%= modalProgress.ClientID %>').hide();
        }

        function pageUnload() {
            Sys.Net.WebRequestManager.remove_invokingRequest(onInvoke);
            Sys.Net.WebRequestManager.remove_completedRequest(onComplete);
        }

    </script>

</body>
</html>
