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

<% if (false)
   { %>
<link href="../Content/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:GridView ID="grView" runat="server" AllowPaging="True" DataSourceID="ods" EnableModelValidation="True" DataKeyNames="codPostazione" AutoGenerateColumns="False" PageSize="20" AllowSorting="True" Width="100%">
    <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>
        Nessun Record
        <%--<asp:Button ID="btnNew" runat="server" OnClick="btnNewFromEmpty_Click" Text='<%# traduci("New") %>'
            Visible='<%# isWritable() %>' />--%>
    </EmptyDataTemplate>
    <Columns>
        <asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="54px">
            <HeaderTemplate>
                <asp:Button ID="btnReset" runat="server" Text='<%# traduci("Reset") %>' OnClick="btnReset_Click" Visible="false" />
            </HeaderTemplate>
            <ItemTemplate>
                <asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' ImageUrl="~/images/view_m.png" />
                <asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>' ImageUrl="~/images/edit_m.png" />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update")%>' ImageUrl="~/images/apply_m.png" />
                <asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>' ImageUrl="~/images/cancel_m.png" />
            </EditItemTemplate>
            <FooterTemplate>
                <asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("insert") %>' ImageUrl="~/images/new_m.png" OnClick="lblIns_click" />
                <asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>' ImageUrl="~/images/cancel_m.png" />
            </FooterTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Postazione" SortExpression="codPostazione">
            <ItemTemplate>
                <asp:Label ID="lblCodPostazione" runat="server" Text='<%# Eval("codPostazione") %>' />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:TextBox ID="txtcodPostazione" runat="server" Text='<%# Bind("codPostazione") %>' Width="98%" />
            </EditItemTemplate>
            <FooterTemplate>
                <asp:TextBox ID="txtcodPostazione" runat="server" Text='<%# Bind("codPostazione") %>' Width="98%" />
            </FooterTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="stampante" SortExpression="stampante">
            <ItemTemplate>
                <asp:Label ID="lblStampante" runat="server" Text='<%# Eval("stampante") %>' />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:TextBox ID="txtstampante" runat="server" Text='<%# Bind("stampante") %>' Width="98%" />
            </EditItemTemplate>
            <FooterTemplate>
                <asp:TextBox ID="txtstampante" runat="server" Text='<%# Bind("stampante") %>' Width="98%" />
            </FooterTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="note" SortExpression="note">
            <ItemTemplate>
                <asp:Label ID="lblnote" runat="server" Text='<%# Eval("note") %>' />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:TextBox ID="txtnote" runat="server" Text='<%# Bind("note") %>' Width="98%" />
            </EditItemTemplate>
            <FooterTemplate>
                <asp:TextBox ID="txtnote" runat="server" Text='<%# Bind("note") %>' Width="98%" />
            </FooterTemplate>
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="54px">
            <HeaderTemplate>
                <%--<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' />--%>
                <asp:LinkButton ID="btnNew" runat="server" OnClick="btnNew_Click" CssClass="btn btn-default btn-sm" Visible="true"><i class="fa fa-plus"></i> <%: traduci("New") %></asp:LinkButton>
            </HeaderTemplate>
            <EditItemTemplate>
                <asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update" ImageUrl="~/images/apply_m.png" ToolTip='<%# traduci("Update")%>' />
                <asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_m.png" ToolTip='<%# traduci("Cancel") %>' />
            </EditItemTemplate>
            <FooterTemplate>
                <asp:ImageButton ID="imgInsert2" runat="server" CausesValidation="False" CommandName="Insert" ImageUrl="~/images/new_m.png" OnClick="lblIns_click" ToolTip='<%# traduci("insert") %>' />
                <asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_m.png" ToolTip='<%# traduci("Cancel") %>' />
            </FooterTemplate>
            <ItemTemplate>
                <asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("codPostazione") %>' CommandName="Delete" ImageUrl="~/images/elimina_m.png" ToolTip='<%# traduci("Delete") %>' OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" DeleteMethod="deleteQuery" InsertMethod="insertQuery" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_magazzinoTableAdapters.ElencoPostazioniTableAdapter"
    UpdateMethod="updateQuery" OnInserting="recuperaFooter" FilterExpression=" codPostazione LIKE '%{0}%' OR stampante LIKE '%{0}%' OR note LIKE '%{0}%' ">
    <FilterParameters>
        <asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
    </FilterParameters>
    <DeleteParameters>
        <asp:Parameter Name="Original_codPostazione" Type="String" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="codPostazione" Type="String" />
        <asp:Parameter Name="stampante" Type="String" />
        <asp:Parameter Name="note" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="stampante" Type="String" />
        <asp:Parameter Name="codPostazione" Type="String" />
        <asp:Parameter Name="note" Type="String" />
        <asp:Parameter Name="Original_codPostazione" Type="String" />
    </UpdateParameters>
</asp:ObjectDataSource>
