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

<% 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-4">
        <div id="div1" runat="server" class="card bg-warning small">
            <div class="card-header">
                <b><%: traduci("FormatoDmtx") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <asp:DropDownList runat="server" ID="ddlFormDmtx" AutoPostBack="True" OnSelectedIndexChanged="ddlFormDmtx_SelectedIndexChanged">
                    <%--<asp:ListItem Value="*" Text="Tutti"></asp:ListItem>
                    <asp:ListItem>E3</asp:ListItem>--%>
                    <asp:ListItem>B48</asp:ListItem>
                </asp:DropDownList>
            </div>
        </div>

    </div>
    <div class="col-4">
    </div>
    <div class="col-4">
        <div id="div2" runat="server" class="card bg-warning small">
            <div class="card-header">
                <b><%: traduci("TipoNC") %></b>
            </div>
            <div class="card-body bg-light text-dark">
                <asp:DropDownList runat="server" ID="ddlTipoAttr" AutoPostBack="True" OnSelectedIndexChanged="ddlTipoAttr_SelectedIndexChanged">
                    <%--<asp:ListItem Value="*" Text="Tutti"></asp:ListItem>--%>
                    <asp:ListItem Value="XF" Text="Fusione"></asp:ListItem>
                </asp:DropDownList>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-sm-3 col-lg-2">
        &nbsp;
    </div>
    <div class="col-sm-6 col-lg-8">
        <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" />
            <br />
            <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="DataMatrix" />
            <br />
            <asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
        </div>
        <div id="divBlocca" runat="server">
            <div style="padding: 4px 0px;">
                <asp:LinkButton runat="server" ID="lbtBloccaUDC" Width="100%" CssClass="btn btn-warning btn-lg" TabIndex="4" OnClick="BloccaUDC_Click"><i aria-hidden='true' class='fa fa-external-link fa-2x'></i> <%: traduci("btnBloccoUDC") %></asp:LinkButton>
            </div>
        </div>
        <div>
            Elenco ultimi DataMatrix segnalati
            <div style="text-align: center; margin: auto;">
                <asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataSourceID="odsDtxByAttr" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
                    <AlternatingRowStyle BackColor="White" />
                    <EditRowStyle BackColor="#7C6F57" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#E3EAEB" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F8FAFA" />
                    <SortedAscendingHeaderStyle BackColor="#246B61" />
                    <SortedDescendingCellStyle BackColor="#D4DFE1" />
                    <SortedDescendingHeaderStyle BackColor="#15524A" />
                    <EmptyDataTemplate>
                        <%# traduci("noRecord") %>
                    </EmptyDataTemplate>
                    <Columns>
                        <asp:BoundField DataField="Particolare" HeaderText="Particolare" SortExpression="Particolare" />
                        <asp:BoundField DataField="DataMatrix" HeaderText="DataMatrix" SortExpression="DataMatrix" />
                        <asp:BoundField DataField="DataOra" HeaderText="DataOra" SortExpression="DataOra" />
                        <%--<asp:BoundField DataField="StazioneID" HeaderText="StazioneID" SortExpression="StazioneID" />
                        <asp:BoundField DataField="EsitoMarcatura" HeaderText="EsitoMarcatura" SortExpression="EsitoMarcatura" />
                        <asp:BoundField DataField="FormatoDtmxMM" HeaderText="FormatoDtmxMM" SortExpression="FormatoDtmxMM" />
                        <asp:BoundField DataField="PartNumber" HeaderText="PartNumber" SortExpression="PartNumber" />
                        <asp:BoundField DataField="IdMaster" HeaderText="IdMaster" SortExpression="IdMaster" />--%>
                        <asp:CheckBoxField DataField="Associato" HeaderText="Associato" SortExpression="Associato" />
                        <asp:BoundField DataField="PN_OK" HeaderText="PartNumber" ReadOnly="True" SortExpression="PN_OK" />
                        <asp:BoundField DataField="FD_OK" HeaderText="Formato" ReadOnly="True" SortExpression="FD_OK" />
                        <%--<asp:BoundField DataField="CodAttr" HeaderText="Attr" ReadOnly="True" SortExpression="CodAttr" />--%>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsDtxByAttr" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_DataMatrixTableAdapters.Dmtx_ByAttrTableAdapter">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddlTipoAttr" Name="CodAttr" PropertyName="SelectedValue" Type="String" />
                        <asp:ControlParameter ControlID="ddlFormDmtx" Name="FormatoDtmx" PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <br />
            </div>
        </div>
    </div>
    <div class="col-sm-3 col-lg-2">
        &nbsp;
    </div>
</div>

