ancora update parziale

This commit is contained in:
Samuele E. Locatelli
2015-12-11 19:22:18 +01:00
parent 94a1672cf2
commit 68ef1e3bf8
5 changed files with 299 additions and 345 deletions
+2 -1
View File
@@ -26,4 +26,5 @@ INSERT INTO AnagStatiProdotto (CodStato, DescStato, CodGruppo) VALUES ('FinRx','
exec stp_insNewLemma 'PostB48', 'Postazione B48'
exec stp_insNewLemma 'PostB48Icon', 'fa fa-bullseye'
exec stp_insNewLemma 'DtxSetNC', 'Assegnazione NC DataMatrix'
exec stp_insNewLemma 'DtxSetNCIcon', 'fa fa-bug'
exec stp_insNewLemma 'DtxSetNCIcon', 'fa fa-bug'
exec stp_insNewLemma 'ERR-DTX-016', '[ERR-DTX-016] Errore Datamatrix non utilizzabile, NC Fusione associata'
-52
View File
@@ -7,58 +7,6 @@
<div class="row">
<div class="col-sm-4 col-lg-3">
<div id="divAL" runat="server" class="panel panel-warning panel-sm">
<div class="panel-heading">
<b><%: traduci("ContenutoAL") %></b>
</div>
<div class="panel-body">
<div class="bg-primary">
<asp:Label runat="server" ID="lblAL" />
</div>
<asp:GridView ID="grViewSource" runat="server" AutoGenerateColumns="False"
DataKeyNames="UDC" DataSourceID="odsAL" Width="100%">
<RowStyle CssClass="ctrRowStyle" />
<AlternatingRowStyle CssClass="ctrAltRowStyle" />
<EditRowStyle CssClass="ctrEditRowStyle" />
<SelectedRowStyle CssClass="ctrSelRowStyle" />
<FooterStyle CssClass="ctrFooter" />
<PagerStyle CssClass="ctrHeaderPager" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
<EmptyDataRowStyle CssClass="ctrRowStyle" />
<EmptyDataTemplate>
<asp:Label runat="server" ID="lblNoRecord" Text='<%# traduci("noRecord") %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="Particolare" SortExpression="Particolare">
<ItemTemplate>
<b>
<asp:Label ID="lblUdc" runat="server" Text='<%# Eval("UDC") %>' /></b>
<br />
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("Particolare") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<span style="padding: 0px 4px;">
<b>
<asp:Label ID="lblQtaDtx" runat="server" Text='<%# Eval("QtaDtx","{0:0}") %>' /></b>
/<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:0}") %>' />
</span>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsAL" runat="server" OldValuesParameterFormatString="{0}"
SelectMethod="getByAL" TypeName="GMW_data.DS_magazzinoTableAdapters.v_A2U2DTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="lblAL" DefaultValue="AL0000" Name="AL" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:LinkButton runat="server" ID="lbtPrendeCaricoAL" Width="100%" CssClass="btn btn-warning btn-sm" OnClick="lbtPrendeCaricoAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-down fa-2x'></i> <%: traduci("lbtPrendeCaricoAL") %></asp:LinkButton>
<asp:LinkButton runat="server" ID="lbtChiudiAL" Width="100%" CssClass="btn btn-danger btn-sm" OnClick="lbtChiudiAL_Click"><i aria-hidden='true' class='fa fa-arrow-circle-up fa-2x'></i> <%: traduci("lbtChiudeAL") %></asp:LinkButton>
</div>
</div>
<div id="div1" runat="server" class="panel panel-warning panel-sm">
<div class="panel-heading">
<b><%: traduci("ModoRimDtx") %></b>
+297 -238
View File
@@ -86,20 +86,6 @@ namespace GMW.WebUserControls
}
}
/// <summary>
/// Codice AL in carico
/// </summary>
protected string sourceAL
{
get
{
return lblAL.Text.Trim();
}
set
{
lblAL.Text = value;
}
}
/// <summary>
/// ultimo valore barcode letto (x confronto conferme doppio input...)
/// </summary>
protected string lastBarcodeIn
@@ -273,6 +259,23 @@ namespace GMW.WebUserControls
}
}
/// <summary>
/// Formato Datamatrix dell'ultimo barcode letto
/// </summary>
protected string FormatoDtmxBarcode
{
get
{
string answ = "";
try
{
answ = DataMatrix.mgr.taVerifica.GetData(barcodeIn)[0].FormatoDtmx;
}
catch
{ }
return answ;
}
}
/// <summary>
/// codice particolare da datamatrix
/// </summary>
/// <param name="byTable">bollean:
@@ -320,12 +323,7 @@ namespace GMW.WebUserControls
qta = 0;
currUDC = "";
forceDelete = false;
sourceAL = "";
setDefaultVal();
odsAL.DataBind();
grViewSource.DataBind();
// NON RESETTO... 2014.04.10
//sendUpdateTablet("ND", "-", traduci("attesaInput"), "-", "-", "-", "", cssWait, cssWait);
}
setVisibility();
checkBarcode();
@@ -335,39 +333,18 @@ namespace GMW.WebUserControls
/// </summary>
private void setDefaultVal()
{
if (currAL != "")
{
sourceAL = currAL;
}
destAL = AlByCella;
}
/// <summary>
/// Sistema css del panel AL
/// </summary>
/// <param name="tipoPanel"></param>
private void fixCssAL(string tipoPanel)
{
divAL.Attributes.Remove("class");
divAL.Attributes.Add("class", string.Format("panel panel-{0} panel-sm", tipoPanel));
}
/// <summary>
/// sistema modalità input
/// </summary>
private void setVisibility()
{
bool showBtn = false;
if (sourceAL != "" && currAL == "")
if (currAL == "")
{
showBtn = true;
fixCssAL("warning");
}
else
{
fixCssAL("success");
}
lbtPrendeCaricoAL.Visible = showBtn;
// X btn chiusura: solo chiudo SOLO se c'è AL in carico..
lbtChiudiAL.Visible = (currAL != "");
// ora controllo btn quantità
showBtn = false;
if (grViewDest.SelectedIndex >= 0)
@@ -387,14 +364,11 @@ namespace GMW.WebUserControls
protected void doReset()
{
// resetta
fixCssAL("warning");
lastBarcodeIn = "";
Postazione.messaggiText = "";
Postazione.warningText = "";
Postazione.CssClass = cssAtt;
doUpdate();
// NON RESETTO... 2014.04.10
//sendUpdateTablet("ND", "-", traduci("attesaInput"), "-", "-", "-", "", cssWait, cssWait);
}
/// <summary>
/// Verifica l'AL se sia ok x procedere:
@@ -461,12 +435,11 @@ namespace GMW.WebUserControls
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
tipoCodiceBarcode tipoBC = MagClass.tipoBCode(barcodeIn);
// per prima cosa: SE NON HO AL SELEZIONATO e non ho sparato un AL o un imballo sollevo errore...
if (!(tipoBC == tipoCodiceBarcode.AL || tipoBC == tipoCodiceBarcode.Imballo) && currAL == "")
if (!(tipoBC == tipoCodiceBarcode.Imballo) && currAL == "")
{
// sollevo errore, in primis va definito AL sorgente...
Postazione.warningText = traduci("ERR-ALT-001");
Postazione.CssClass = cssErr;
sendUpdateTablet("ND", "-", traduci("ERR-ALT-001"), "-", "-", "-", cssErr, cssErr, cssErr);
}
else
{
@@ -494,7 +467,6 @@ namespace GMW.WebUserControls
{
// forza reset linea
currAL = "";
sourceAL = "";
// resetta!
doReset();
}
@@ -523,7 +495,6 @@ namespace GMW.WebUserControls
Postazione.messaggiText = traduci("RiCaricatoUdcLiq");
Postazione.warningText = "";
Postazione.CssClass = cssOk;
checkUpdateTablet(barcodeIn);
}
else
{
@@ -567,50 +538,181 @@ namespace GMW.WebUserControls
Postazione.CssClass = cssErr;
}
break;
case tipoCodiceBarcode.AL:
// se linea libera...
if (currAL == "")
case tipoCodiceBarcode.DataMatrix:
// ciclo controllo x B48
string NewUDC = "";
// verifica preliminare: se Dtx OK procedo, se è KO NON LO CONSIDERO PROPRIO
bool isOk = false;
// controllo anche NC
bool isOkNc = false;
try
{
// verifico barcode valido
if (checkAL(barcodeIn, "T"))
isOk = DataMatrix.mgr.taVerifica.GetData(barcodeIn)[0].StatoDtx == "OK";
}
catch
{ }
try
{
isOkNc = DataMatrix.mgr.taAtt2Dtx.getByDtx(barcodeIn).Select("CodAttr = 'NC_FUS'").Length == 0;
}
catch
{ }
// controlli x procedere
if (!isOkNc)
{
// non accetto Dtx e mostro errore
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-016");
Postazione.CssClass = cssErr;
}
else if (!isOk)
{
// non accetto Dtx e mostro errore
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-012");
Postazione.CssClass = cssErr;
}
else // PROCEDO!!!
{
// controllo formato datamatrix sia impostato sulla linea (altrimenti errore linea "non battezzata")
if (FormatoDtmxLinea == "")
{
// verifico AL sia con datamatrix...
if (checkDtxAL(barcodeIn))
{
// controllo: se avevo già letto lo steso AL è conferma presa in carico...
if (sourceAL == barcodeIn)
{
presaCaricoAL();
}
else
{
// mostro AL sorgente
sourceAL = barcodeIn;
fixCssAL("warning");
// sistemo grafica
Postazione.messaggiText = traduci("ConfermareAL");
Postazione.warningText = "";
Postazione.CssClass = cssOk;
}
}
else
{
sourceAL = "";
}
// errore poiché non è stato non specificato tipo Dtmx assegnato alla linea!
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-013");
Postazione.CssClass = "stileComandoKo";
}
else
{
sourceAL = "";
// verifico formato datamatrix letto sia quello della linea...
if (FormatoDtmxBarcode != FormatoDtmxLinea)
{
// errore corrispondenza formato Dtmx
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-014");
Postazione.CssClass = "stileComandoKo";
}
else
{
// calcolo particolare + UDC dest
try
{
currParticolare = partByDtmx(true);
NewUDC = MagClass.magazzino.taCartellini.getByParticolareAL(currParticolare, destAL)[0].UDC;
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Formato Linea:{2}{0}Eccezione:{0}{3}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION);
currParticolare = "";
}
if (currParticolare != "")
{
// chiamo procedure aggiunta/rimozione secondo caso di selezione ADD/REM Dtx
if (!chkDtxMode.Checked)
{
procDtx_add(ref NewUDC);
}
// modalità "rimozione" datamatrix
else
{
procDtx_rem(ref NewUDC);
}
}
}
}
}
// VERSIONE DT RX
#if false
// controllo che il DTX non sia già assegnato...
if (DataMatrix.mgr.taDtx2UDC.getByDtx(barcodeIn).Rows.Count == 0)
{
// vers 2.9
// controllo formato datamatrix sia impostato sulla linea (altrimenti errore linea "non battezzata")
if (FormatoDtmxLinea == "")
{
// errore poiché non è stato non specificato tipo Dtmx assegnato alla linea!
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-013");
Postazione.CssClass = "stileComandoKo";
}
else
{
// verifico formato datamatrix letto sia quello della linea...
if (FormatoDtmxBarcode != FormatoDtmxLinea)
{
// errore corrispondenza formato Dtmx
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-014");
Postazione.CssClass = "stileComandoKo";
}
else
{
// datamatrix ok: setto css e labels
Postazione.messaggiText = traduci("partSelected");
Postazione.warningText = "";
Postazione.CssClass = "stileComandoOk";
// controllo il particolare da Dtx + check capienza celle
if (Postazione.currCodCella != "")
{
// calcolo particolare!
try
{
// vers 2.9 modifica per multi-datamatrix
currParticolare = partByDtmx(true);
//currParticolare = DataMatrix.mgr.taDecode.GetData(barcodeIn, FormatoDtmxLinea)[0].Particolare;
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Formato Linea:{2}{0}Eccezione:{0}{3}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION);
currParticolare = "";
}
if (currParticolare != "")
{
// genera eventuale UDC del particolare su cella/posizione corrente
qta = 1; // tanto poi si ricalcola...
checkCreaUDC();
// verifico se devo fare gestione con intervallo dtx... da tab config DB)
if (utils.obj.configDbVal("CreaDtxByInt") == "1")
{
// ora chiamo la stored che fa il check x tutti i particolari nell'intervallo dei Dtx associati alla cella e (se almeno 2) nel caso crea UDC
checkIntervalloDtx();
}
/*-------------------------------------------------------------------------------------------------
* chiamo la stored che in blocco
* - associa Dtx a UDC
* - fa controllo, se ho almeno 2 Dtx ok associo tutti i Dtx compresi nell'intervallo min-MAX
*--------------------------------------------------------------------------------------------------
*/
DataMatrix.mgr.taDtx2UDC.RxSetDtx2Udc(barcodeIn, MagClass.magazzino.CodSoggCurrUser, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella);
}
}
}
}
}
else
{
Postazione.messaggiText = "";
Postazione.warningText = traduci("ERR-ALT-002");
Postazione.CssClass = cssErr;
}
break;
case tipoCodiceBarcode.DataMatrix:
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("DtxGiaAssegnato");
Postazione.CssClass = "stileComandoKo";
}
#endif
// VERSIONE DT LIQ
#if false
string OldUDC = "";
int IdxPosizione = 0;
string NewUDC = "";
@@ -666,7 +768,6 @@ namespace GMW.WebUserControls
// CASO 02: DTX in AL sorgente, particolare OK, C'E' UDC dest
OldUDC = procDtx_Caso02(OldUDC, NewUDC);
}
checkUpdateTablet(NewUDC);
}
else
{
@@ -690,7 +791,8 @@ namespace GMW.WebUserControls
procDTX_Caso04(ref OldUDC, ref IdxPosizione, ref NewUDC);
}
}
}
}
#endif
break;
default:
Postazione.warningText = traduci("ERR-BCD-001");
@@ -703,8 +805,106 @@ namespace GMW.WebUserControls
doUpdate();
}
/// <summary>
/// crea eventualmente UDC per particolare
/// </summary>
/// <param name="qty"></param>
/// <param name="particolare"></param>
private void checkCreaUDC()
{
string newUdcChild = "";
string noteTrim = "";
DateTime adesso = DateTime.Now;
// verifico se ho già quel particolare tra quelli inseriti in linea...
try
{
newUdcChild = DataProxy.obj.taCartellini.getByParticolareIdxPosIdxCella(currParticolare, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella)[0].UDC;
}
catch
{
newUdcChild = "";
}
if (newUdcChild == "")
{
// controllo NON ci siano troppi UDC in posizione... da capienza ed assegnati
DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga;
bool piena = false;
try
{
riga = MagClass.magazzino.taStatoCelle.getByIdxCella(Postazione.currIdxCella)[0];
if (riga.UdcAssegnati >= riga.Capienza) piena = true;
}
catch
{
}
if (!piena)
{
try
{
// forzo qta a 0 x generare nuovo UDC
qta = 0;
// creo nuovo UDC RX
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoRX"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUdcOut, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), "IdxPosizioneRxTemp", codEventoUdcOut, noteTrim, "", adesso.Year, Request.UserHostName);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in creazione UDC temp RX: {0}{1}", Environment.NewLine, exc));
}
}
else
{
Postazione.warningText = traduci("ErroreAL-Full");
doUpdate();
}
}
if (newUdcChild != "")
{
// lo posiziono nella cella corrente...
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), newUdcChild, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
Postazione.CssClass = "stileAttesa";
Postazione.warningText = "";
Postazione.messaggiText = traduci("partAdded");
doUpdate();
}
}
#region metodi processing DataMatrix letto da BarCode
/// <summary>
/// processa aggiunta datamatrix (SE POSSIBILE)
/// </summary>
/// <param name="NewUDC"></param>
private void procDtx_add(ref string NewUDC)
{
// genera eventuale UDC del particolare su cella/posizione corrente
qta = 1; // tanto poi si ricalcola...
checkCreaUDC();
// controllo che il DTX non sia già assegnato...
if (DataMatrix.mgr.taDtx2UDC.getByDtx(barcodeIn).Rows.Count == 0)
{
/*-------------------------------------------------------------------------------------------------
* chiamo la stored che in blocco
* - associa Dtx a UDC
* - fa controllo, se ho almeno 2 Dtx ok associo tutti i Dtx compresi nell'intervallo min-MAX
*--------------------------------------------------------------------------------------------------
*/
DataMatrix.mgr.taDtx2UDC.RxSetDtx2Udc(barcodeIn, MagClass.magazzino.CodSoggCurrUser, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella);
}
}
/// <summary>
/// processa rimozione datamatrix (se possibile)
/// </summary>
/// <param name="NewUDC"></param>
private void procDtx_rem(ref string NewUDC)
{
// verifico sia nell'UDC dest
if (DataMatrix.mgr.taDtx2UDC.getByDtxAl(destAL, barcodeIn).Rows.Count != 0)
{
// rimuovo Dtx
}
}
/// <summary>
/// CASO 01: DTX in AL sorgente, particolare OK, NON C'E' UDC dest
/// </summary>
@@ -713,6 +913,7 @@ namespace GMW.WebUserControls
/// <param name="adesso"></param>
private void procDtx_Caso01(ref string OldUDC, ref string NewUDC, DateTime adesso)
{
#if false
// verifico che NON sia modalità "rimozione" datamatrix
if (!chkDtxMode.Checked)
{
@@ -753,8 +954,6 @@ namespace GMW.WebUserControls
DataMatrix.mgr.taDtx2UDC.UpdateUDC(NewUDC, barcodeIn, statoUdcOut, DateTime.Now, MagClass.magazzino.CodSoggCurrUser, false, false);
// disattivo AL (se non era già disattivo...) x evitare si possa togliere senza chiudere...
MagClass.magazzino.taEA.DisattivaAL(sourceAL);
// fix messaggi
Postazione.messaggiText = traduci("ConfermatoDtx");
Postazione.warningText = "";
@@ -766,7 +965,8 @@ namespace GMW.WebUserControls
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("UdcNonTrovato");
Postazione.CssClass = cssErr;
}
}
#endif
}
/// <summary>
/// CASO 02: DTX in AL sorgente, particolare OK, C'E' UDC dest
@@ -776,6 +976,7 @@ namespace GMW.WebUserControls
/// <returns></returns>
private string procDtx_Caso02(string OldUDC, string NewUDC)
{
#if false
// verifico se sia modalità "rimozione" datamatrix x cui tolgo i datamatrix dall'UDC finale..
if (chkDtxMode.Checked)
{
@@ -833,9 +1034,8 @@ namespace GMW.WebUserControls
Postazione.messaggiText = traduci("ConfermatoDtx");
Postazione.warningText = "";
Postazione.CssClass = cssAtt;
}
// disattivo AL (se non era già disattivo...) x evitare si possa togliere senza chiudere...
MagClass.magazzino.taEA.DisattivaAL(sourceAL);
}
#endif
return OldUDC;
}
/// <summary>
@@ -884,7 +1084,6 @@ namespace GMW.WebUserControls
Postazione.messaggiText = traduci("ConfermatoDtx");
Postazione.warningText = "";
Postazione.CssClass = cssAtt;
checkUpdateTablet(NewUDC);
}
else
{
@@ -926,6 +1125,7 @@ namespace GMW.WebUserControls
/// <param name="NewUDC"></param>
private void procDTX_Caso04(ref string OldUDC, ref int IdxPosizione, ref string NewUDC)
{
#if false
// verifico se sia modalità "rimozione" datamatrix x cui tolgo i datamatrix dall'UDC finale..
if (chkDtxMode.Checked)
{
@@ -990,8 +1190,6 @@ namespace GMW.WebUserControls
Postazione.messaggiText = barcodeIn;
Postazione.warningText = traduci("ERR-DTX-006");
Postazione.CssClass = cssWait;
// update tablet!
checkUpdateTablet(NewUDC);
}
// ... dal caso generico di un Dtx NON accettabile
else
@@ -1002,45 +1200,12 @@ namespace GMW.WebUserControls
Postazione.warningText = traduci("ERR-DTX-004");
Postazione.CssClass = cssErr;
}
}
}
#endif
}
#endregion
/// <summary>
/// prende in carico AL indicato...
/// </summary>
private void presaCaricoAL()
{
// salvo presa in carico AL
string AL = MagClass.magazzino.creaAssociaAlTL(sourceAL, tipoAL.AL_LI, MagClass.magazzino.CodSoggCurrUser, Postazione.currCodCella);
if (AL != "NA")
{
// salva ed indica nuovo AL selezionato...
sourceAL = AL;
currAL = sourceAL;
// nascondo elenco UDC dell'AL
fixCssAL("success");
// sistemo grafica
Postazione.messaggiText = traduci("CaricatoAL");
Postazione.warningText = "";
Postazione.CssClass = cssAtt;
}
else
{
// sistemo grafica
Postazione.messaggiText = "";
Postazione.warningText = traduci("[ERR-ALL-001]");
Postazione.CssClass = cssErr;
}
}
/// <summary>
/// resetta AL sorgente
/// </summary>
public void resetSourceAL()
{
sourceAL = "";
}
/// <summary>
/// aggiorna tabella + focus a barcode
/// </summary>
@@ -1048,7 +1213,6 @@ namespace GMW.WebUserControls
{
setDefaultVal();
setVisibility();
grViewSource.DataBind();
grViewDest.DataBind();
// raise dell'evento
if (eh_reqUpdate != null)
@@ -1084,53 +1248,6 @@ namespace GMW.WebUserControls
doUpdate();
// fisso focus su note!
txtNote.Focus();
checkUpdateTablet(currUDC);
}
/// <summary>
/// effettua check e update tablet
/// </summary>
/// <param name="UDC"></param>
private void checkUpdateTablet(string UDC)
{
if (memLayer.ML.confReadBool("updateTablet"))
{
try
{
string particolare = "";
int qtaDtx = 0;
int qtaTot = 0;
if (MagClass.magazzino.checkUDC(UDC))
{
DS_Applicazione.ElencoCartelliniRow riga = DataProxy.obj.taCartellini.stp_getByUdc(UDC)[0];
particolare = string.Format("{0} - {1}", riga.Particolare, riga.DescParticolare);
qtaTot = Convert.ToInt32(DataProxy.obj.taCartellini.stp_getByUdc(UDC)[0].Qta);
qtaDtx = Convert.ToInt32(MagClass.magazzino.taA2U2D.getByUDC(UDC)[0].QtaDtx);
}
// update tablet
string css = "";
string mess = "";
if (qtaDtx > qtaTot)
{
css = cssErr;
mess = traduci("ERR-QTY-001");
}
else if (qtaDtx == qtaTot)
{
css = cssOk;
mess = traduci("Ready4Print");
}
else
{
css = cssWait;
mess = "-";
}
sendUpdateTablet(UDC, particolare, mess, qtaDtx.ToString(), qtaTot.ToString(), string.Format("({0})", qtaDtx - qtaTot), cssOk, cssAtt, css);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in fase di check dati x tablet: {0}{1}", Environment.NewLine, exc));
}
}
}
/// <summary>
/// prende in carico AL selezionato
@@ -1139,35 +1256,6 @@ namespace GMW.WebUserControls
/// <param name="e"></param>
protected void lbtPrendeCaricoAL_Click(object sender, EventArgs e)
{
presaCaricoAL();
doUpdate();
}
/// <summary>
/// chiude l'AL in carico
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtChiudiAL_Click(object sender, EventArgs e)
{
// controllo se UDC rimasti sono tutti a zero e NON ci sono altri datamatrix
if (assiemeIsEmpty(sourceAL) || forceDelete)
{
// chiamo stored x sistemazione AL:
MagClass.magazzino.eliminaEmptyAL(sourceAL, MagClass.magazzino.CodSoggCurrUser);
Postazione.warningText = "";
Postazione.messaggiText = "";
Postazione.CssClass = cssAtt;
// ricarico forzato!
Response.Redirect("PostLiquidi_DT");
}
else
{
// altrimenti chiedo conferma per fase spostamenti forzati...
forceDelete = true;
Postazione.warningText = traduci("ConfChiusConAnomDtx");
Postazione.messaggiText = traduci("RichConfChiusAlDtx");
Postazione.CssClass = cssErr;
}
doUpdate();
}
/// <summary>
@@ -1220,8 +1308,6 @@ namespace GMW.WebUserControls
protected void lbtUpdQty_Click(object sender, EventArgs e)
{
MagClass.magazzino.taCartellini.updateQty(currUDC, MagClass.magazzino.CodSoggCurrUser, "U", codEventoUdcOut, qta);
// fix tablet
checkUpdateTablet(currUDC);
currUDC = "";
currParticolare = "";
grViewDest.SelectedIndex = -1;
@@ -1312,8 +1398,10 @@ namespace GMW.WebUserControls
string noteTrim = txtNote.Text.Trim();
try
{
#if false
// update UDC!
fatto = MagClass.magazzino.liquidiFullUpdate(sourceAL, flussoAnc, currUDC, ddlImballi.SelectedValue, noteTrim, MagClass.magazzino.CodSoggCurrUser);
fatto = MagClass.magazzino.liquidiFullUpdate(sourceAL, flussoAnc, currUDC, ddlImballi.SelectedValue, noteTrim, MagClass.magazzino.CodSoggCurrUser);
#endif
}
catch
{ }
@@ -1329,8 +1417,6 @@ namespace GMW.WebUserControls
// calcolo particolare completo di descrizione
DS_Applicazione.ElencoCartelliniRow riga = DataProxy.obj.taCartellini.stp_getByUdc(currUDC)[0];
string particolare = string.Format("{0} - {1}", riga.Particolare, riga.DescParticolare);
// indico su tablet come fatto
sendUpdateTablet(currUDC, particolare, traduci("cartAlStampato"), qta.ToString(), qta.ToString(), "", cssOk, cssOk, cssOk);
// resetto...
grViewDest.SelectedIndex = -1;
qta = 0;
@@ -1358,33 +1444,6 @@ namespace GMW.WebUserControls
}
}
/// <summary>
/// Effettua update della pagina tablet RT collegata alla postazione liquidi
/// </summary>
/// <param name="UDC"></param>
/// <param name="particolare"></param>
/// <param name="mess"></param>
/// <param name="qtaIn"></param>
/// <param name="qtaTot"></param>
/// <param name="qtaRim"></param>
/// <param name="css1"></param>
/// <param name="css2"></param>
/// <param name="css3"></param>
protected void sendUpdateTablet(string UDC, string particolare, string mess, string qtaIn, string qtaTot, string qtaRim, string css1, string css2, string css3)
{
if (memLayer.ML.confReadBool("updateTablet"))
{
try
{
string answ = SteamWare.urlUtils.callUrl(string.Format(@"{0}/MBC.aspx?txt01={1}&txt02={2}&txt03={3}&txt04={4}&txt05={5}&txt06={6}&css1={7}&css2={8}&css3={9}", memLayer.ML.confReadString("urlRT"), UDC, particolare, mess, qtaIn, qtaTot, qtaRim, css1, css2, css3), false);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in chiamata a pagina Tablet: {0}{1}", Environment.NewLine, exc));
barcodeIn = "";
}
}
}
/// <summary>
/// preseleziono (se possibile) imballo...
/// </summary>
/// <param name="sender"></param>
-54
View File
@@ -30,60 +30,6 @@ namespace GMW.WebUserControls {
/// </remarks>
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
/// <summary>
/// divAL control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAL;
/// <summary>
/// lblAL control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblAL;
/// <summary>
/// grViewSource control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView grViewSource;
/// <summary>
/// odsAL control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsAL;
/// <summary>
/// lbtPrendeCaricoAL control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtPrendeCaricoAL;
/// <summary>
/// lbtChiudiAL control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtChiudiAL;
/// <summary>
/// div1 control.
/// </summary>
BIN
View File
Binary file not shown.