Completato componente statistiche
This commit is contained in:
@@ -1,38 +1,9 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %>
|
||||
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 runat="server" id="h5Title">
|
||||
<asp:Label runat="server" ID="lblTitle" /></h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<asp:Label runat="server" ID="lblTitRed" /></th>
|
||||
<th scope="col">
|
||||
<asp:Label runat="server" ID="lblTitYel" /></th>
|
||||
<th scope="col">
|
||||
<asp:Label runat="server" ID="lblTitGre" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-danger">
|
||||
<asp:Label runat="server" ID="lblValRed" /></td>
|
||||
<td class="text-warning">
|
||||
<asp:Label runat="server" ID="lblValYel" /></td>
|
||||
<td class="text-success">
|
||||
<asp:Label runat="server" ID="lblValGre" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:FormView ID="frmView" runat="server" DataSourceID="ods" Width="100%" Visible="false">
|
||||
<asp:FormView ID="frmView" runat="server" DataSourceID="ods" Width="100%">
|
||||
<ItemTemplate>
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 runat="server" id="h5Title" Text='<%# $"card-header py-1 {titleCss}" %>'>
|
||||
<h5 runat="server" id="h5Title" class='<%# $"card-header py-1 {titleCss}" %>'>
|
||||
<asp:Label ID="StatLabel" runat="server" Text='<%# Eval("Stat") %>' /></h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
|
||||
@@ -44,63 +44,19 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Css titolo
|
||||
/// </summary>
|
||||
public string titleCss = "bg-dark text-light";
|
||||
/// <summary>
|
||||
/// Css titolo
|
||||
/// </summary>
|
||||
public string title = "NONE";
|
||||
|
||||
public string titleCss { get; set; } = "bg-dark text-light";
|
||||
/// <summary>
|
||||
/// Valirizzazione variabili
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
h5Title.Attributes.Remove("class");
|
||||
h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}");
|
||||
lblTitle.Text = title;
|
||||
#if true
|
||||
// titoli
|
||||
try
|
||||
{
|
||||
lblTitRed.Text = currStat.vars[0].name;
|
||||
lblTitYel.Text = currStat.vars[1].name;
|
||||
lblTitGre.Text = currStat.vars[2].name;
|
||||
// valori
|
||||
lblValRed.Text = currStat.vars[0].value;
|
||||
lblValYel.Text = currStat.vars[1].value;
|
||||
lblValGre.Text = currStat.vars[2].value;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
#endif
|
||||
frmView.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Statistiche salvate (locali)
|
||||
/// </summary>
|
||||
protected stats _currStat { get; set; }
|
||||
/// <summary>
|
||||
/// Statistiche da mostrare
|
||||
/// </summary>
|
||||
public stats currStat
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currStat;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currStat = value;
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,78 +14,6 @@ namespace NKC_WF.WebUserControls
|
||||
public partial class cmp_MU_singleStat
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo h5Title.
|
||||
/// </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 h5Title;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTitle.
|
||||
/// </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.Label lblTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTitRed.
|
||||
/// </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.Label lblTitRed;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTitYel.
|
||||
/// </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.Label lblTitYel;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblTitGre.
|
||||
/// </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.Label lblTitGre;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblValRed.
|
||||
/// </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.Label lblValRed;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblValYel.
|
||||
/// </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.Label lblValYel;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblValGre.
|
||||
/// </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.Label lblValGre;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo frmView.
|
||||
/// </summary>
|
||||
|
||||
@@ -6,123 +6,22 @@
|
||||
<asp:HiddenField ID="hfBatchID" runat="server" />
|
||||
<div class="row mt-2">
|
||||
<div class="col-2">
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 class="card-header py-1 bg-primary text-light">BINS</h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">WAIT</th>
|
||||
<th scope="col">WIP</th>
|
||||
<th scope="col">DONE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-danger">12</td>
|
||||
<td class="text-warning">3</td>
|
||||
<td class="text-success">5</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 class="card-header py-1 bg-info">SHIFT B20190916.0</h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">DONE</th>
|
||||
<th scope="col">TOT</th>
|
||||
<th scope="col">RATIO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-success">2</td>
|
||||
<td class="text-warning">5</td>
|
||||
<td class="text-success">40%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBin" />
|
||||
</div>
|
||||
<div class="col-1">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<uc1:cmp_mu_singlestat runat="server" id="cmp_MU_singleStatBunk" />
|
||||
<%--<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 class="card-header py-1 bg-secondary text-light">BUNK ST00000A2</h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">DONE</th>
|
||||
<th scope="col">TOT</th>
|
||||
<th scope="col">RATIO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-success">3</td>
|
||||
<td class="text-warning">12</td>
|
||||
<td class="text-success">25%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>--%>
|
||||
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBatch" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatBunk" />
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatSheet" />
|
||||
</div>
|
||||
<div class="col-1">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 class="card-header py-1 bg-warning">SHEET SH00000123</h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">DONE</th>
|
||||
<th scope="col">TOT</th>
|
||||
<th scope="col">RATIO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-success">5</td>
|
||||
<td class="text-warning">25</td>
|
||||
<td class="text-success">20%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="card text-center mb-2" style="width: 100%;">
|
||||
<h5 class="card-header py-1 bg-success">CARTS</h5>
|
||||
<div class="card-body py-1">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">WAIT</th>
|
||||
<th scope="col">WIP</th>
|
||||
<th scope="col">DONE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-danger">24</td>
|
||||
<td class="text-warning">2</td>
|
||||
<td class="text-success">6</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<uc1:cmp_MU_singleStat runat="server" ID="cmp_MU_singleStatCart" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,24 +33,34 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
public void doUpdate()
|
||||
{
|
||||
// leggo stats e compongo
|
||||
List<varData> variabili = new List<varData>();
|
||||
variabili.Add(new varData { name = "WAIT", value = "2" });
|
||||
variabili.Add(new varData { name = "WIP", value = "1" });
|
||||
variabili.Add(new varData { name = "DONE", value = "3" });
|
||||
stats bunkStsat = new stats
|
||||
{
|
||||
vars = variabili
|
||||
};
|
||||
|
||||
cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light";
|
||||
// fix x BIN
|
||||
cmp_MU_singleStatBin.BatchId = BatchId;
|
||||
cmp_MU_singleStatBin.statLevel = (int)StatType.BIN;
|
||||
cmp_MU_singleStatBin.titleCss = "bg-primary text-light";
|
||||
|
||||
|
||||
// fix x BATCH
|
||||
cmp_MU_singleStatBatch.BatchId = BatchId;
|
||||
cmp_MU_singleStatBatch.statLevel = (int)StatType.BATCH;
|
||||
cmp_MU_singleStatBatch.titleCss = "bg-info";
|
||||
|
||||
// fix x BUNK
|
||||
cmp_MU_singleStatBunk.BatchId = BatchId;
|
||||
cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK;
|
||||
cmp_MU_singleStatBunk.statLevel = (int)StatType.BUNK;
|
||||
cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light";
|
||||
|
||||
|
||||
// fix x SHEET
|
||||
cmp_MU_singleStatSheet.BatchId = BatchId;
|
||||
cmp_MU_singleStatSheet.statLevel = (int)StatType.SHEET;
|
||||
cmp_MU_singleStatSheet.titleCss = "bg-warning";
|
||||
|
||||
// fix x CART
|
||||
cmp_MU_singleStatCart.BatchId = BatchId;
|
||||
cmp_MU_singleStatCart.statLevel = (int)StatType.CART;
|
||||
cmp_MU_singleStatCart.titleCss = "bg-success";
|
||||
|
||||
cmp_MU_singleStatBunk.title = "BUNK";
|
||||
cmp_MU_singleStatBunk.currStat = bunkStsat;
|
||||
}
|
||||
/// <summary>
|
||||
/// Calcola il rapporto tra 2 valori
|
||||
|
||||
@@ -23,6 +23,24 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_singleStatBin.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBin;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_singleStatBatch.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBatch;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_singleStatBunk.
|
||||
/// </summary>
|
||||
@@ -31,5 +49,23 @@ namespace NKC_WF.WebUserControls
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBunk;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_singleStatSheet.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatSheet;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_MU_singleStatCart.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatCart;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user