Fix stampa cart/bin da order scheduler

This commit is contained in:
Samuele Locatelli
2021-07-23 15:10:00 +02:00
parent 17dd24abea
commit 8f0ee0933d
4 changed files with 48 additions and 52 deletions
-36
View File
@@ -1596,42 +1596,6 @@ namespace AppData
return answ;
}
#if false
/// <summary>
/// Elenco degli orders dato Batch
/// </summary>
public static DS_App.OrderListDataTable OrdersByBatch(int BatchId)
{
DataLayer DLMan = new DataLayer();
string redKey = $"{redOrders}:BYBATCH:{BatchId}";
string rawData = "";
DS_App.OrderListDataTable answ = new DS_App.OrderListDataTable();
// cerco in redis
if (memLayer.ML.redKeyPresent(redKey))
{
rawData = memLayer.ML.getRSV(redKey);
if (!string.IsNullOrEmpty(rawData))
{
try
{
answ = JsonConvert.DeserializeObject<DS_App.OrderListDataTable>(rawData);
}
catch
{ }
}
// se vuoto rileggo
if (answ.Count == 0)
{
answ = DLMan.taOL.getByBatch(BatchId);
// salvo in cache
rawData = JsonConvert.SerializeObject(answ);
memLayer.ML.setRSV(redKey, rawData, 5 * 60);
}
}
return answ;
}
#endif
/// <summary>
/// Elenco degli orders dato Batch (Ancestor/Principale)
/// </summary>
@@ -6,6 +6,7 @@
<asp:HiddenField runat="server" ID="hfBatchID" />
<asp:HiddenField runat="server" ID="hfMachineSel" />
<div class="row">
<div class="col-12 col-lg-6">
<uc1:cmp_MU_bins runat="server" ID="cmp_MU_bins" ShowQr="false" ShowPrint="true" />
+24 -2
View File
@@ -11,11 +11,26 @@ namespace NKC_WF.WebUserControls
{
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
if (!Page.IsPostBack)
{
}
}
/// <summary>
/// Macchina selezionata
/// </summary>
public string MachineSel
{
get
{
return hfMachineSel.Value;
}
set
{
hfMachineSel.Value = value;
cmp_MU_bins.MachineSel = value;
cmp_MU_carts.MachineSel = value;
}
}
/// <summary>
/// BatchId corrente...
/// </summary>
@@ -26,6 +41,13 @@ namespace NKC_WF.WebUserControls
hfBatchID.Value = value.ToString();
cmp_MU_bins.BatchId = value;
cmp_MU_carts.BatchId = value;
// calcolo macchina
var tabBL = DLMan.taBL.getByKey(value);
if (tabBL != null && tabBL.Count > 0)
{
var rigaBL = tabBL[0];
MachineSel = rigaBL.PlaceCod;
}
}
get
{
+23 -14
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <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 NKC_WF.WebUserControls
@@ -15,29 +15,38 @@ namespace NKC_WF.WebUserControls
{
/// <summary>
/// Controllo hfBatchID.
/// hfBatchID control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// Controllo cmp_MU_bins.
/// hfMachineSel control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfMachineSel;
/// <summary>
/// cmp_MU_bins control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_bins cmp_MU_bins;
/// <summary>
/// Controllo cmp_MU_carts.
/// cmp_MU_carts control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_MU_carts cmp_MU_carts;
}