<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_listAL.ascx.cs" Inherits="GMW.WebUserControls.mod_listAL" %>
<div class="row">
  <div class="col-sm-12">
    <asp:GridView ID="grView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
      OnSelectedIndexChanged="grView_SelectedIndexChanged" OnDataBound="grView_DataBound"
      DataKeyNames="AL" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged"
      OnSorting="grView_Sorting" OnRowDataBound="grView_RowDataBound">
      <RowStyle CssClass="ctrRowStyle" />
      <AlternatingRowStyle CssClass="ctrAltRowStyle" />
      <EditRowStyle CssClass="ctrEditRowStyle" />
      <SelectedRowStyle CssClass="ctrSelRowStyle" />
      <FooterStyle CssClass="ctrFooter" />
      <PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
      <HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
      <EmptyDataRowStyle CssClass="ctrRowStyle" />
      <EmptyDataTemplate>
        <asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
      </EmptyDataTemplate>
      <Columns>
        <asp:TemplateField ShowHeader="False">
          <HeaderTemplate>
            <asp:LinkButton ID="btnReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
          </HeaderTemplate>
          <ItemTemplate>
            <asp:LinkButton ID="btnSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' CssClass="btn btn-default btn-sm btn-block p-0" Visible="true"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
          </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="AL" HeaderText="AL" ReadOnly="True" SortExpression="AL" />
        <asp:CheckBoxField DataField="Attivo" HeaderText="Attivo" SortExpression="Attivo" />
        <asp:TemplateField HeaderText="DataCreaz" SortExpression="DataCreaz">
          <ItemTemplate>
            <asp:Label ID="Label1" runat="server" Text='<%# Eval("DataCreaz","{0:dd/MM/yy HH:mm}") %>' ToolTip='<%# Eval("CodSoggetto") %>' />
          </ItemTemplate>
        </asp:TemplateField>
      </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}"
      SelectMethod="getByAL" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoAssiemiTableAdapter"
      OnDataBinding="ods_DataBinding">
      <SelectParameters>
        <asp:SessionParameter Name="AL" Type="String" SessionField="FullSearchValue" DefaultValue="AL" />
      </SelectParameters>
    </asp:ObjectDataSource>
    <asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
    <br />
    <asp:Label ID="lblWarning" runat="server" Visible="false" CssClass="erroreMid" />

  </div>
</div>
