<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_stackLoading.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_stackLoading" %>
<%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %>
<%@ Register Src="~/WebUserControls/cmp_stackNextloading.ascx" TagPrefix="uc1" TagName="cmp_stackNextloading" %>
<%@ Register Src="~/WebUserControls/cmp_MachSelSmart.ascx" TagPrefix="uc1" TagName="cmp_MachSelSmart" %>

<div class="row">
    <div class="col-12 shortcuts small" runat="server" id="divSim">
        <div class="row table-warning">
            <div class="col">
                <h3><%: traduci("ProdSimul") %></h3>
            </div>
            <div class="col">
                <asp:LinkButton runat="server" ID="lbtAdvanceProd" class="shortcut" OnClick="lbtAdvanceProd_Click"> <i class="fa fa-wrench shortcut-icon"></i><span class="shortcut-label"><b><%: traduci("Advance") %></b>#<%: traduci("Prod") %></span></asp:LinkButton>
            </div>
        </div>
    </div>
    <div class="col-12 px-0 table-secondary">
        <uc1:cmp_MachSelSmart runat="server" ID="cmp_MachSelSmart" />
    </div>
    <div class="col-12">
        <asp:HiddenField ID="hfBarcode" runat="server" />
        <asp:HiddenField ID="hfEnableBCode" runat="server" />
        <asp:HiddenField ID="hfStackId" runat="server" />
        <asp:Label runat="server" ID="lblLoaded" CssClass="text-success border border-success rounded py-1 px-5 m-2"><%: traduci("StackLoaded") %></asp:Label>
        <asp:FormView ID="frmView" runat="server" DataKeyNames="BatchID" DataSourceID="ods" Width="100%" OnDataBound="frmView_DataBound">
            <ItemTemplate>
                <div class="row border bg-success text-light rounded">
                    <div class="col-12 col-lg-4 text-left">
                        <%: traduci("Batch") %><b>
                            <asp:Label ID="TaktLabel" runat="server" Text='<%# Eval("Takt") %>' /></b>
                    </div>
                    <div class="d-none d-lg-block col-4 text-center">
                        <b><%: traduci("BatchCurrent") %></b>
                    </div>
                    <div class="d-none d-lg-block col-4 text-right">
                        <%: traduci("DueDate") %> <b>
                            <asp:Label ID="DueDateLabel" runat="server" Text='<%# Eval("DueDate", "{0:ddd yyyy.MM.dd}") %>' /></b>
                    </div>
                    <div class="d-none d-lg-block col-4 text-left">
                        <%: traduci("TotBunk") %><b>
                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("NumStacks") %>' /></b>
                    </div>
                    <div class="d-none d-lg-block col-4 text-center">
                        <%: traduci("TotSheets") %><b>
                            <asp:Label ID="Label4" runat="server" Text='<%# Eval("NumSheets") %>' /></b>
                    </div>
                    <div class="d-none d-lg-block col-4 text-right">
                        <%: traduci("TotItems") %><b>
                            <asp:Label ID="Label6" runat="server" Text='<%# Eval("NumItems") %>' /></b>
                    </div>
                </div>
            </ItemTemplate>
        </asp:FormView>
        <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getCurrentByMachine" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="#" Name="PlaceCod" QueryStringField="mach" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    <div class="col-12 mt-2">
        <uc1:cmp_barcode runat="server" ID="cmp_barcode" />
    </div>
    <div class="col-12">
        <uc1:cmp_stackNextloading runat="server" ID="cmp_stackNextloading" />
    </div>
</div>