<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_trascPn2Pn.ascx.cs" Inherits="GMW.WebUserControls.mod_trascPn2Pn" %>
<asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="PartNumberIN,PartNumberOUT" DataSourceID="ods" AllowSorting="True" Width="100%" CssClass="table table-striped table-condensed table-responsive table-sm" OnSelectedIndexChanged="grView_SelectedIndexChanged">
  <HeaderStyle CssClass="default" />
  <PagerStyle CssClass="active GridPager" />
  <PagerSettings Mode="NumericFirstLast" /> 
  <SelectedRowStyle CssClass="table-info" />
  <EmptyDataTemplate>
    Nessun Record
  </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="true" />
      </HeaderTemplate>
      <ItemTemplate>
        <asp:LinkButton ID="lbtEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'><i class="fa fa-pencil fa-2x text-warning" aria-hidden="true"></i></asp:LinkButton>
      </ItemTemplate>
      <EditItemTemplate>
        <div style="white-space: nowrap;">
          <asp:LinkButton ID="lbtUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update") %>'><i class="fa fa-check fa-2x text-success" aria-hidden="true"></i></asp:LinkButton>&nbsp;
          <asp:LinkButton ID="lbtCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'><i class="fa fa-times fa-2x text-danger" aria-hidden="true"></i></asp:LinkButton>
        </div>
      </EditItemTemplate>
      <FooterTemplate>                            
        <div style="white-space: nowrap;">
          <asp:LinkButton ID="lbtInsert" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("Insert") %>' OnClick="lblIns_click"><i class="fa fa-plus fa-2x text-success" aria-hidden="true"></i></asp:LinkButton>&nbsp;
          <asp:LinkButton ID="lbtCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'><i class="fa fa-times fa-2x text-danger" aria-hidden="true"></i></asp:LinkButton>
        </div>
      </FooterTemplate>
      <ItemStyle HorizontalAlign="Center" Width="54px"></ItemStyle>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="PartNum IN" SortExpression="PartNumberIN">
      <EditItemTemplate>
        <asp:TextBox ID="txtPartNumberIN" runat="server" Text='<%# Bind("PartNumberIN") %>' Width="6em" />
      </EditItemTemplate>
      <ItemTemplate>
        <asp:Label ID="lblPartNumberIN" runat="server" Text='<%# Eval("PartNumberIN") %>' />
      </ItemTemplate>
      <FooterTemplate>
        <asp:TextBox ID="txtPartNumberIN" runat="server" Text='<%# Bind("PartNumberIN") %>' Width="6em" />
      </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="PartNum OUT" SortExpression="PartNumberOUT">
      <EditItemTemplate>
        <asp:TextBox ID="txtPartNumberOUT" runat="server" Text='<%# Bind("PartNumberOUT") %>' Width="6em" />
      </EditItemTemplate>
      <ItemTemplate>
        <asp:Label ID="lblPartNumberOUT" runat="server" Text='<%# Eval("PartNumberOUT") %>' />
      </ItemTemplate>
      <FooterTemplate>
        <asp:TextBox ID="txtPartNumberOUT" runat="server" Text='<%# Bind("PartNumberOUT") %>' Width="6em" />
      </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="54px">
      <HeaderTemplate>
        <asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Visible="true" Text='<%# traduci("New") %>' />
      </HeaderTemplate>
      <EditItemTemplate>                                                     
        <div style="white-space: nowrap;">
          <asp:LinkButton ID="lbtUpdate2" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update") %>'><i class="fa fa-check fa-2x text-success" aria-hidden="true"></i></asp:LinkButton>&nbsp;
          <asp:LinkButton ID="lbtCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'><i class="fa fa-times fa-2x text-danger" aria-hidden="true"></i></asp:LinkButton>
        </div>
      </EditItemTemplate>
      <FooterTemplate>                                         
        <div style="white-space: nowrap;">
          <asp:LinkButton ID="lbtInsert2" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("Insert") %>' OnClick="lblIns_click"><i class="fa fa-plus fa-2x text-success" aria-hidden="true"></i></asp:LinkButton>&nbsp;
          <asp:LinkButton ID="lbtCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'><i class="fa fa-times fa-2x text-danger" aria-hidden="true"></i></asp:LinkButton>
        </div>
      </FooterTemplate>
      <ItemTemplate>
        <asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("PartNumberIN") %>' CommandName="Delete" ImageUrl="~/images/elimina_m.png" ToolTip='<%# traduci("Delete") %>' OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaDel") %>' Visible='<%# delEnabled(Eval("PartNumberIN")) %>' />
      </ItemTemplate>
      <ItemStyle HorizontalAlign="Center" Width="54px"></ItemStyle>
    </asp:TemplateField>
  </Columns>

</asp:GridView>
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getByPN_OUT" TypeName="GMW_data.DS_DataMatrixTableAdapters.TrascPartNumTableAdapter" OnUpdating="ods_Updating" DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update" OnInserting="recuperaFooter" OnDeleting="ods_Deleting">
  <DeleteParameters>
    <asp:Parameter Name="Original_PartNumberIN" Type="String" />
    <asp:Parameter Name="Original_PartNumberOUT" Type="String" />
  </DeleteParameters>
  <InsertParameters>
    <asp:Parameter Name="PartNumberIN" Type="String" />
    <asp:Parameter Name="PartNumberOUT" Type="String" />
  </InsertParameters>
  <SelectParameters>
    <asp:ControlParameter ControlID="hfPartNumberOut" Name="PartNumberOut" PropertyName="Value" Type="String" />
  </SelectParameters>
  <UpdateParameters>
    <asp:Parameter Name="PartNumberOUT" Type="String" />
    <asp:Parameter Name="Original_PartNumberIN" Type="String" />
    <asp:Parameter Name="Original_PartNumberOUT" Type="String" />
  </UpdateParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfFormatoDtmx" />
<asp:HiddenField runat="server" ID="hfPartNumberOut" />
