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



<asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" CssClass="table table-striped table-sm textCondens" AllowPaging="true">
    <Columns>
        <asp:TemplateField HeaderText="PART" SortExpression="ItemExtCode">
            <ItemTemplate>
                <div class="row">
                    <div class="col-12 col-md-3">
                        <div class="font-weight-bold textBig">
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("ItemExtCode") %>' />
                        </div>
                        <asp:Label ID="ItemDescLabel" runat="server" Text='<%# Eval("ItemDesc") %>' />
                    </div>
                    <div class="col-12 col-md-3">
                        <div class="font-weight-bold textBig">
                            <asp:Image runat="server" Height="64" Visible='<%# !checkProd %>' ImageUrl='<%# getImgUrl(Eval("ItemDtmx")) %>' CssClass="img-fluid" />
                            <asp:Label ID="ItemDtmxLabel" runat="server" Text='<%# Eval("ItemDtmx") %>' Visible='<%# showFull %>' />
                        </div>
                        <div class="row" runat="server" visible='<%# showFull %>'>
                            <div class="col-6">
                                <i class="fa fa-wrench" aria-hidden="true"></i>
                                <asp:Label ID="PostProcListLabel" runat="server" Text='<%# Eval("PostProcList") %>' />
                            </div>
                            <div class="col-6">
                                <i class="fa fa-paint-brush" aria-hidden="true"></i>
                                <asp:Label ID="ProcessesReqLabel" runat="server" Text='<%# Eval("ProcessesReq") %>' />
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-md-3">
                        <div class="row">
                            <div class="col-8">
                                <div class="font-weight-bold textBig">
                                    <asp:Label ID="MatExtCodeLabel" runat="server" Text='<%# Eval("MatExtCode") %>' />
                                </div>
                                <asp:Label ID="MatDescLabel" runat="server" Text='<%# Eval("MatDesc") %>' Visible='<%# showFull %>' />
                            </div>
                            <div class="col-4">
                                <div runat="server" visible='<%# showFull %>'>
                                    <div class="font-weight-bold textBig">
                                        <asp:Label ID="OrderExtCodeLabel" runat="server" Text='<%# Eval("OrderExtCode") %>' />
                                    </div>
                                    <asp:Label ID="lblOrder" runat="server" Text='<%# traduci("Order") %>' />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-md-3">
                        <div class="row">
                            <div class="col-6">
                                <div runat="server" visible='<%# showFull %>'>
                                    <div class="textBig">
                                        CART <b>
                                            <asp:Label ID="CartIndexLabel" runat="server" Text='<%# Eval("CartIndex","C{0}") %>' /></b>
                                    </div>
                                    <asp:Label ID="CartDtmxLabel" runat="server" Text='<%# Eval("CartDtmx") %>' />
                                </div>
                            </div>
                            <div class="col-6">
                                <div runat="server" visible='<%# showFull %>'>
                                    <div class="textBig">
                                        BIN <b>
                                            <asp:Label ID="BinIndexLabel" runat="server" Text='<%# Eval("BinIndex","B{0}") %>' /></b>
                                    </div>
                                    <asp:Label ID="BinDtmxLabel" runat="server" Text='<%# Eval("BinDtmx") %>' />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False" ItemStyle-Width="3em">
            <ItemTemplate>
                <asp:LinkButton ID="lbtSetScrap" runat="server" CausesValidation="False" CommandArgument='<%# Eval("ItemID") %>' Visible='<%# checkVisible(Eval("StatusID")) && enableScrap %>' CommandName="Select" CssClass="btn btn-lg btn-block btn-danger" OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmSendScrap") %>' ToolTip='<%# traduci("SetScrap") %>'><i class="fa fa-recycle" aria-hidden="true"></i></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        <%: traduci("NoRecord") %>
    </EmptyDataTemplate>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getMissingByBatch" TypeName="AppData.DS_AppTableAdapters.ItemSearchDetailTableAdapter" FilterExpression=" CartDtmx LIKE '%{0}%' OR BinDtmx LIKE '%{0}%' OR OrderExtCode LIKE '%{0}%' OR ItemExtCode LIKE '%{0}%' OR ItemDesc LIKE '%{0}%' OR ItemDtmx LIKE '%{0}%' OR MatDesc LIKE '%{0}%' OR (CONVERT(MatExtCode, 'System.String') LIKE '%{0}%') ">
    <SelectParameters>
        <asp:ControlParameter ControlID="hfBatchID" DefaultValue="0" Name="BatchID" PropertyName="Value" Type="Int32" />
    </SelectParameters>
    <FilterParameters>
        <asp:SessionParameter SessionField="valoreSearch" DefaultValue="" Type="String" />
    </FilterParameters>
</asp:ObjectDataSource>
<asp:HiddenField ID="hfBatchID" runat="server" />
<asp:HiddenField ID="hfShowFull" runat="server" />
<asp:HiddenField ID="hfEnableScrap" runat="server" />
