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

<asp:CheckBox runat="server" ID="chkRedux" Checked="true" Text="Summary" AutoPostBack="true" />
<asp:Repeater ID="repCtrl" runat="server" DataSourceID="ods">
    <ItemTemplate>
        <div class="row text-center my-1 mx-0">
            <div class="col-1 px-0 col-lg-3 px-lg-2 text-right">
                <asp:Label runat="server" ID="lblNext" CssClass="text-primary px-1" Width="100%" Visible='<%#  Eval("IsNext").ToString()=="1" %>'><span class="d-none d-lg-inline">NEXT </span><i class="fa fa-arrow-circle-right" aria-hidden="true"></i></asp:Label>
                <asp:Label runat="server" ID="lblDone" CssClass="text-success px-1" Visible='<%#  Eval("Prepared").ToString()!="" %>'><span class="d-none d-lg-inline"><%#  Eval("Prepared","{0:ddd yyyy-MM-dd HH:mm}") %></span><i class="fa fa-check-circle" aria-hidden="true"></i></asp:Label>
            </div>
            <div runat="server" id="divMain" class='<%# "col-11 col-lg-9 " + cssByPrepared(Eval("Prepared"),Eval("IsNext")) %>'>
                <div class="row">
                    <div class="col-1 px-0 col-md-2 px-md-2 font-weight-bold"><%# Eval("SheetIndex") %></div>
                    <div class="col-8 col-md-8 px-md-2 text-truncate"><%#  Eval("MatDesc") %></div>
                    <div class="col-3 col-md-2 small text-right text-truncate"><b><%# Eval("MatExtCode") %></b></div>
                </div>
            </div>
        </div>
    </ItemTemplate>
</asp:Repeater>
<asp:HiddenField ID="hfStackId" runat="server" />
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByStackRedux" TypeName="AppData.DS_AppTableAdapters.SheetListTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hfStackId" DefaultValue="0" Name="StackID" PropertyName="Value" Type="Int32" />
        <asp:ControlParameter ControlID="chkRedux" DefaultValue="0" Name="Redux" PropertyName="Checked" Type="Boolean" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="repProgress" runat="server" DataSourceID="odsAdvance">
    <ItemTemplate>
        <div class="progress">
            <div class="progress-bar" style='<%# getProgressStyle(Eval("NumSheetsPrepared"), Eval("NumSheets")) %>'></div>
        </div>
    </ItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource runat="server" ID="odsAdvance" OldValuesParameterFormatString="original_{0}" SelectMethod="getByKey" TypeName="AppData.DS_AppTableAdapters.StackListTableAdapter">
    <SelectParameters>
        <asp:ControlParameter ControlID="hfStackId" DefaultValue="0" Name="StackID" PropertyName="Value" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
