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

<% if (false)
  { %>
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
<% } %>


<div class="row">
  <div class="col-sm-4">
    &nbsp;
  </div>
  <div class="col-sm-4">
    <div>
      <asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="3em" Text="" />
    </div>
    <div>
      <asp:Label runat="server" ID="lblDescrAttivo" Font-Size="2em" Text="" ToolTip="particolare" />
      &nbsp;<asp:Label runat="server" ID="lblDisegno" Font-Size="1.8em" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
    </div>
    <div>
      <asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
      <br />
      <asp:HiddenField runat="server" ID="hfLastBCode" />
      <asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" TabIndex="0" />
    </div>
  </div>
  <div class="col-sm-4">
    <div class="card bg-primary text-light small">
      <div class="card-header">
        <b><asp:Label runat="server" ID="lblUdcParent"><%: traduci("UDC") %></asp:Label></b>
      </div>
      <div class="card-body bg-light text-dark">
        <div class="row boxRicerca">
          <div class="col-12">
            <div class="input-group input-group-sm">
              <span class="input-group-btn text-left" style="text-align: left;">
                <asp:Button ID="btnCerca" runat="server" CssClass="btn btn-default" type="button" OnClick="btnCerca_Click" Text='<%# traduci("lblCerca") %>' />
              </span>
              <asp:TextBox ID="txtCerca" runat="server" CssClass="form-control" OnTextChanged="txtCerca_TextChanged" AutoPostBack="True" />
              <span class="input-group-addon">
                <asp:LinkButton runat="server" ID="lnkReset" Text="X" type="button" OnClick="lnkReset_Click" Font-Size="0.8em" ForeColor="Black" />
              </span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-12" style="font-size: 0.8em;">
            <asp:GridView ID="grView" runat="server" AllowPaging="false" AllowSorting="True" AutoGenerateColumns="False" OnDataBound="grView_DataBound" DataKeyNames="UDC" DataSourceID="ods" OnPageIndexChanged="grView_PageIndexChanged" OnSorted="grView_Sorted" 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>
                <asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
              </EmptyDataTemplate>
              <Columns>
                <asp:TemplateField HeaderText="lastMov" SortExpression="lastMov" ItemStyle-Wrap="false">
                  <ItemTemplate>
                    <asp:Label ID="lbllastMov" runat="server" Text='<%# Eval("lastMov", "{0:dd/MM HH:mm}") %>' />
                  </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="UDC" SortExpression="UDC">
                  <ItemTemplate>
                    <asp:Label ID="lblUDC" runat="server" Text='<%# Eval("UDC") %>' />
                  </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
                  <ItemTemplate>
                    <asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
                  </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
                  <ItemTemplate>
                    <asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:#}") %>' />
                  </ItemTemplate>
                </asp:TemplateField>
              </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}"
              SelectMethod="getUdcDetailByIdxCella" TypeName="GMW_data.DS_magazzinoTableAdapters.v_UdcDetailTableAdapter"
              OnDataBinding="ods_DataBinding" FilterExpression="UDC LIKE '%{0}%' OR PARTICOLARE LIKE '%{0}%'">
              <SelectParameters>
                <asp:SessionParameter Name="IdxCella" Type="Int32" SessionField="IdxCellaFinMult_IN" DefaultValue="0" />
              </SelectParameters>
              <FilterParameters>
                <asp:SessionParameter Name="search" Type="String" SessionField="valoreCercatoFMI"
                  DefaultValue="0" />
              </FilterParameters>
            </asp:ObjectDataSource>
            <asp:Label ID="lblNumRec" runat="server" CssClass="didascalia" />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

