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

<h3><%: traduci("RunningOrders") %></h3>
<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="BatchID" DataSourceID="odsOrders" Width="100%" CssClass="table table-success table-striped table-sm" OnSelectedIndexChanged="grView_SelectedIndexChanged">
    <HeaderStyle CssClass="default" />
    <PagerStyle CssClass="active GridPager" />
    <PagerSettings Mode="NumericFirstLast" />
    <SelectedRowStyle CssClass="table-info" />
    <EmptyDataTemplate>
        <%# traduci("NoRunningOrders") %>
    </EmptyDataTemplate>
    <Columns>
        <asp:TemplateField ShowHeader="False" ItemStyle-Width="2em">
            <HeaderTemplate>
                <div class="text-center">
                    <asp:LinkButton ID="lbtReset" runat="server" OnClick="lbtReset_Click" CssClass="btn btn-sm btn-primary" Visible="true" ToolTip="Reset"><i class="fa fa-refresh"></i></asp:LinkButton>
                </div>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="text-center">
                    <asp:LinkButton ID="lbtSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-sm btn-info"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
                </div>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Takt" HeaderText="#" InsertVisible="False" ReadOnly="True" SortExpression="Takt" />
        <asp:BoundField DataField="PlaceCod" HeaderText="Machine" InsertVisible="False" ReadOnly="True" SortExpression="PlaceCod" />
        <asp:BoundField DataField="NumOrders" HeaderText="Orders #" InsertVisible="False" ReadOnly="True" SortExpression="NumOrders" />
        <asp:BoundField DataField="NumStacks" HeaderText="Bunks #" InsertVisible="False" ReadOnly="True" SortExpression="NumStacks" />
        <asp:BoundField DataField="NumSheets" HeaderText="Sheets #" InsertVisible="False" ReadOnly="True" SortExpression="NumSheets" />
        <asp:BoundField DataField="NumItems" HeaderText="Items #" InsertVisible="False" ReadOnly="True" SortExpression="NumItems" />
        <asp:BoundField DataField="TotalTime" HeaderText="Estimated Time" SortExpression="TotalTime" DataFormatString="{0:N2} min" ItemStyle-CssClass="text-right">
            <HeaderStyle CssClass="text-right"></HeaderStyle>
            <ItemStyle CssClass="text-right"></ItemStyle>
        </asp:BoundField>
    </Columns>
</asp:GridView>

<asp:ObjectDataSource ID="odsOrders" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getRunning" TypeName="AppData.DS_AppTableAdapters.BatchListTableAdapter"></asp:ObjectDataSource>