<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_recAttributiDtx.ascx.cs" Inherits="GMW.WebUserControls.mod_recAttributiDtx" %>
<div class="row">
  <div class="col-sm-3">
    <div class="card bg-success small">
      <div class="card-header">
        <b><%: traduci("LastRecord") %></b>
      </div>
      <div class="card-body bg-light text-dark">
        <asp:Label runat="server" ID="lblCodAttr" Visible="false" />
        <asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="idxAttr" DataSourceID="odsA2D" Width="100%">
          <%--OnSelectedIndexChanged="grViewDPM_SelectedIndexChanged"--%>
          <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">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class="fa fa-pencil btn-lg"></i></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="Part/Datamatrix" SortExpression="DateAttr">
              <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Particolare") %>' Font-Bold="true" />
                <div class="didascalia">
                  <asp:Label ID="Label1" CssClass="didascalia" runat="server" Text='<%# Eval("DataMatrix") %>' />
                </div>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Data / operatore" SortExpression="DateAttr">
              <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("DateAttr","{0:dd/MM/yy HH:mm}") %>' />
                <div class="didascalia">
                  <asp:Label ID="Label3" runat="server" Text='<%# Eval("CodSoggetto") %>' />
                </div>
              </ItemTemplate>
            </asp:TemplateField>
          </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="odsA2D" runat="server" OldValuesParameterFormatString="original_{0}"
          SelectMethod="getByCodPeriodo" TypeName="GMW_data.DS_DataMatrixTableAdapters.v_Attr2DtxTableAdapter">
          <SelectParameters>
            <asp:SessionParameter Name="DataStart" SessionField="_inizio" Type="DateTime" />
            <asp:SessionParameter Name="DataEnd" SessionField="_fine" Type="DateTime" />
            <asp:ControlParameter Name="CodAttr" ControlID="lblCodAttr" DefaultValue="" Type="String" />
          </SelectParameters>
        </asp:ObjectDataSource>
      </div>
    </div>
  </div>
  <div class="col-sm-6">
    <div class="card bg-primary text-light small">
      <div class="card-header">
        <b><%: traduci(tipologia) %></b> (<%: traduci("Registrazione") %>)
      </div>
      <div class="card-body bg-light text-dark">
        <div>
          <asp:Label runat="server" ID="lblDataMatrix" AssociatedControlID="txtBarcode"><%: traduci("lblDataMatrix") %></asp:Label>
        </div>
        <asp:TextBox runat="server" ID="txtBarcode" Height="56px" Width="100%" Font-Size="32pt" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
        <div class="btn-group" style="width: 100%;">
          <label id="lblAdd" runat="server" class="btn btn-success" style="width: 100%;">
            <asp:CheckBox runat="server" ID="chkAdd" AutoPostBack="true" TabIndex="3" OnCheckedChanged="chkAdd_CheckedChanged" Width="100%" />
          </label>
        </div>
      </div>
    </div>
  </div>
</div>
