reso parametrica componente calcolo BatchId e SheetId x DebugQR + Unload

This commit is contained in:
Samuele E. Locatelli
2020-01-29 22:18:53 +01:00
parent a5c3b570c2
commit e0a16d08d6
6 changed files with 74 additions and 40 deletions
+7 -4
View File
@@ -1231,11 +1231,14 @@ namespace AppData
public static DS_App.SheetListRow getCurrSheet(int BatchID)
{
DS_App.SheetListRow answ = null;
// recupero sheet corrente da Bunk...
DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5);
if (tabSheets.Count > 0)
if (BatchID > 0)
{
answ = tabSheets[0];
// recupero sheet corrente da Bunk...
DS_App.SheetListDataTable tabSheets = DataLayer.man.taSHL.getByMLStatus(BatchID, 5, 5);
if (tabSheets.Count > 0)
{
answ = tabSheets[0];
}
}
return answ;
}
+1 -1
View File
@@ -35,7 +35,7 @@
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
</httpModules>
<customErrors mode="On" defaultRedirect="~/ErrorPages/Oops.aspx"/>
<!--<customErrors mode="On" defaultRedirect="~/ErrorPages/Oops.aspx"/>-->
</system.web>
<appSettings>
<!--Configurazioni generali-->
+22 -23
View File
@@ -19,7 +19,7 @@ namespace NKC_WF.site
}
}
/// <summary>
/// Batch corrente...
/// BatchId corrente...
/// </summary>
public int BatchId
{
@@ -34,9 +34,9 @@ namespace NKC_WF.site
return answ;
}
}/// <summary>
/// Sheet corrente...
/// SheetId corrente...
/// </summary>
public int SheetID
public int SheetId
{
set
{
@@ -76,32 +76,31 @@ namespace NKC_WF.site
{
imgQrLogin.ImageUrl = getLoginUrl();
updateSize();
// recupero bunk corrente...
var currBunk = ComLib.getCurrBunk();
if (currBunk != null)
{
BatchId = currBunk.BatchID;
var currSheet = ComLib.getCurrSheet(BatchId);
if(currSheet!=null)
{
SheetID = currSheet.SheetID;
}
}
#if false
else
{
//!!!FIXME!!! fare calcolo del VERO batch corrente...
BatchId = 242; // fixed x test!
SheetID = 770;
}
#endif
setCurrData();
// aggiorno child
cmp_MU_bins.ShowQr = true;
cmp_MU_bins.BatchId = BatchId;
cmp_MU_carts.ShowQr = true;
cmp_MU_carts.BatchId = BatchId;
cmp_MU_Items.ShowQr = true;
cmp_MU_Items.SheetID = SheetID;
cmp_MU_Items.SheetID = SheetId;
}
/// <summary>
/// Imposta dati correnti (Bunk / Sheet)
/// </summary>
private void setCurrData()
{
// recupero bunk corrente...
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
if (currBunk != null)
{
BatchId = currBunk.BatchID;
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
if (currSheet != null)
{
SheetId = currSheet.SheetID;
}
}
}
protected void ddlQrSize_SelectedIndexChanged(object sender, EventArgs e)
+1
View File
@@ -9,6 +9,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<asp:HiddenField ID="hfBatchID" runat="server" />
<asp:HiddenField ID="hfSheetID" runat="server" />
<asp:UpdatePanel runat="server" ID="upnlDrawings">
<ContentTemplate>
<div class="mx-0">
+34 -12
View File
@@ -14,7 +14,7 @@ namespace NKC_WF
}
}
/// <summary>
/// Batch corrente...
/// BatchId corrente...
/// </summary>
public int BatchId
{
@@ -30,29 +30,51 @@ namespace NKC_WF
}
}
/// <summary>
/// SheetId corrente...
/// </summary>
public int SheetId
{
set
{
hfSheetID.Value = value.ToString();
}
get
{
int answ = 0;
int.TryParse(hfSheetID.Value, out answ);
return answ;
}
}
/// <summary>
/// Aggiorna componente principale e child components
/// </summary>
private void doUpdate()
{
//!!!FIXME!!! fare calcolo del VERO batch corrente...
BatchId = 242; // fixed x test!
// imposto dati correnti
setCurrData();
// aggiorno child
cmp_MU_stats.BatchId = BatchId;
cmp_MU_bins.BatchId = BatchId;
cmp_MU_carts.BatchId = BatchId;
// calcolo sheet x SVG viewer...
int SheetId = 0;
//SOLO SE ho batch != 0...
if (BatchId > 0)
cmp_MU_svgViewer.SheetId = SheetId;
}
/// <summary>
/// Imposta dati correnti (Bunk / Sheet)
/// </summary>
private void setCurrData()
{
// recupero bunk corrente...
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
if (currBunk != null)
{
// FORSE 5/5?!?
var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5);
if (sheetList.Count > 0)
BatchId = currBunk.BatchID;
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
if (currSheet != null)
{
SheetId = sheetList[0].SheetID;
SheetId = currSheet.SheetID;
}
}
cmp_MU_svgViewer.SheetId = SheetId;
}
}
}
+9
View File
@@ -23,6 +23,15 @@ namespace NKC_WF
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// Controllo hfSheetID.
/// </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 hfSheetID;
/// <summary>
/// Controllo upnlDrawings.
/// </summary>