Fix progressbar x BUNK
This commit is contained in:
@@ -12,9 +12,7 @@
|
||||
<div class="col-lg-3">
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<asp:LinkButton runat="server" ID="lbtPrint" CssClass="btn btn-success btn-block" OnClick="lbtPrint_Click">
|
||||
PRINT <i class="fa fa-print" aria-hidden="true"></i>
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtPrint" CssClass="btn btn-success btn-block" OnClick="lbtPrint_Click"> PRINT <i class="fa fa-print" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
</div>
|
||||
@@ -50,6 +48,18 @@
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -113,6 +113,7 @@ namespace NKC_WF.WebUserControls
|
||||
public void doUpdate()
|
||||
{
|
||||
repCtrl.DataBind();
|
||||
repProgress.DataBind();
|
||||
checkPrint();
|
||||
}
|
||||
|
||||
@@ -172,5 +173,16 @@ namespace NKC_WF.WebUserControls
|
||||
// aggiorno stato BATCH
|
||||
ComLib.updateBatchPositionByBunk(StackId);
|
||||
}
|
||||
|
||||
public string getProgressStyle(object _num, object _den)
|
||||
{
|
||||
string answ = "width: 10%";
|
||||
int num = 0;
|
||||
int den = 1;
|
||||
int.TryParse(_num.ToString(), out num);
|
||||
int.TryParse(_den.ToString(), out den);
|
||||
answ = $"width: {num * 100 / den}%";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,5 +85,23 @@ namespace NKC_WF.WebUserControls
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo repProgress.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater repProgress;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo odsAdvance.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource odsAdvance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user