<%@ Page Title="" Language="C#" AutoEventWireup="false" MasterPageFile="~/SiteMaster.Master" CodeBehind="EventLogViewerPage.aspx.cs" Inherits="MKinsight.Online.UIServices.Support.EventLogViewer.EventLogViewerPage" %>

<%@ Register Assembly="MKinsight.Online.UIServices" Namespace="Geekees.Common.Controls" TagPrefix="ct" %>
<%--<%@ Register Assembly="ASTreeView" Namespace="Geekees.Common.Controls" TagPrefix="ct" %>--%>


<%@ Register Src="../UIControls/PopupsHandler.ascx" TagName="PopupsHandler" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/PopupPanel.ascx" TagName="PopupPanel" TagPrefix="uc5" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="~/UIControls/Interface/DropDownListEX.ascx" TagPrefix="uc1" TagName="DropDownListEX" %>
<%@ Register Src="~/UIControls/Interface/CheckBoxEX.ascx" TagPrefix="uc1" TagName="CheckBoxEX" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">

    <asp:UpdatePanel ID="up_a" runat="server">
        <ContentTemplate>

            <link href="<%:ResolveUrl("~/scripts/ASTJavascript/astreeview/astreeview.css")%>"
                type="text/css" rel="stylesheet" />
            <link href="<%:ResolveUrl("~/scripts/ASTJavascript/asdropdowntreeview/dropdowntreeview.css")%>"
                type="text/css" rel="stylesheet" />

            <script src="<%:ResolveUrl("~/scripts/ASTJavascript/astreeview/astreeview_packed.js")%>"
                type="text/javascript"></script>

            <uc1:Header ID="usc_Header" runat="server" />

            <uc2:MessageBox ID="usc_M" runat="server" />

            <table style="padding: 4px; border-spacing: 4px; width: 100%">
                <tr>
                    <td colspan="2" class="wheader">
                        <asp:Label ID="lbl_SearchFilter" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>

                    <td colspan="2">
                        <asp:Panel ID="pw" runat="server" CssClass="editor">

                            <ct:ASDropDownTreeView ID="astvMyTree" runat="server" BasePath="~/scripts/ASTJavascript/astreeview"
                                DataTableRootNodeValue="0" EnableRoot="false" EnableNodeSelection="false" EnableCheckbox="true"
                                EnableDragDrop="false" EnableTreeLines="true" EnableNodeIcon="true" EnableCustomizedNodeIcon="false"
                                EnableDebugMode="false" EnableRequiredValidator="true" InitialDropdownText="Please select"
                                Width="430" EnableCloseOnOutsideClick="true" EnableHalfCheckedAsChecked="true"
                                RequiredValidatorValidationGroup="vgCheck" EnableContextMenuAdd="false" EnableContextMenu="false"
                                MaxDropdownHeight="200" />
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <uc1:PopupsHandler ID="ph_Users" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <uc1:PopupsHandler ID="ph_Dates" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <uc1:DropDownListEX runat="server" ID="drp_State" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <uc1:CheckBoxEX runat="server" ID="chk_Unrestricted" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <uc1:CheckBoxEX runat="server" ID="chk_Context" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <hr class="ee" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btn_Search" runat="server" OnClick="OnSearch" />
                        <asp:Button ID="btn_Clear" runat="server" />
                </tr>
                <tr>
                    <td colspan="2" class="wheader">
                        <asp:Label ID="lbl_SearchResults" runat="server"></asp:Label>
                    </td>
                </tr>

                <tr>
                    <td colspan="2">
                        <cc4:MKGridView ID="dg_logs" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                            BorderStyle="None" CellPadding="3" 
                            OnRowDataBound="OnRowDataBound" Width="95%">
                            <AlternatingRowStyle CssClass="alternatingrowstyle" />
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
                            <PagerStyle HorizontalAlign="Left" />
                            <Columns>
                                
                                <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
                                <asp:BoundField DataField="Action" HeaderText="Action" SortExpression="Action" />
                                <asp:BoundField DataField="User" HeaderText="User" SortExpression="User" />
                                <asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
                                <asp:BoundField DataField="Details" HeaderText="Details" SortExpression="Details" />
                                <asp:BoundField DataField="Context" HeaderText="Context" SortExpression="Context" />
                                <asp:BoundField DataField="FailMessage" HeaderText="FailReason" SortExpression="FailMessage" />                                
                                <asp:BoundField DataField="UniqueReference" HeaderText="UniqueReference" SortExpression="UniqueReference" />
                                <asp:BoundField DataField="clientName" HeaderText="clientName" SortExpression="clientName" />
                                <asp:BoundField DataField="clientIP" HeaderText="clientIP" SortExpression="clientIP" />
                                <asp:BoundField DataField="serverName" HeaderText="serverName" SortExpression="serverName" />

                            </Columns>
                            <PagerTemplate>
                                <asp:Label ID="lbl_ShowRows" runat="server" Text="Show rows:" /><asp:DropDownList
                                    ID="ddlPageSize" runat="server" AutoPostBack="true" OnSelectedIndexChanged="OnSelectedIndexChanged">
                                    <asp:ListItem Value="5" />
                                    <asp:ListItem Value="10" />
                                    <asp:ListItem Value="15" />
                                    <asp:ListItem Value="20" />
                                    <asp:ListItem Value="50" />
                                    <asp:ListItem Value="100" />
                                    <asp:ListItem Value="150" />
                                    <asp:ListItem Value="250" />
                                    <asp:ListItem Value="500" />
                                    <asp:ListItem Value="1000" />
                                </asp:DropDownList>
                                &#160;&#160;<asp:Label ID="lbl_page" runat="server" Text="Page" />
                                <asp:TextBox ID="txtGoToPage" runat="server" AutoPostBack="true" CssClass="gotopage"
                                    OnTextChanged="GoToPageOnTextChanged" />
                                <asp:Label ID="lbl_Of" runat="server" Text="of" />
                                <asp:Label ID="lblTotalNumberOfPages" runat="server" />
                                &nbsp;&nbsp;<asp:Button ID="btn_p" runat="server" CommandArgument="Prev" SkinID="_" CommandName="Page"
                                    CssClass="previous" ToolTip="Previous Page" /><asp:Button ID="btn_n" runat="server"
                                        CommandArgument="Next" SkinID="_" CommandName="Page" CssClass="next" ToolTip="Next Page" />
                            </PagerTemplate>
                            <SelectedRowStyle BackColor="#D6E8FF" ForeColor="Black" />
                        </cc4:MKGridView>
                    </td>
                </tr>

            </table>

            <asp:Button ID="btn_pHandler" runat="server" Text="Button" Style="display: none;" />
            <asp:Panel ID="P" runat="server" CssClass="frame" Style="display: none;">
                <div class="overlay">
                    <div style="float: right; margin-top: -28px; margin-right: -10px;">
                        <asp:ImageButton ID="ImageButton1" ImageUrl="~/images/jq/close.png" runat="server" />
                    </div>
                    <div class="floatright">
                        <asp:Button ID="btn_TopOK" runat="server" OnClick="OnOK" />
                    </div>
                    <uc5:PopupPanel ID="usc_PP" runat="server" />
                    <div class="divpok">
                        <asp:Button ID="btn_POK" runat="server" />
                    </div>
                </div>

            </asp:Panel>
            <cc1:ModalPopupExtender ID="mdp" runat="server" TargetControlID="btn_pHandler" PopupControlID="P"
                BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <cc1:DragPanelExtender ID="dpE" runat="server" DragHandleID="pnlHeader"
                TargetControlID="p" />
        </ContentTemplate>
    </asp:UpdatePanel>
      <asp:UpdateProgress ID="prz" runat="server" AssociatedUpdatePanelID="up_a" DisplayAfter="20">
        <ProgressTemplate>
            <div class="UpdateProgressBackground">
                <center>
                    <div class="UpdateProgressContent">
                        <h3>
                            <asp:Label ID="lbl_Wait" runat="server"></asp:Label></h3>
                        <br />
                        <img src="../images/ajax.gif" alt="" />
                    </div>
                </center>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
