inizio modifica x gestire persistenza valori commessa x Valvital
This commit is contained in:
+11
-23
@@ -4,31 +4,19 @@
|
||||
<%@ Register Src="~/WebUserControls/mod_sendParameters.ascx" TagPrefix="uc1" TagName="mod_sendParameters" %>
|
||||
<%@ Register Src="~/WebUserControls/mod_dettMacchina.ascx" TagPrefix="uc1" TagName="mod_dettMacchina" %>
|
||||
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<div class="container-flow m-3" role="main">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8 col-lg-9 col-xl-10">
|
||||
<uc1:mod_dettMacchina runat="server" ID="mod_dettMacchina" />
|
||||
<uc1:mod_sendParameters runat="server" ID="mod_sendParameters" />
|
||||
<%--<div class="row textCondens">
|
||||
<div class="col-6">
|
||||
<asp:HyperLink runat="server" ID="hlScarti" NavigateUrl="~/Scarti" CssClass="btn btn-info btn-lg btn-block"><i class="fa fa-bug"></i> Reg. SCARTI</asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<asp:HyperLink runat="server" ID="hlControlli" NavigateUrl="~/Controlli" CssClass="btn btn-primary btn-lg btn-block"><i class="fa fa-wrench"></i> Reg.CONTROLLI</asp:HyperLink>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 col-lg-3 col-xl-2">
|
||||
<uc1:mod_directLinks runat="server" ID="mod_directLinks" />
|
||||
</div>
|
||||
<div class="container-flow m-3" role="main">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8 col-lg-9 col-xl-10">
|
||||
<uc1:mod_dettMacchina runat="server" ID="mod_dettMacchina" />
|
||||
<uc1:mod_sendParameters runat="server" ID="mod_sendParameters" />
|
||||
</div>
|
||||
<div class="col-12 col-md-4 col-lg-3 col-xl-2">
|
||||
<uc1:mod_directLinks runat="server" ID="mod_directLinks" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
</asp:Content>
|
||||
Generated
+32
-32
@@ -1,44 +1,44 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
|
||||
|
||||
public partial class SendParameters
|
||||
{
|
||||
public partial class SendParameters
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_dettMacchina.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina;
|
||||
/// <summary>
|
||||
/// mod_dettMacchina control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_sendParameters.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_sendParameters mod_sendParameters;
|
||||
/// <summary>
|
||||
/// mod_sendParameters control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_sendParameters mod_sendParameters;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_directLinks.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks;
|
||||
}
|
||||
/// <summary>
|
||||
/// mod_directLinks control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -857,6 +857,9 @@ namespace MoonProTablet.WebUserControls
|
||||
Response.Redirect("~/DettaglioMacchina.aspx");
|
||||
}
|
||||
}
|
||||
// invio task x end produzione...
|
||||
DataLayerObj.addTask4Machine(idxMacchinaFix, taskType.endProd, "");
|
||||
|
||||
// resetto ODL su redis...
|
||||
DataLayerObj.emptyCurrODL(idxMacchinaFix);
|
||||
// reset ODL!...
|
||||
|
||||
@@ -13,10 +13,29 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
public partial class mod_sendParameters : BaseUserControl
|
||||
{
|
||||
#region Protected Methods
|
||||
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected void lbtReload_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// wrapper recupero parametri macchina
|
||||
/// </summary>
|
||||
@@ -53,38 +72,7 @@ namespace MoonProTablet.WebUserControls
|
||||
DataLayerObj.updateMachineParameter(idxMacchina, Original_uid, reqValue);
|
||||
}
|
||||
}
|
||||
protected void lbtReload_Click(object sender, EventArgs e)
|
||||
{
|
||||
grView.DataBind();
|
||||
}
|
||||
|
||||
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
|
||||
{
|
||||
#if false
|
||||
var txtReqVal = grView.Rows[e.RowIndex].FindControl("txtReqValue") as TextBox;
|
||||
string Original_uid = e.Keys[0].ToString();
|
||||
// recupero items...
|
||||
List<objItem> dcList = DataLayer.getCurrObjItems(idxMacchina);
|
||||
// cerco quello da aggiornare
|
||||
objItem trovato = dcList.Find(obj => obj.uid == Original_uid);
|
||||
List<objItem> list2Update = new List<objItem>();
|
||||
// se trovato procedo
|
||||
if (trovato != null)
|
||||
{
|
||||
// aggiorno valore richiesto + dt richiesta
|
||||
trovato.reqValue = txtReqVal.Text.Trim();
|
||||
trovato.lastRequest = DateTime.Now;
|
||||
list2Update.Add(trovato);
|
||||
DataLayer.upsertCurrObjItems(idxMacchina, list2Update);
|
||||
// accodo in task 2 exe la richiesta di processing
|
||||
DataLayer.addTask4Machine(idxMacchina, taskType.setParameter, trovato.uid);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
+32
-1
@@ -786,6 +786,16 @@ namespace MapoDb
|
||||
return mHash(string.Format("PzCount:{0}", idxMacchina));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hash dati SAVED (EXE) TASK x la macchina specificata x poter ripristinare in caso di perdita valore WRITE
|
||||
/// </summary>
|
||||
/// <param name="idxMacchina"></param>
|
||||
/// <returns></returns>
|
||||
public static string savedTaskHash(string idxMacchina)
|
||||
{
|
||||
return mHash(string.Format("SavedTask:{0}", idxMacchina));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hash dati STATUS x la macchina specificata.
|
||||
/// - dati ODL
|
||||
@@ -842,15 +852,36 @@ namespace MapoDb
|
||||
{
|
||||
bool answ = false;
|
||||
string currHash = exeTaskHash(idxMacchina);
|
||||
string currSavedParHash = savedTaskHash(idxMacchina);
|
||||
Dictionary<string, string> currTask = new Dictionary<string, string>();
|
||||
try
|
||||
{
|
||||
// leggo task attuali...
|
||||
var currTask = mTaskMacchina(idxMacchina);
|
||||
currTask = mTaskMacchina(idxMacchina);
|
||||
currTask[taskKey.ToString()] = taskVal;
|
||||
answ = memLayer.ML.redSaveHashDict(currHash, currTask);
|
||||
logger.lg.scriviLog($"Task ADD - idxMacchina: {idxMacchina} | taskKey: {taskKey.ToString()} | taskVal: {taskVal}");
|
||||
}
|
||||
catch { }
|
||||
// verifico in base al tipo di task se fare backup...
|
||||
switch (taskKey)
|
||||
{
|
||||
case taskType.setArt:
|
||||
case taskType.setComm:
|
||||
case taskType.setPzComm:
|
||||
case taskType.setProg:
|
||||
answ = memLayer.ML.redSaveHashDict(currSavedParHash, currTask);
|
||||
break;
|
||||
|
||||
case taskType.endProd:
|
||||
// salvo un DICT vuoto x resettare
|
||||
currTask = new Dictionary<string, string>();
|
||||
answ = memLayer.ML.redSaveHashDict(currSavedParHash, currTask);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -173,7 +173,12 @@
|
||||
/// <summary>
|
||||
/// Richiesta invio watchdog a PLC
|
||||
/// </summary>
|
||||
sendWatchDogMes2Plc
|
||||
sendWatchDogMes2Plc,
|
||||
|
||||
/// <summary>
|
||||
/// Indica che è FINITA la produzione (e quindi cancello dati backup)
|
||||
/// </summary>
|
||||
endProd,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user