Aggiunto pulsante print stack in stack building

This commit is contained in:
Samuele E. Locatelli
2019-08-29 10:36:51 +02:00
parent 92e3a2fbd5
commit 01317f04ad
3 changed files with 90 additions and 43 deletions
@@ -1,10 +1,6 @@
using AppData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace NKC_WF.WebUserControls
{
@@ -20,6 +16,14 @@ namespace NKC_WF.WebUserControls
}
cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh;
}
// se NON ci sono altri campi "next" allora posso msotrare stampa...
private void checkPrint()
{
DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
// se tab vuota --> HO FINITO, mostro stampa...
divPrint.Visible = (nextTbl.Count == 0);
}
/// <summary>
/// Comando barcode letto
/// </summary>
@@ -44,7 +48,7 @@ namespace NKC_WF.WebUserControls
switch (decoData.codeType)
{
case codeType.UNK:
cmp_barcode.showOutput("text-danger","Unknown Data");
cmp_barcode.showOutput("text-danger", "Unknown Data");
break;
case codeType.Item:
cmp_barcode.showOutput("text-warning", "Item - ignored");
@@ -53,7 +57,7 @@ namespace NKC_WF.WebUserControls
// verifico SE il materiale SIA quello dello sheet richeisto dallos tack corrente...
DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId);
// se tab vuota --> HO FINITO!!!!
if (nextTbl.Count==0)
if (nextTbl.Count == 0)
{
cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}");
}
@@ -61,7 +65,7 @@ namespace NKC_WF.WebUserControls
else
{
string codReq = nextTbl[0].MaterExtCode;
if(codReq== decoData.code)
if (codReq == decoData.code)
{
cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}");
// chiamo stored x indicare preparato
@@ -87,8 +91,14 @@ namespace NKC_WF.WebUserControls
}
// reset comando
cmp_barcode.inputAcquired = "";
// aggiorno repeater...
// aggiorno...
doUpdate();
}
public void doUpdate()
{
repCtrl.DataBind();
checkPrint();
}
public int StackId
@@ -98,7 +108,7 @@ namespace NKC_WF.WebUserControls
hfStackId.Value = value.ToString();
lastCmd = "";
cmp_barcode.resetMessage();
repCtrl.DataBind();
doUpdate();
}
get
{
@@ -133,5 +143,14 @@ namespace NKC_WF.WebUserControls
}
return answ;
}
/// <summary>
/// Chiesta stampa stack corrente
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtPrint_Click(object sender, EventArgs e)
{
// chiamo procedura stampa report x stack
}
}
}