<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_storicoAzioniOperatore.ascx.cs"   Inherits="GMW.WebUserControls.mod_storicoAzioniOperatore" %>
<div style="text-align: center; margin: auto;">
  <asp:button runat="server" id="btnStampa" width="120px" text="(ri)stampa"
    onclick="btnStampa_Click" />
  <asp:button runat="server" id="btnElimina" width="120px" text="elimina"
    visible="false" onclick="btnElimina_Click" />
</div>
<div style="font-size: x-small;">
  <asp:gridview ID="grView" runat="server" Width="244px"
    AllowPaging="True" DataSourceID="odsSAO" PageSize="20" AutoGenerateColumns="False"
    DataKeyNames="idxEvento" OnSelectedIndexChanged="grView_SelectedIndexChanged">
    <RowStyle CssClass="ctrRowStyle" />
    <AlternatingRowStyle CssClass="ctrAltRowStyle" />
    <EditRowStyle CssClass="ctrEditRowStyle" />
    <SelectedRowStyle CssClass="ctrSelRowStyle" />
    <FooterStyle CssClass="ctrFooter" />
    <PagerStyle CssClass="active GridPager" />
    <HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
    <EmptyDataRowStyle CssClass="ctrRowStyle" />
    <EmptyDataTemplate>
      <asp:Label runat="server" ID="lblNoRecord" Text="Nessun record trovato" />
    </EmptyDataTemplate>
    <Columns>
      <asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center">
        <HeaderTemplate>
          <div style="text-align: center; margin: auto;">
            <asp:LinkButton ID="lbReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm"
              Visible="true"><i class="fa fa-refresh"></i></asp:LinkButton>
          </div>
        </HeaderTemplate>
        <ItemTemplate>
          <asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-default btn-sm"><i class="fa fa-search-plus"></i></asp:LinkButton>
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="Data Ora" SortExpression="DataOra">
        <ItemTemplate>
          <asp:Label ID="lblDataOra" runat="server" Text='<%# Eval("DataOra", "{0:HH:mm:ss<br/>dd/MM/yy}") %>'
            ToolTip='<%# Eval("CodSoggetto") %>' />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField HeaderText="UDC" SortExpression="UDC">
        <ItemTemplate>
          <asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
          <br />
          <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare","<b>{0}</b>") %>' />
        </ItemTemplate>
      </asp:TemplateField>
      <asp:TemplateField>
        <ItemTemplate>
          <asp:Image runat="server" ID="imgAzione" ImageUrl='<%# imgAzione(Eval("CodAzione")) %>'
            ToolTip='<%# Eval("descrizione") %>' />
        </ItemTemplate>
      </asp:TemplateField>
    </Columns>
  </asp:gridview>
  <asp:ObjectDataSource runat="server" ID="odsSAO" SelectMethod="getLastByPost" TypeName="GMW_data.DS_magazzinoTableAdapters.StoricoAzioniOperatoreTableAdapter">   
    <SelectParameters>
      <asp:SessionParameter Name="DataOraFrom" Type="DateTime" SessionField="dataFromPost" />
      <asp:SessionParameter Name="DataOraTo" Type="DateTime" SessionField="dataToPost" />
      <asp:SessionParameter Name="codPostazione" Type="String" SessionField="postazione_name" />
    </SelectParameters>
  </asp:ObjectDataSource>
</div>
