typo + fix metodo ricalcolo in MP/TAB post udpate
This commit is contained in:
@@ -381,7 +381,7 @@ namespace MoonProTablet.WebUserControls
|
||||
confermaPerGiorni();
|
||||
}
|
||||
// refresh tabella dati tablet...
|
||||
DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_0"));
|
||||
DataLayer.obj.taMSE.forceRefreshMacchina(idxMacchina);
|
||||
// mostro output
|
||||
lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! (+{1} pz scarto) alle {2:yyyy-MM-dd HH:mm:ss}", numPzConfermati, numPzScarto2Rec, dtReqUpdate);
|
||||
// cambio button conferma...
|
||||
|
||||
@@ -70,7 +70,6 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
Response.Redirect("~/MappaStato.aspx");
|
||||
}
|
||||
//hlFermate.Visible = showInsFermata;
|
||||
}
|
||||
/// <summary>
|
||||
/// url completo immagine
|
||||
|
||||
@@ -4,137 +4,144 @@ using System;
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_dettaglioProd : System.Web.UI.UserControl
|
||||
public partial class mod_dettaglioProd : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
popolaLabels();
|
||||
}
|
||||
/// <summary>
|
||||
/// popola le labels
|
||||
/// </summary>
|
||||
private void popolaLabels()
|
||||
{
|
||||
// cambio: leggo NUOVA riga report...
|
||||
DS_ProdTempi.MappaStatoExplDataTable tabDati = DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_5"));
|
||||
DS_ProdTempi.MappaStatoExplRow rigaDati = (DS_ProdTempi.MappaStatoExplRow)tabDati.Rows.Find(idxMacchina);
|
||||
// carico le info!
|
||||
lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", rigaDati.idxODL, rigaDati.DataInizioODL);
|
||||
/************************************
|
||||
* data la postazione corrente decide cosa mostrare e come
|
||||
************************************/
|
||||
lblCodArticolo.Text = rigaDati.CodArticolo;
|
||||
lblNumPzLanciati.Text = string.Format("{0} pz.", rigaDati.NumPezzi);
|
||||
lblNumPzConf.Text = string.Format("{0} pz.", rigaDati.PezziConf);
|
||||
lblNumPzFatti.Text = string.Format("({0} pz.)", rigaDati.PezziProd);
|
||||
|
||||
|
||||
/************************************
|
||||
* calcolo efficienza totale
|
||||
* se il calcolo non è possibile mette n/a
|
||||
************************************/
|
||||
decimal tempoProd = rigaDati.TCAssegnato * rigaDati.PezziConf;
|
||||
try
|
||||
{
|
||||
lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoOn / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTot.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoAuto / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoro.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoRun / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEff.Text = "n/a";
|
||||
}
|
||||
|
||||
/************************************
|
||||
* imposto i TEMPI CICLO
|
||||
************************************/
|
||||
// riporto Tempo ciclo impostato
|
||||
lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCAssegnato));
|
||||
// riporto Tempo ciclo medio
|
||||
lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCMedio));
|
||||
lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCMedioRT));
|
||||
// riporto Tempo ciclo lavoro
|
||||
lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCLav));
|
||||
lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCLavRT));
|
||||
// riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore
|
||||
lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCEff));
|
||||
lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCEffRT));
|
||||
|
||||
/************************************
|
||||
* Sistemo efficienze RT da tempi ciclo
|
||||
************************************/
|
||||
try
|
||||
{
|
||||
lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCMedioRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTotRT.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCLavRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCEffRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEffRT.Text = "n/a";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxMacchina
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("idxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina", value);
|
||||
}
|
||||
}
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
popolaLabels();
|
||||
}
|
||||
/// <summary>
|
||||
/// popola le labels
|
||||
/// </summary>
|
||||
private void popolaLabels()
|
||||
{
|
||||
// forzo ricalcolo
|
||||
DataLayer.obj.taMSE.forceRefreshMacchina(idxMacchina);
|
||||
// leggo riga...
|
||||
DS_ProdTempi.MappaStatoExplRow rigaDati = DataLayer.obj.taMSE.getByIdxMacchina(idxMacchina)[0];
|
||||
|
||||
#if false
|
||||
// cambio: leggo NUOVA riga report...
|
||||
DS_ProdTempi.MappaStatoExplDataTable tabDati = DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_5"));
|
||||
DS_ProdTempi.MappaStatoExplRow rigaDati = (DS_ProdTempi.MappaStatoExplRow)tabDati.Rows.Find(idxMacchina);
|
||||
#endif
|
||||
// carico le info!
|
||||
lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", rigaDati.idxODL, rigaDati.DataInizioODL);
|
||||
/************************************
|
||||
* data la postazione corrente decide cosa mostrare e come
|
||||
************************************/
|
||||
lblCodArticolo.Text = rigaDati.CodArticolo;
|
||||
lblNumPzLanciati.Text = string.Format("{0} pz.", rigaDati.NumPezzi);
|
||||
lblNumPzConf.Text = string.Format("{0} pz.", rigaDati.PezziConf);
|
||||
lblNumPzFatti.Text = string.Format("({0} pz.)", rigaDati.PezziProd);
|
||||
|
||||
|
||||
/************************************
|
||||
* calcolo efficienza totale
|
||||
* se il calcolo non è possibile mette n/a
|
||||
************************************/
|
||||
decimal tempoProd = rigaDati.TCAssegnato * rigaDati.PezziConf;
|
||||
try
|
||||
{
|
||||
lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoOn / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTot.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoAuto / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoro.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaDati.TempoRun / 100));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEff.Text = "n/a";
|
||||
}
|
||||
|
||||
/************************************
|
||||
* imposto i TEMPI CICLO
|
||||
************************************/
|
||||
// riporto Tempo ciclo impostato
|
||||
lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCAssegnato));
|
||||
// riporto Tempo ciclo medio
|
||||
lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCMedio));
|
||||
lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCMedioRT));
|
||||
// riporto Tempo ciclo lavoro
|
||||
lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCLav));
|
||||
lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCLavRT));
|
||||
// riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore
|
||||
lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaDati.TCEff));
|
||||
lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaDati.TCEffRT));
|
||||
|
||||
/************************************
|
||||
* Sistemo efficienze RT da tempi ciclo
|
||||
************************************/
|
||||
try
|
||||
{
|
||||
lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCMedioRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaTotRT.Text = "n/a";
|
||||
}
|
||||
// calcolo efficienza lavoro - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCLavRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaLavoroRT.Text = "n/a";
|
||||
|
||||
}
|
||||
// calcolo efficienza Teorica - se il calcolo non è possibile mette n/a
|
||||
try
|
||||
{
|
||||
lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaDati.TCAssegnato / rigaDati.TCEffRT));
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblEfficienzaEffRT.Text = "n/a";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxMacchina
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("idxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user