Bozza gestione buttons
This commit is contained in:
+3
-1
@@ -124,8 +124,10 @@ namespace AppData
|
||||
{
|
||||
waiting = 0,
|
||||
running,
|
||||
error,
|
||||
completed,
|
||||
aborted,
|
||||
error
|
||||
accepted,
|
||||
refused
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,16 +19,7 @@
|
||||
<div class="col-12" runat="server" id="divStatus">
|
||||
<uc1:cmp_orderStatus runat="server" ID="cmp_orderStatus" />
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divButtons">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-block btn-success" ID="lbtConfirm">Accetta</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-block btn-danger" ID="lbtCancel">Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -94,19 +94,11 @@ namespace NKC_WF
|
||||
private void checkVisibility()
|
||||
{
|
||||
bool hasBatch = false;
|
||||
bool isBatchCompleted = false;
|
||||
if (currBatchID > 0)
|
||||
{
|
||||
hasBatch = true;
|
||||
}
|
||||
// !!!FIXME!!! fare lettura
|
||||
// leggo da REDIS se è stato COMPLETATO il Batch...
|
||||
if (true)
|
||||
{
|
||||
isBatchCompleted = true;
|
||||
}
|
||||
divStatus.Visible = hasBatch;
|
||||
divButtons.Visible = hasBatch && isBatchCompleted;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-27
@@ -38,32 +38,5 @@ namespace NKC_WF {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_orderStatus cmp_orderStatus;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divButtons.
|
||||
/// </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.HtmlControls.HtmlGenericControl divButtons;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtConfirm.
|
||||
/// </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.LinkButton lbtConfirm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCancel.
|
||||
/// </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.LinkButton lbtCancel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
(minutes)</dt>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="col-12" runat="server" id="divButtons">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-block btn-success" ID="lbtConfirm" OnClick="lbtConfirm_Click">Accetta</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-block btn-danger" ID="lbtCancel" OnClick="lbtCancel_Click">Annulla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Timer ID="TimerUpdateStatus" runat="server" Enabled="false" Interval="500" OnTick="TimerUpdateStatus_Tick"></asp:Timer>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace NKC_WF.WebUserControls
|
||||
lblNestingRuntime.Text = statoBatch.ProcessingRuntime.ToString();
|
||||
lblWrktimeEst.Text = (statoBatch.EstimatedWorktime / 60).ToString();
|
||||
// secondo status mostro barra...
|
||||
divProgress.Visible = (statoBatch.ProcessStatus > procStatus.waiting && statoBatch.ProcessStatus < procStatus.completed);
|
||||
divProgress.Visible = (statoBatch.ProcessStatus > procStatus.waiting && statoBatch.ProcessStatus < procStatus.error);
|
||||
divButtons.Visible = (statoBatch.ProcessStatus > procStatus.error && statoBatch.ProcessStatus < procStatus.accepted);
|
||||
}
|
||||
}
|
||||
TimerUpdateStatus.Enabled = statusPresent;
|
||||
@@ -82,5 +83,15 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
protected void lbtConfirm_Click(object sender, EventArgs e)
|
||||
{
|
||||
// accettazione ordine: scrivo su DB e QUINDI su redis indico accepted
|
||||
}
|
||||
|
||||
protected void lbtCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
// rifiuto ordine: ELIMINO su DB e QUINDI su redis indico refused
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,33 @@ namespace NKC_WF.WebUserControls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblWrktimeEst;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divButtons.
|
||||
/// </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.HtmlControls.HtmlGenericControl divButtons;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtConfirm.
|
||||
/// </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.LinkButton lbtConfirm;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCancel.
|
||||
/// </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.LinkButton lbtCancel;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo TimerUpdateStatus.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user