Merge branch 'develop' into SDK

This commit is contained in:
Samuele E. Locatelli
2020-04-16 15:58:49 +02:00
8 changed files with 2378 additions and 2326 deletions
+4
View File
@@ -0,0 +1,4 @@
[*.cs]
# IDE0058: Il valore dell'espressione non viene mai usato
csharp_style_unused_value_expression_statement_preference = discard_variable:none
+3
View File
@@ -188,6 +188,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig">
<Link>.editorconfig</Link>
</None>
<None Include="app.config" />
<None Include="App_Readme\SteamWare_demo\example-app.config" />
<None Include="App_Readme\SteamWare_demo\example-NLog.config" />
+2005 -1978
View File
File diff suppressed because it is too large Load Diff
Vendored
+1 -1
View File
@@ -11,7 +11,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=267']) {
withEnv(['NEXT_BUILD_NUMBER=269']) {
// env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.versionNumberBeta = VersionNumber(versionNumberString : '0.9.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
+5
View File
@@ -11,6 +11,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NKC_SDK", "NKC_SDK\NKC_SDK.csproj", "{5A0B6E45-169B-44D4-9E24-13718B8EB7CC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AF976E24-B296-403D-BCDA-6574E7B2F1DC}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+146 -140
View File
@@ -11,154 +11,160 @@ using System.Web.Http;
namespace NKC_WF.Controllers
{
public class SheetController : ApiController
{
/// <summary>
/// Restituisce un array di sheet da lavorare (quindi NON ancora scaricati, anche di + BUNK)
/// GET: api/Sheet
/// </summary>
/// <returns></returns>
[HttpGet]
public SheetWorkList Get()
public class SheetController : ApiController
{
// fisso su machcina 1
string machineName = "WRK001";
SheetWorkList answ = null;
try
{
answ = ComLib.prodGetSheetWorkList(machineName);
}
catch
{ }
return answ;
}
/// <summary>
/// Ottengo elenco specifico dato cod MACCHINA
/// GET: api/Sheet/WRK001
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
public SheetWorkList Get(string id)
{
SheetWorkList answ = null;
try
{
answ = ComLib.prodGetSheetWorkList(id);
}
catch
{ }
return answ;
}
/************************************
* METODI PUT
*
* per abilitare è necessario agire sulla conf di IIS:
*
* - modificare il file applicationHost.config che si trova in C:\Windows\System32\inetsrv\config
* - disinstallare webDav oppure commentare le righe
* <!-- <add name="WebDAVModule" /> -->
* <!-- <add name="WebDAVModule" image="%windir%\System32\inetsrv\webdav.dll" /> -->
* <!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
* - aggiungere PUT/DELETE a handler:
* <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
* <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
*
**************************************/
/// <summary>
/// Effettua la chiamata di update x SINGOLO foglio
/// </summary>
/// <param name="sheetUpdated">Oggetto con Elenco fogli da aggiornare</param>
// PUT: api/Bunk/5
[HttpPut]
public void Put(SheetWorkList sheetUpdated)
{
// NB. decodifico direttamente come oggetto, vedere qui:
// https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api
// https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers
if (sheetUpdated != null)
{
if (sheetUpdated.SheetList != null)
/// <summary>
/// Restituisce un array di sheet da lavorare (quindi NON ancora scaricati, anche di + BUNK)
/// GET: api/Sheet
/// </summary>
/// <returns></returns>
[HttpGet]
public SheetWorkList Get()
{
foreach (var currSheet in sheetUpdated.SheetList)
{
// se non nullo...
if (currSheet != null)
// fisso su machcina 1
string machineName = "WRK001";
SheetWorkList answ = null;
try
{
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
// verifico SE SIA AVVENUTO CON SUCCESSO lo step di lavorazione...
if (currSheet.Machining.Success)
{
// SE machining completato --> status a LAVORATO!
if (currSheet.Machining.DtEnd != null)
{
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "PROD");
}
}
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
answ = ComLib.prodGetSheetWorkList(machineName);
}
}
catch
{ }
return answ;
}
// INVALIDO eventuale valore BUNK in REDIS...
ComLib.resetRedisBunkData();
}
}
/// <summary>
/// Processa una chiamata POST per l'invio in blocco status BUNK
/// POST: api/Bunk
/// </summary>
/// <returns></returns>
[HttpPost]
public string Post()
{
string answ = "";
// questa classe è derivata da Controller.Response... x cui recupero lo stream in altro modo...
string content = "";
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
using (var reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream, System.Text.Encoding.UTF8, true, 4096, true))
{
content = reader.ReadToEnd();
}
//Rest
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
// procedo a deserializzare in blocco l'oggetto...
try
{
// deserializzo.
SheetWorkList sheetUpdated = JsonConvert.DeserializeObject<SheetWorkList>(content);
if (sheetUpdated != null)
/// <summary>
/// Ottengo elenco specifico dato cod MACCHINA
/// GET: api/Sheet/WRK001
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
public SheetWorkList Get(string id)
{
if (sheetUpdated.SheetList != null)
{
foreach (var currSheet in sheetUpdated.SheetList)
SheetWorkList answ = null;
try
{
// se non nullo...
if (currSheet != null)
{
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
// SE machining completato --> status a LAVORATO!
if (currSheet.Machining.DtEnd != null)
{
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "PROD");
}
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
answ = "OK";
}
answ = ComLib.prodGetSheetWorkList(id);
}
}
catch
{ }
return answ;
}
/************************************
* METODI PUT
*
* per abilitare è necessario agire sulla conf di IIS:
*
* - modificare il file applicationHost.config che si trova in C:\Windows\System32\inetsrv\config
* - disinstallare webDav oppure commentare le righe
* <!-- <add name="WebDAVModule" /> -->
* <!-- <add name="WebDAVModule" image="%windir%\System32\inetsrv\webdav.dll" /> -->
* <!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->
* - aggiungere PUT/DELETE a handler:
* <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
* <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
*
**************************************/
/// <summary>
/// Effettua la chiamata di update x SINGOLO foglio
/// </summary>
/// <param name="sheetUpdated">Oggetto con Elenco fogli da aggiornare</param>
// PUT: api/Bunk/5
[HttpPut]
public void Put(SheetWorkList sheetUpdated)
{
// NB. decodifico direttamente come oggetto, vedere qui:
// https://weblog.west-wind.com/posts/2013/dec/13/accepting-raw-request-body-content-with-aspnet-web-api
// https://weblog.west-wind.com/posts/2017/sep/14/accepting-raw-request-body-content-in-aspnet-core-api-controllers
if (sheetUpdated != null)
{
// 2020.01.16 salvo su mongoDb la risposta...
ComLib.man.saveProdAnsw(sheetUpdated);
if (sheetUpdated.SheetList != null)
{
foreach (var currSheet in sheetUpdated.SheetList)
{
// se non nullo...
if (currSheet != null)
{
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
// verifico SE SIA AVVENUTO CON SUCCESSO lo step di lavorazione...
if (currSheet.Machining.Success)
{
// SE machining completato --> status a LAVORATO!
if (currSheet.Machining.DtEnd != null)
{
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "PROD");
}
}
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
}
}
}
// INVALIDO eventuale valore BUNK in REDIS...
ComLib.resetRedisBunkData();
}
}
/// <summary>
/// Processa una chiamata POST per l'invio in blocco status BUNK
/// POST: api/Bunk
/// </summary>
/// <returns></returns>
[HttpPost]
public string Post()
{
string answ = "";
// questa classe è derivata da Controller.Response... x cui recupero lo stream in altro modo...
string content = "";
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
using (var reader = new StreamReader(System.Web.HttpContext.Current.Request.InputStream, System.Text.Encoding.UTF8, true, 4096, true))
{
content = reader.ReadToEnd();
}
//Rest
System.Web.HttpContext.Current.Request.InputStream.Position = 0;
// procedo a deserializzare in blocco l'oggetto...
try
{
// deserializzo.
SheetWorkList sheetUpdated = JsonConvert.DeserializeObject<SheetWorkList>(content);
if (sheetUpdated != null)
{
// 2020.01.16 salvo su mongoDb la risposta...
ComLib.man.saveProdAnsw(sheetUpdated);
if (sheetUpdated.SheetList != null)
{
foreach (var currSheet in sheetUpdated.SheetList)
{
// se non nullo...
if (currSheet != null)
{
DataLayer.man.taSHL.updateDate(currSheet.SheetId, currSheet.Printing.DtStart, currSheet.Printing.DtEnd, currSheet.Machining.DtStart, currSheet.Machining.DtEnd, currSheet.Unloading.DtStart, currSheet.Unloading.DtEnd, (int)currSheet.Status);
// SE machining completato --> status a LAVORATO!
if (currSheet.Machining.DtEnd != null)
{
DataLayer.man.taIL.updateSheetStatus(currSheet.SheetId, 1, "PROD");
}
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(currSheet.BunkId);
answ = "OK";
}
}
}
}
}
catch (Exception exc)
{
answ = "NO";
}
return answ;
}
}
catch (Exception exc)
{
answ = "NO";
}
return answ;
}
}
}
+213 -206
View File
@@ -5,219 +5,226 @@ using System;
namespace NKC_WF.WebUserControls
{
public partial class cmp_stackLoading : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
public partial class cmp_stackLoading : BaseUserControl
{
if (!Page.IsPostBack)
{
// svuoto input barcode...
cmp_barcode.inputAcquired = "";
lastCmd = "";
cmp_stackNextloading.BatchId = BatchIdCurr;
raiseEvent();
doUpdate();
}
cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh;
}
/// <summary>
/// Comando barcode letto
/// </summary>
protected string lastCmd
{
get
{
return hfBarcode.Value;
}
set
{
hfBarcode.Value = value;
}
}
public int BatchIdCurr
{
get
{
int answ = 0;
try
protected void Page_Load(object sender, EventArgs e)
{
int.TryParse(frmView.SelectedValue.ToString(), out answ);
}
catch
{ }
return answ;
}
}
public int StackId
{
set
{
hfStackId.Value = value.ToString();
lastCmd = "";
cmp_barcode.resetMessage();
doUpdate();
}
get
{
int answ = 0;
int.TryParse(hfStackId.Value, out answ);
return answ;
}
}
private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e)
{
bool doRaiseEv = false;
// processo evento..
lastCmd = cmp_barcode.inputAcquired.ToUpper();
if (lastCmd == "") doRaiseEv = true;
// processiamo barcode letto
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
switch (decoData.codeType)
{
case codeType.UNK:
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
doRaiseEv = true;
break;
case codeType.Item:
case codeType.ItemGeneric:
cmp_barcode.showOutput("text-warning", $"Item - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Material:
cmp_barcode.showOutput("badge badge-warning", $"Material - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Sheet:
cmp_barcode.showOutput("badge badge-warning", $"Sheet - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Stack:
// verifico SE lo stack esista...
DS_App.StackListDataTable tabStack = DataLayer.man.taSTL.getByKey(decoData.codeInt);
if (tabStack.Count == 0)
{
cmp_barcode.showOutput("badge badge-danger", $"BUNK NOT FOUND: {decoData.description}");
}
else
{
// controllo sia quello RICHIESTO, eventualmente permetteremo TUTTI quelli del giorno in ogni ordine...
if (decoData.codeInt == cmp_stackNextloading.StackIdReq)
if (!Page.IsPostBack)
{
cmp_barcode.showOutput("badge badge-success", $"BUNK OK, {decoData.rawData}");
ComLib.taktMLCurrStack = decoData.code;
// processo DB e salvo che lo stack è stato caricato in MACHINE LOAD
int stackId = 0;
try
{
var tabStacks = DataLayer.man.taSTL.getByDtmx(decoData.rawData);
if (tabStack.Count == 1)
// svuoto input barcode...
cmp_barcode.inputAcquired = "";
lastCmd = "";
cmp_stackNextloading.BatchId = BatchIdCurr;
raiseEvent();
doUpdate();
}
cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh;
}
/// <summary>
/// Comando barcode letto
/// </summary>
protected string lastCmd
{
get
{
return hfBarcode.Value;
}
set
{
hfBarcode.Value = value;
}
}
public int BatchIdCurr
{
get
{
int answ = 0;
try
{
stackId = tabStack[0].StackID;
if (frmView.SelectedValue != null)
{
string selBatch = $"{frmView.SelectedValue}";
if (!string.IsNullOrEmpty(selBatch))
{
int.TryParse(selBatch, out answ);
}
}
}
}
catch
{ }
// SE HO uno stackId valido (>0)...
if (stackId > 0)
{
DataLayer.man.taSTL.updatePos(stackId, 5);
// controllo status del bunk nel suo insieme...
ComLib.updateBatchPositionByBunk(stackId);
doRaiseEv = true;
}
catch
{ }
return answ;
}
else
{
cmp_barcode.showOutput("badge badge-danger", $"WRONG BUNK, {decoData.rawData}");
}
}
//DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
//// se tab vuota --> HO FINITO!!!!
//if (nextTbl.Count == 0)
//{
// cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}");
//}
//// se ho valori --> controllo se corretto...
//else
//{
// string codReq = nextTbl[0].MatExtCode.ToString();
// if (codReq == decoData.codeInt.ToString())
// {
// cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}");
// // chiamo stored x indicare preparato
// DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID);
// }
// else
// {
// cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}");
// }
//}
//cmp_barcode.showOutput("badge badge-warning", "Stack - ignored");
break;
case codeType.Batch:
cmp_barcode.showOutput("badge badge-warning", $"Batch - ignored: {decoData.description}");
doRaiseEv = true;
break;
default:
doRaiseEv = true;
break;
}
// reset comando
cmp_barcode.inputAcquired = "";
// aggiorno...
doUpdate();
// se richiesto faccio raiseEvent
if (doRaiseEv)
{
cmp_stackNextloading.doUpdate();
raiseEvent();
}
}
protected void checkVisibility()
{
lblLoaded.Visible = StackId != 0;
frmView.Visible = !lblLoaded.Visible;
// fix div di simulazione
divSim.Visible = (memLayer.ML.CRS("environment") == "DEV");
}
public void doUpdate()
{
checkVisibility();
}
protected void frmView_DataBound(object sender, EventArgs e)
{
cmp_stackNextloading.BatchId = BatchIdCurr;
raiseEvent();
}
protected void lbtAdvanceProd_Click(object sender, EventArgs e)
{
// chiama stored x cambiare dt dei vari processi governati dal prod...
var currStack = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr);
if (currStack != null)
{
if (currStack.Count > 0)
{
int stackIdCurr = currStack[0].StackID;
DataLayer.man.taSHL.advanceInStack(stackIdCurr);
}
doUpdate();
cmp_stackNextloading.doUpdate();
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(BatchIdCurr);
raiseEvent();
}
}
public int StackId
{
set
{
hfStackId.Value = value.ToString();
lastCmd = "";
cmp_barcode.resetMessage();
doUpdate();
}
get
{
int answ = 0;
int.TryParse(hfStackId.Value, out answ);
return answ;
}
}
private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e)
{
bool doRaiseEv = false;
// processo evento..
lastCmd = cmp_barcode.inputAcquired.ToUpper();
if (lastCmd == "") doRaiseEv = true;
// processiamo barcode letto
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
switch (decoData.codeType)
{
case codeType.UNK:
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
doRaiseEv = true;
break;
case codeType.Item:
case codeType.ItemGeneric:
cmp_barcode.showOutput("text-warning", $"Item - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Material:
cmp_barcode.showOutput("badge badge-warning", $"Material - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Sheet:
cmp_barcode.showOutput("badge badge-warning", $"Sheet - ignored: {decoData.description}");
doRaiseEv = true;
break;
case codeType.Stack:
// verifico SE lo stack esista...
DS_App.StackListDataTable tabStack = DataLayer.man.taSTL.getByKey(decoData.codeInt);
if (tabStack.Count == 0)
{
cmp_barcode.showOutput("badge badge-danger", $"BUNK NOT FOUND: {decoData.description}");
}
else
{
// controllo sia quello RICHIESTO, eventualmente permetteremo TUTTI quelli del giorno in ogni ordine...
if (decoData.codeInt == cmp_stackNextloading.StackIdReq)
{
cmp_barcode.showOutput("badge badge-success", $"BUNK OK, {decoData.rawData}");
ComLib.taktMLCurrStack = decoData.code;
// processo DB e salvo che lo stack è stato caricato in MACHINE LOAD
int stackId = 0;
try
{
var tabStacks = DataLayer.man.taSTL.getByDtmx(decoData.rawData);
if (tabStack.Count == 1)
{
stackId = tabStack[0].StackID;
}
}
catch
{ }
// SE HO uno stackId valido (>0)...
if (stackId > 0)
{
DataLayer.man.taSTL.updatePos(stackId, 5);
// controllo status del bunk nel suo insieme...
ComLib.updateBatchPositionByBunk(stackId);
doRaiseEv = true;
}
}
else
{
cmp_barcode.showOutput("badge badge-danger", $"WRONG BUNK, {decoData.rawData}");
}
}
//DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
//// se tab vuota --> HO FINITO!!!!
//if (nextTbl.Count == 0)
//{
// cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}");
//}
//// se ho valori --> controllo se corretto...
//else
//{
// string codReq = nextTbl[0].MatExtCode.ToString();
// if (codReq == decoData.codeInt.ToString())
// {
// cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}");
// // chiamo stored x indicare preparato
// DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID);
// }
// else
// {
// cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}");
// }
//}
protected void lbtAdvanceBunk_Click(object sender, EventArgs e)
{
// simula invio barcode del PROSSIMO BUNK (SE necessario)
//cmp_barcode.showOutput("badge badge-warning", "Stack - ignored");
break;
case codeType.Batch:
cmp_barcode.showOutput("badge badge-warning", $"Batch - ignored: {decoData.description}");
doRaiseEv = true;
break;
default:
doRaiseEv = true;
break;
}
// reset comando
cmp_barcode.inputAcquired = "";
// aggiorno...
doUpdate();
// se richiesto faccio raiseEvent
if (doRaiseEv)
{
cmp_stackNextloading.doUpdate();
raiseEvent();
}
}
protected void checkVisibility()
{
lblLoaded.Visible = StackId != 0;
frmView.Visible = !lblLoaded.Visible;
// fix div di simulazione
divSim.Visible = (memLayer.ML.CRS("environment") == "DEV");
}
public void doUpdate()
{
checkVisibility();
}
protected void frmView_DataBound(object sender, EventArgs e)
{
cmp_stackNextloading.BatchId = BatchIdCurr;
raiseEvent();
}
protected void lbtAdvanceProd_Click(object sender, EventArgs e)
{
// chiama stored x cambiare dt dei vari processi governati dal prod...
var currStack = DataLayer.man.taSTL.getCurrByBatch(BatchIdCurr);
if (currStack != null)
{
if (currStack.Count > 0)
{
int stackIdCurr = currStack[0].StackID;
DataLayer.man.taSHL.advanceInStack(stackIdCurr);
}
doUpdate();
cmp_stackNextloading.doUpdate();
// segnalo avanzamento su redis x pagina unload
ComLib.advaceSheetRevByBunk(BatchIdCurr);
raiseEvent();
}
}
protected void lbtAdvanceBunk_Click(object sender, EventArgs e)
{
// simula invio barcode del PROSSIMO BUNK (SE necessario)
}
}
}
}
File diff suppressed because one or more lines are too long