<%@ page language="C#" masterpagefile="~/MasterPages/Main.master" autoeventwireup="true" inherits="Business_Monitor, App_Web_monitor.aspx.36edc644" viewStateEncryptionMode="Always" maintainScrollPositionOnPostBack="true" %>

<%@ Register Src="../UserControls/DatePicker.ascx" TagName="DatePicker" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .buttonload {
	        border-style: none;
	        font-family: Arial, Helvetica, sans-serif;
	        font-size: 11px;
	        background-image: url('../images/Ar/Btn_L_Normal.gif');
	        border: none;
	        color: #003366;
	        width: 100px;
	        background-color: #FFFFFF;
	        font-weight: bold;
            padding: 2px 0px 3px 0px;
        }
    </style>
    <script language ="javascript" type ="text/javascript" >
    function toggleDropDownList(checkBox) {
        document.getElementById('<%=ddlFiles.ClientID %>').disabled = checkBox.checked;
        document.getElementById('<%=btnStart.ClientID %>').disabled = !checkBox.checked;
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table class="body_MainTB" border="0" cellpadding="0" cellspacing="0">
        <tr align="center">
            <td valign="top">
                <!------------------------------------body St  ---------------------------------------------->
                <table border="0" cellpadding="0" cellspacing="0" class="body_formTitle">
                    <tr>
                        <td>Job Monitor
                        </td>
                    </tr>
                </table>
                <br>
                <table width="100%" class="tabTb" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left">
                            <table border="0" cellpadding="0" cellspacing="0" dir="ltr">
                                <tr>
                                    <td class="on">
                                        <a href="#">Load Jobs</a>
                                    </td>
                                    <td class="onEnd"></td>
                                    <td class="off">
                                        <a href="MonitorRecon.aspx">Recon Jobs</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                    <td class="off">
                                        <a href="MonitorHistory.aspx">Job History</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                    <td class="off">
                                        <a href="MonitorEJ.aspx">EJ Job History</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                    <td class="off">
                                        <a href="MonitorRevent.aspx">Revert Jobs</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                    <td class="off">
                                        <a href="MonitorPOS.aspx">Settlement</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                    <td class="off">
                                        <a href="MonitorHistoryPOS.aspx">Settl History</a>
                                    </td>
                                    <td class="offEndLast"></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <!------------------------------------body End1 ----------------------------------------------->
                <table border="0" cellpadding="0" cellspacing="0" class="contTB">
                    <tr>
                        <td align="center">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="Frow">
                                <tr>
                                    <td></td>
                                </tr>
                            </table>
                            <asp:Panel ID="pnlGrid" runat="server" Width="100%">
                                <asp:Label ID="Label1" runat="server" Text="" class="fieldError"></asp:Label>
                                <table border="0" cellpadding="0" cellspacing="0" class="grid_TitleBG_B">
                                    <tr>
                                        <td>Job Status
                                        </td>
                                    </tr>
                                </table>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <asp:UpdateProgress ID="UpdateProgress1" runat="server"
                                            AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
                                            <ProgressTemplate>
                                                <img alt="Loading" src="../Images/ajax-loader.gif" />
                                            </ProgressTemplate>
                                        </asp:UpdateProgress>
                                        <asp:GridView ID="GridView1" CssClass="gridMaster" Width="100%" runat="server"
                                            AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None"
                                            EmptyDataText="There are no Jobs" OnRowDataBound="GridView1_RowDataBound">
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                            <Columns>
                                                <asp:BoundField DataField="display_name" HeaderText="Job Name" />
                                                <asp:BoundField DataField="last_run_date" HeaderText="Last Run Date" />
                                                <asp:BoundField DataField="start_method" HeaderText="Start Method" />
                                                <asp:BoundField DataField="started_by" HeaderText="Started By" />
                                                <asp:BoundField DataField="end_date" HeaderText="End Date" />
                                                <asp:BoundField DataField="file_name" HeaderText="File name" />
                                                <asp:BoundField DataField="status" HeaderText="status" />
                                                <asp:BoundField DataField="response" HeaderText="Response" />
                                            </Columns>
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="Black" />
                                            <EditRowStyle BackColor="#999999" />
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                        </asp:GridView>
                                        <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">
                                        </asp:Timer>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </asp:Panel>

                            <br />
                            <fieldset id="addItem">
                                <legend id="addItem">Load Job</legend>
                            </fieldset>
                            <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                <tr>
                                    <td class="tdNormal">Job Type
                                    </td>
                                    <td colspan="4">
                                        <asp:RadioButton ID="rdtypeConfig" runat="server" GroupName="jobtype" Text="Config" AutoPostBack="True" OnCheckedChanged="rdtypeConfig_CheckedChanged" />&nbsp;&nbsp;
                                        <asp:RadioButton ID="rdtypeRegular" runat="server" GroupName="jobtype" Text="Regular" Checked="True" AutoPostBack="True" OnCheckedChanged="rdtypeRegular_CheckedChanged" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal">Job Name
                                    </td>
                                    <td colspan="4">
                                        <asp:DropDownList ID="ddlJobs" runat="server" DataTextField="display_name" Width="250px"
                                            DataValueField="job_name" class="fieldNormal" AutoPostBack="True" OnSelectedIndexChanged="ddlJobs_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr id="LoadAll" runat="server">
                                    <td class="tdNormal">&nbsp;</td>
                                    <td colspan="4">
                                        <%--<asp:CheckBox ID="chkAll" runat="server" AutoPostBack="True" 
                                            oncheckedchanged="CheckBox1_CheckedChanged" Text="Load all" onclick="toggleDropDownList(this);" />--%>
                                        <asp:CheckBox ID="chkAll" runat="server" Text="Load all" onclick="toggleDropDownList(this);" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal">File Type
                                    </td>
                                    <td colspan="4">
                                        <asp:DropDownList ID="ddlFiles" runat="server" DataTextField="file_type" Width="250px"
                                            DataValueField="file_type" class="fieldNormal" AutoPostBack="True" OnSelectedIndexChanged="ddlFiles_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdNormal">Date
                                    </td>
                                    <td>
                                        <uc1:DatePicker ID="DatePicker1" runat="server" width="250" />
                                    </td>
                                    <td class="tdNormal"></td>
                                    <td class="tdNormal"></td>
                                    <td class="tdNormal"></td>
                                </tr>
                            </table>

                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="add_ItemTB">
                                        <tr>
                                            <td class="tdNormal" style="text-align: center" colspan="5">
                                                <asp:Label ID="lblError" runat="server" class="fieldError"></asp:Label>
                                            </td>
                                        </tr> 
                                        <tr id="SB" runat="server">
                                            <td colspan="5" style="text-align: center">
                                                <asp:Button ID="btnStart" runat="server" Text="Start" CssClass="Btn_L_Normal" OnClick="btnStart_Click" />
                                            </td>
                                        </tr>
                                        <tr id="LB" runat="server" visible="false">
                                            <td colspan="5" style="text-align: center">
                                                <button class="buttonload">
                                                    Loading &nbsp; <i class="fa fa-refresh fa-spin"></i>
                                                </button>
                                            </td>
                                        </tr>
                                        </table>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                </table>

                <br />
                <!------------------------------------body End2 ----------------------------------------------->
                <br>
            </td>
        </tr>
    </table>
<!------------------------------------body End2 ----------------------------------------------->


</asp:Content>
