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

<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="BatchID,OrdID" DataSourceID="ods" CssClass="table table-sm table-striped textCondens" OnSelectedIndexChanged="grView_SelectedIndexChanged" AllowPaging="true" PageSize="10">
    <HeaderStyle CssClass="default" />
    <PagerStyle CssClass="active GridPager" />
    <PagerSettings Mode="NumericFirstLast" />
    <EmptyDataTemplate>
        <div class="alert alert-warning">
            No record
        </div>
    </EmptyDataTemplate>
    <Columns>
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:LinkButton ID="lbtSel" runat="server" CausesValidation="False" CommandName="Select" CssClass="btn btn-dark btn-sm py-0" ToolTip='<%# traduci("ExchangeOrder") %>'><i class="fa fa-arrows-h" aria-hidden="true"></i></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="OrderExtCode" HeaderText="Ord.Code" SortExpression="OrderExtCode" />
        <asp:BoundField DataField="TimeQuota" HeaderText="%" ReadOnly="True" SortExpression="TimeQuota" DataFormatString="{0:P1}" />
        <asp:BoundField DataField="EstProcTime" HeaderText="EstProcTime" SortExpression="EstProcTime" DataFormatString="{0:N1} min" />
        <asp:BoundField DataField="EstNumBin" HeaderText="# Bin" SortExpression="EstNumBin" />
        <asp:BoundField DataField="EstNumCart" HeaderText="# Cart" SortExpression="EstNumCart" />
        <asp:BoundField DataField="EstNumPart" HeaderText="# Part" SortExpression="EstNumPart" />
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByBatch" TypeName="AppData.DS_AppTableAdapters.OrderListTreeTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hfBatchId" DefaultValue="0" Name="BatchID" PropertyName="Value" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfBatchId" />