Update x tablet x mostrare avanzamento prod
This commit is contained in:
@@ -707,6 +707,7 @@
|
||||
<Content Include="WebUserControls\cmp_dettODL.ascx" />
|
||||
<Content Include="WebUserControls\cmp_dettPODL.ascx" />
|
||||
<Content Include="WebUserControls\cmp_disabled.ascx" />
|
||||
<Content Include="WebUserControls\cmp_displNumPzProd.ascx" />
|
||||
<Content Include="WebUserControls\cmp_HwSwInfo.ascx" />
|
||||
<Content Include="WebUserControls\cmp_newODL.ascx" />
|
||||
<Content Include="WebUserControls\cmp_selPzPallet.ascx" />
|
||||
@@ -1012,6 +1013,13 @@
|
||||
<Compile Include="WebUserControls\cmp_disabled.ascx.designer.cs">
|
||||
<DependentUpon>cmp_disabled.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_displNumPzProd.ascx.cs">
|
||||
<DependentUpon>cmp_displNumPzProd.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_displNumPzProd.ascx.designer.cs">
|
||||
<DependentUpon>cmp_displNumPzProd.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_HwSwInfo.ascx.cs">
|
||||
<DependentUpon>cmp_HwSwInfo.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_displNumPzProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.cmp_displNumPzProd" %>
|
||||
|
||||
<div class="progress">
|
||||
<div runat="server" id="divGreen" class="progress-bar bg-success" style="width: 20%">
|
||||
<asp:Label runat="server" ID="lblGreen" />
|
||||
</div>
|
||||
<div runat="server" id="divYellow" class="progress-bar bg-warning text-dark" style="width: 30%">
|
||||
<asp:Label runat="server" ID="lblYellow" />
|
||||
</div>
|
||||
<div runat="server" id="divGray" class="progress-bar bg-secondary" style="width: 40%">
|
||||
<asp:Label runat="server" ID="lblGray" />
|
||||
</div>
|
||||
<div runat="server" id="divBlue" class="progress-bar bg-info" style="width: 0%">
|
||||
<asp:Label runat="server" ID="lblBlue" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ID="hfProdCount" />
|
||||
@@ -0,0 +1,122 @@
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class cmp_displNumPzProd : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected int nBlue = 0;
|
||||
protected int nGray = 0;
|
||||
protected int nGreen = 0;
|
||||
protected int nYellow = 0;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public prodCounter datiProd
|
||||
{
|
||||
set
|
||||
{
|
||||
// chiamo refresh e calcoli
|
||||
updateDisplay(value);
|
||||
}
|
||||
}
|
||||
|
||||
public int numBlue
|
||||
{
|
||||
set
|
||||
{
|
||||
divBlue.Style.Remove("width");
|
||||
divBlue.Style.Add("width", $"{value}%");
|
||||
lblBlue.Text = $"{value}%";
|
||||
}
|
||||
}
|
||||
|
||||
public int numGray
|
||||
{
|
||||
set
|
||||
{
|
||||
divGray.Style.Remove("width");
|
||||
divGray.Style.Add("width", $"{value}%");
|
||||
lblGray.Text = $"{value}%";
|
||||
}
|
||||
}
|
||||
|
||||
public int numGreen
|
||||
{
|
||||
set
|
||||
{
|
||||
divGreen.Style.Remove("width");
|
||||
divGreen.Style.Add("width", $"{value}%");
|
||||
lblGreen.Text = $"{value}%";
|
||||
}
|
||||
}
|
||||
|
||||
public int numYellow
|
||||
{
|
||||
set
|
||||
{
|
||||
divYellow.Style.Remove("width");
|
||||
divYellow.Style.Add("width", $"{value}%");
|
||||
lblYellow.Text = $"{value}%";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void updateDisplay(prodCounter countData)
|
||||
{
|
||||
decimal denom = countData.numPzProd > countData.numPzOrd ? (decimal)countData.numPzProd / 100 : (decimal)countData.numPzOrd / 100;
|
||||
// calcolo se sono nel caso prod < ordinati o se sono andato OVER
|
||||
if (countData.numPzProd < countData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)countData.numPzConf / denom);
|
||||
nYellow = (int)Math.Floor((decimal)(countData.numPzProd - countData.numPzConf) / denom);
|
||||
nGray = 100 - (nGreen + nYellow);
|
||||
nBlue = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// devo verificare SE ne ho confermati meno che ordinati o meno...
|
||||
if (countData.numPzConf < countData.numPzOrd)
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)countData.numPzConf / denom);
|
||||
nBlue = (int)Math.Floor((decimal)(countData.numPzProd - countData.numPzConf) / denom);
|
||||
}
|
||||
else
|
||||
{
|
||||
nGreen = (int)Math.Floor((decimal)countData.numPzOrd / denom);
|
||||
nBlue = (int)Math.Floor((decimal)(countData.numPzProd - countData.numPzOrd) / denom);
|
||||
}
|
||||
nYellow = 0;
|
||||
nGray = 0;
|
||||
}
|
||||
// disegno!
|
||||
numGreen = nGreen;
|
||||
numYellow = nYellow;
|
||||
numGray = nGray;
|
||||
numBlue = nBlue;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_displNumPzProd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divGreen.
|
||||
/// </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 divGreen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblGreen.
|
||||
/// </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 lblGreen;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divYellow.
|
||||
/// </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 divYellow;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblYellow.
|
||||
/// </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 lblYellow;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divGray.
|
||||
/// </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 divGray;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblGray.
|
||||
/// </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 lblGray;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divBlue.
|
||||
/// </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 divBlue;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblBlue.
|
||||
/// </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 lblBlue;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfProdCount.
|
||||
/// </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.HiddenField hfProdCount;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +1,82 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_mappaStato.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_mappaStato" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_displNumPzProd.ascx" TagPrefix="uc1" TagName="cmp_displNumPzProd" %>
|
||||
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<div class="col-6 col-sm-6 col-md-4 col-lg-3 col-xl-2 mb-3 px-1 bloccoMacc">
|
||||
<asp:LinkButton ID="hlMacchina" runat="server" OnClick="hlMacchina_Click" CommandArgument='<%# Eval("IdxMacchina") %>'>
|
||||
<div class='card text-white mapBlock rCAll <%# Eval("Semaforo") %> p-0 m-0'>
|
||||
<img class="card-img bg-dark rCTop" src='<%# ImgUrlMacc(Eval("url")) %>' alt='<%# Eval("CodMacchina") %>'>
|
||||
<div class="m-1 bg-black rCAll">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start rCTop">
|
||||
<div class="labelTopDx text-right px-2">
|
||||
<asp:Label runat="server" ID="lblBadge" Text='<%# Eval("CodArticolo","art: {0}") %>' />
|
||||
<asp:Label runat="server" ID="lblODC" Text='<%# Eval("idxODL","(ODL {0})") %>' />
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<asp:Repeater ID="repLI" runat="server" DataSourceID="ods">
|
||||
<ItemTemplate>
|
||||
<div class="col-6 col-sm-6 col-md-4 col-lg-3 col-xl-2 mb-3 px-1 bloccoMacc">
|
||||
<asp:LinkButton ID="hlMacchina" runat="server" OnClick="hlMacchina_Click" CommandArgument='<%# Eval("IdxMacchina") %>'>
|
||||
<div class='card text-white mapBlock rCAll <%# Eval("Semaforo") %> p-0 m-0'>
|
||||
<img class="card-img bg-dark rCTop" src='<%# ImgUrlMacc(Eval("url")) %>' alt='<%# Eval("CodMacchina") %>'>
|
||||
<div class="m-1 bg-black rCAll">
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start rCTop">
|
||||
<div class="labelTopDx text-right px-2">
|
||||
<asp:Label runat="server" ID="lblBadge" Text='<%# Eval("CodArticolo","art: {0}") %>' />
|
||||
<asp:Label runat="server" ID="lblODC" Text='<%# Eval("idxODL","(ODL {0})") %>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-black p-0 rCBot">
|
||||
<div class='row justify-content-center mx-0'>
|
||||
<div class="col-12 px-1">
|
||||
<h4 class="text-left">
|
||||
<asp:Label runat="server" ID="lblTitle" Text='<%# Eval("Nome") %>' /></h4>
|
||||
</div>
|
||||
<div class='col-12 p-1 <%# Eval("Semaforo") %>'>
|
||||
<div class="d-flex">
|
||||
<div class="p-0 mr-auto">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblStato" Text='<%# Eval("DescrizioneStato") %>' /></b>
|
||||
</div>
|
||||
<div class="p-0">
|
||||
<asp:Label runat="server" ID="lblDurata" Text='<%# formatDurata(Eval("Durata")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 px-0 pb-1 text-nowrap" style="font-size: 0.85em;">
|
||||
<div class="row px-1">
|
||||
<div class="col pr-0">
|
||||
<small class="text-success">Confermati</small>
|
||||
</div>
|
||||
<div class="col text-center px-0">
|
||||
<small class="text-warning">Prodotti</small>
|
||||
</div>
|
||||
<div class="col text-right pl-0">
|
||||
<small class="text-light">Ordinati</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row px-1">
|
||||
<div class="col pr-0">
|
||||
<asp:Label runat="server" ID="lblPezziConf" Text='<%# Eval("PezziConf","{0:N0}") %>' ToolTip="pz confermati" />
|
||||
</div>
|
||||
<div class="col text-center px-0">
|
||||
<asp:Label runat="server" ID="lblPezziProd" Text='<%# Eval("PezziProd","{0:N0}") %>' ToolTip="pz prodotti" />
|
||||
</div>
|
||||
<div class="col text-right pl-0">
|
||||
<asp:Label runat="server" ID="lblNumPezzi" Text='<%# Eval("NumPezzi","{0:N0}") %>' ToolTip="pz lanciati" />
|
||||
</div>
|
||||
</div>
|
||||
<uc1:cmp_displNumPzProd runat="server" ID="cmp_displNumPzProd" numGreen="35" numYellow="25" numGray="15" datiProd='<%# setData(Eval("PezziConf"),Eval("PezziProd"), Eval("NumPezzi")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-black p-0 rCBot">
|
||||
<div class='row justify-content-center mx-0'>
|
||||
<div class="col-12 px-1">
|
||||
<h4 class="text-left">
|
||||
<asp:Label runat="server" ID="lblTitle" Text='<%# Eval("Nome") %>' /></h4>
|
||||
</div>
|
||||
<div class='col-12 p-1 <%# Eval("Semaforo") %>'>
|
||||
<div class="d-flex">
|
||||
<div class="p-0 mr-auto">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblStato" Text='<%# Eval("DescrizioneStato") %>' /></b>
|
||||
</div>
|
||||
<div class="p-0">
|
||||
<asp:Label runat="server" ID="lblDurata" Text='<%# formatDurata(Eval("Durata")) %>' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 px-1 pb-1">
|
||||
<div class="d-flex">
|
||||
<div class="p-1 mr-auto">
|
||||
<asp:Label runat="server" ID="Label2" Text='<%# Eval("PezziProd","prod: {0}") %>' ToolTip="pz prodotti" />
|
||||
/
|
||||
<asp:Label runat="server" ID="lblPzLanciati" Text='<%# Eval("NumPezzi","tot: {0}") %>' ToolTip="pz lanciati" />
|
||||
</div>
|
||||
<div class="p-1">
|
||||
<asp:Label runat="server" ID="Label1" Text='<%# Eval("PezziConf","conf: {0}") %>' ToolTip="pz confermati" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByRefreshDataOpr"
|
||||
TypeName="MapoDb.DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="3001" Name="maxAgeSec" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="MatrOpr" Type="Int32" SessionField="MatrOpr" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<!-- timer refresh dei blocchi in mappa stato: 2 sec, 2'000 ms -->
|
||||
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByRefreshDataOpr"
|
||||
TypeName="MapoDb.DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="3001" Name="maxAgeSec" Type="Int32" />
|
||||
<asp:SessionParameter DefaultValue="0" Name="MatrOpr" Type="Int32" SessionField="MatrOpr" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
<!-- timer refresh dei blocchi in mappa stato: 2 sec, 2'000 ms -->
|
||||
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
|
||||
</asp:Timer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using MapoSDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
@@ -50,6 +51,23 @@ namespace MoonProTablet.WebUserControls
|
||||
repLI.DataBind();
|
||||
}
|
||||
|
||||
public prodCounter setData(object _numConf, object _numProd, object _numOrd)
|
||||
{
|
||||
int numConf = 0;
|
||||
int numProd = 0;
|
||||
int numOrd = 0;
|
||||
int.TryParse(_numConf.ToString(), out numConf);
|
||||
int.TryParse(_numProd.ToString(), out numProd);
|
||||
int.TryParse(_numOrd.ToString(), out numOrd);
|
||||
prodCounter countData = new prodCounter()
|
||||
{
|
||||
numPzConf = numConf,
|
||||
numPzOrd = numOrd,
|
||||
numPzProd = numProd
|
||||
};
|
||||
return countData;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
+689
-573
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user