<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConsumerWithHttpPostUrl.aspx.cs"
    Inherits="eDocument.Server.Administrator.Consumer.ConsumerWithHttpPostUrl" MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
    <table>
        <tr>
            <td>
    <a href="#feilede">Feilede antall:<asp:Label runat="server" ID="lblFailedCount"></asp:Label></a>            
            </td>
            <td>
                <a href="UpdateHttpPost.aspx?ConsumerID=<%# FailedIds %>">Oppdater</a>
            </td>
        </tr>
        <tr>
            <td>
                <a href="#ok">OK antall:<asp:Label runat="server" ID="lblOkCount"></asp:Label></a>            
            </td>
            <td>
                <a href="UpdateHttpPost.aspx?ConsumerID=<%# OkIds %>">Oppdater</a>
            </td>
        </tr>
        <tr>
            <td>
                Totalt antall: <asp:Label runat="server" ID="lblAllCount"></asp:Label>            
            </td>
            <td>
                <a href="UpdateHttpPost.aspx">Oppdater</a>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                Genereringstid: <%# ElapsedSeconds %> sekunder
            </td>
        </tr>
    </table>
    
    <a id="feilede"></a>
    <h1>
        Feilede</h1>
    <div>
        <asp:GridView runat="server" Width="100%" ID="gridFailures" AutoGenerateColumns="False">
            <Columns>
                <asp:HyperLinkField DataTextField="Name" HeaderText="Organisasjon" DataNavigateUrlFields="ConsumerID"
                    DataNavigateUrlFormatString="~/Consumer/Details.aspx?ConsumerID={0}" />
                <asp:BoundField DataField="Username" HeaderText="Brukernavn" />
                <asp:BoundField DataField="Message" HeaderText="Melding"/>
                <asp:HyperLinkField DataTextField="Url" Target="_blank" DataNavigateUrlFields="Url" DataNavigateUrlFormatString="{0}"/>
                <asp:HyperLinkField Text="Oppdater" Target="_blank" DataNavigateUrlFields="ConsumerID" DataNavigateUrlFormatString="UpdateHttpPost.aspx?ConsumerID={0}"/>
            </Columns>
        </asp:GridView>
        <a id="ok"></a>
        <h1>OK</h1>
        <asp:GridView runat="server" Width="100%" ID="gridSuccess" AutoGenerateColumns="False">
            <Columns>
                <asp:HyperLinkField DataTextField="Name" HeaderText="Organisasjon" DataNavigateUrlFields="ConsumerID"
                    DataNavigateUrlFormatString="~/Consumer/Details.aspx?ConsumerID={0}" />
                <asp:BoundField DataField="Username" HeaderText="Brukernavn" />
                <asp:BoundField DataField="CurrentVersion" HeaderText="Versjon"/>
                <asp:BoundField DataField="LastUpdate" HeaderText="Sist oppdatert" />
                <asp:BoundField DataField="MaxRequestLength" HeaderText="MaxRequestLength" />
                <asp:BoundField DataField="ExecutionTimeout" HeaderText="ExecutionTimeout" />
                <asp:HyperLinkField DataTextField="Url" Target="_blank" DataNavigateUrlFields="Url" DataNavigateUrlFormatString="{0}"/>
                <asp:HyperLinkField Text="Oppdater" Target="_blank" DataNavigateUrlFields="ConsumerID" DataNavigateUrlFormatString="UpdateHttpPost.aspx?ConsumerID={0}"/>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>