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


<div class="card text-center mb-2" style="width: 100%;">
  <h5 class="card-header bg-warning text-light">ITEMS</h5>
  <div class="card-body py-1">
    <div class="row">
      <div class="col-12 px-0">
        <asp:GridView ID="grView" runat="server" AutoGenerateColumns="False" DataKeyNames="ItemID" DataSourceID="ods" CssClass="table table-striped table-sm small" AllowPaging="true">
          <Columns>
            <asp:TemplateField HeaderText="QR">
              <ItemTemplate>
                <asp:Image runat="server" Height='<%# qrSize %>' Visible='<%# hfShowQr.Value.ToLower()=="true" %>' ImageUrl='<%# getImgUrl(Eval("ItemDtmx")) %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ItemID" InsertVisible="False" SortExpression="ItemID">
              <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("ItemID") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="KitID" SortExpression="KitID">
              <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("KitID") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="StatusID" SortExpression="StatusID">
              <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%# Eval("StatusID") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ItemDtmx" SortExpression="ItemDtmx">
              <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Eval("ItemDtmx") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ItemExtCode" SortExpression="ItemExtCode">
              <ItemTemplate>
                <asp:Label ID="Label5" runat="server" Text='<%# Eval("ItemExtCode") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="ItemDesc" SortExpression="ItemDesc">
              <ItemTemplate>
                <asp:Label ID="Label6" runat="server" Text='<%# Eval("ItemDesc") %>' CssClass='<%# cssByStatus(Eval("StatusID")) %>' />
              </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PostProcList" HeaderText="PostProcList" SortExpression="PostProcList" />
            <asp:BoundField DataField="ProcessesReq" HeaderText="ProcessesReq" SortExpression="ProcessesReq" />
            <asp:BoundField DataField="OnCartDate" HeaderText="OnCartDate" SortExpression="OnCartDate" />
          </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getBySheet" TypeName="AppData.DS_AppTableAdapters.ItemListTableAdapter">
          <SelectParameters>
            <asp:ControlParameter ControlID="hfSheetID" DefaultValue="0" Name="SheetID" PropertyName="Value" Type="Int32" />
          </SelectParameters>
        </asp:ObjectDataSource>
        <asp:HiddenField ID="hfSheetID" runat="server" />
        <asp:HiddenField ID="hfShowQr" runat="server" Value="false" />
        <asp:HiddenField ID="hfQrSize" runat="server" Value="32" />
        <asp:HiddenField ID="hfNumRow" runat="server" Value="50" />
      </div>
    </div>
  </div>
</div>
