<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_GestMatrUser.ascx.cs" Inherits="GMW.WebUserControls.mod_GestMatrUser" %>

<asp:GridView ID="grView" runat="server" Width="100%" AllowPaging="True" DataSourceID="odsSAO" AutoGenerateColumns="False" DataKeyNames="CodSoggetto" CssClass="table table-striped table-bordered table-condensed">
    <EmptyDataTemplate>
        <asp:Label runat="server" ID="lblNoRecord" Text="Nessun record trovato" />
    </EmptyDataTemplate>
    <HeaderStyle CssClass="default" />
    <PagerStyle CssClass="active GridPager" />
    <PagerSettings Mode="NumericFirstLast" />
    <SelectedRowStyle CssClass="info" />
    <Columns>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update"
                    ToolTip='<%# traduci("Update")%>' ImageUrl='<%# imgPath(SteamWare.tipoImg.conferma, SteamWare.dimImg.small) %>' />
                <asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                    ToolTip='<%# traduci("Cancel") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.annulla, SteamWare.dimImg.small) %>' />
            </EditItemTemplate>
            <HeaderTemplate>
                <%--<asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm" Visible="true"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>--%>
            </HeaderTemplate>
            <ItemTemplate>
                <%--<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select"
                    ToolTip='<%# traduci("Select") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.seleziona, SteamWare.dimImg.small) %>' />--%>
                <asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit"
                    ToolTip='<%# traduci("Edit") %>' ImageUrl='<%# imgPath(SteamWare.tipoImg.modifica, SteamWare.dimImg.small) %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="DescAziendaOp" HeaderText="Azienda" SortExpression="DescAziendaOp" ReadOnly="True" />
        <asp:BoundField DataField="CodSoggetto" HeaderText="CodSoggetto" ReadOnly="True" SortExpression="CodSoggetto" />
        <asp:BoundField DataField="CodMatricola" HeaderText="Matricola" ReadOnly="False" SortExpression="CodMatricola" />
        <asp:BoundField DataField="Cognome" HeaderText="Cognome" SortExpression="Cognome" ReadOnly="True" />
        <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" ReadOnly="True" />
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsSAO" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData"
    TypeName="GMW_data.DS_ApplicazioneTableAdapters.TrascCodSoggTableAdapter" UpdateMethod="updateQuery" FilterExpression=" DescAziendaOp LIKE '%{0}%' OR CodSoggetto LIKE '%{0}%' OR CONVERT(CodMatricola, 'System.String') LIKE '%{0}%' OR Cognome LIKE '%{0}%' OR Nome LIKE '%{0}%' ">
    <FilterParameters>
        <asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
    </FilterParameters>
    <UpdateParameters>
        <asp:Parameter Name="Original_CodSoggetto" Type="String" />
        <asp:Parameter Name="CodMatricola" Type="Int32" />
    </UpdateParameters>
</asp:ObjectDataSource>
