<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExportExcel_SAO.aspx.cs" Inherits="GMW.ExportExcel_SAO" EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="grView" runat="server" EnableModelValidation="True" Width="100%" AllowPaging="false" DataSourceID="odsSAO" AutoGenerateColumns="False" DataKeyNames="idxEvento">
            <EmptyDataTemplate>
                <asp:Label runat="server" ID="lblNoRecord" Text="Nessun record trovato" />
            </EmptyDataTemplate>
            <Columns>
                <asp:TemplateField HeaderText="Data Ora" SortExpression="DataOra">
                    <ItemTemplate>
                        <asp:Label ID="lblDataOra" runat="server" Text='<%# Eval("DataOra", "{0:ddd dd/MM/yy HH:mm:ss}") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Postazione" SortExpression="codPostazione">
                    <ItemTemplate>
                        <asp:Label ID="lblPostazione" runat="server" Text='<%# Eval("codPostazione") %>' ToolTip='<%# Eval("clientIP") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="CodSoggetto" SortExpression="CodSoggetto">
                    <ItemTemplate>
                        <asp:Label ID="lblCodSoggetto" runat="server" Text='<%# getOperatoreByCod(Eval("CodSoggetto")) %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
                    <ItemTemplate>
                        <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="UDC" SortExpression="UDC">
                    <ItemTemplate>
                        <asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="descrizione" SortExpression="descrizione">
                    <ItemTemplate>
                        <asp:Label ID="lbldescrizione" runat="server" Text='<%# Eval("descrizione") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblAzione" Text='<%# Eval("CodAzione") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsSAO" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getBySearch" TypeName="GMW_data.DS_magazzinoTableAdapters.StoricoAzioniOperatoreTableAdapter">
            <SelectParameters>
                <asp:SessionParameter Name="DataOraFrom" SessionField="_inizio" Type="DateTime" />
                <asp:SessionParameter Name="DataOraTo" SessionField="_fine" Type="DateTime" />
                <asp:SessionParameter Name="codPostazione" Type="String" SessionField="postazione_name" />
                <asp:SessionParameter Name="CodSoggetto" Type="String" SessionField="CodSoggettoSAO" />
                <asp:SessionParameter Name="codAzione" Type="String" SessionField="CodAzioneUt" />
                <asp:SessionParameter Name="UDC" Type="String" SessionField="UdcSAO" />
                <asp:SessionParameter Name="Particolare" Type="String" SessionField="ParticSAO" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
