correzioni warnings, di nuovo ricompilo tutto
This commit is contained in:
@@ -3132,4 +3132,7 @@
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1707:Remove the underscores from type name mod_ricercaGenerica.", Justification = "<In sospeso>", Scope = "type", Target = "~T:mod_ricercaGenerica")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1707:Remove the underscores from type name mod_selettore_ajax.", Justification = "<In sospeso>", Scope = "type", Target = "~T:mod_selettore_ajax")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1707:Remove the underscores from type name mod_unauthorized.", Justification = "<In sospeso>", Scope = "type", Target = "~T:mod_unauthorized")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1707:Remove the underscores from type name mod_vocabolario.", Justification = "<In sospeso>", Scope = "type", Target = "~T:mod_vocabolario")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Build", "CA1707:Remove the underscores from type name mod_vocabolario.", Justification = "<In sospeso>", Scope = "type", Target = "~T:mod_vocabolario")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~M:GMW.WebUserControls.mod_sterrTaglio.checkCreaUDC(System.Boolean,System.Boolean)~System.String")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<In sospeso>", Scope = "member", Target = "~P:GMW.WebUserControls.mod_anagLinee.codLineaSel")]
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace GMW
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = "W00";
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace GMW
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = "W00";
|
||||
}
|
||||
|
||||
@@ -101,9 +101,6 @@ namespace GMW.WebUserControls
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALS00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
@@ -481,7 +478,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
udcDest = "";
|
||||
}
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -501,7 +501,7 @@ namespace GMW.WebUserControls
|
||||
NewUDC = getUdcDest(tabDtx2Udc);
|
||||
udcRX = currUdcTT.Replace(flussoAnc, flussoRX);
|
||||
// verifico se posso procedere: in caso NON ci fosse UDC di destinazione
|
||||
if (NewUDC == "")
|
||||
if (string.IsNullOrEmpty(NewUDC))
|
||||
{
|
||||
// richiedo di caricare un UDC valido per il particolare richiesto...
|
||||
Postazione.messaggiText = "";
|
||||
@@ -610,7 +610,7 @@ namespace GMW.WebUserControls
|
||||
currParticolare = "";
|
||||
}
|
||||
// se non ho particolare PROVO a decodificare da codice datamatrix
|
||||
if (currParticolare == "")
|
||||
if (string.IsNullOrEmpty(currParticolare))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -704,7 +704,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
UdcTT = "";
|
||||
}
|
||||
if (UdcTT == "")
|
||||
if (string.IsNullOrEmpty(UdcTT))
|
||||
{
|
||||
// se non lo trovo uso UDC e trattamento "undef" a 0000, eventualmente creando UDC annuale
|
||||
UdcTT = string.Format("U{0}{1}{2:yy}000000", memLayer.ML.cdv("CodCS"), flussoAnc, DateTime.Now);
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastBarcodeIn == "")
|
||||
if (string.IsNullOrEmpty(lastBarcodeIn))
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
@@ -413,7 +413,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoFMI");
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
bool showBtn = false;
|
||||
bool onPrinting = divImballi.Visible;
|
||||
if (sourceAL != "" && currAL == "")
|
||||
if (sourceAL != "" && string.IsNullOrEmpty(currAL))
|
||||
{
|
||||
showBtn = true;
|
||||
fixCssAL("warning");
|
||||
@@ -614,7 +614,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
udcDest = "";
|
||||
}
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
// crea UDC DEST...
|
||||
qta = maxQta;
|
||||
@@ -1006,7 +1006,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = CodImballoStd;
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = CodImballoStd;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace GMW.WebUserControls
|
||||
// cerco su controllo
|
||||
answ = lblAL.Text.Trim();
|
||||
// se vuoto cerco in sessione (ed eventualmente aggiorno
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("sourceAL_{0}", uid));
|
||||
lblAL.Text = answ;
|
||||
@@ -144,7 +144,7 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
private void setDefaultVal()
|
||||
{
|
||||
if (sourceAL == "")
|
||||
if (string.IsNullOrEmpty(sourceAL))
|
||||
{
|
||||
sourceAL = currAL != "" ? currAL : "";
|
||||
}
|
||||
@@ -165,7 +165,7 @@ namespace GMW.WebUserControls
|
||||
public override void setVisibility()
|
||||
{
|
||||
bool showBtn = false;
|
||||
if (sourceAL != "" && currAL == "")
|
||||
if (sourceAL != "" && string.IsNullOrEmpty(currAL))
|
||||
{
|
||||
showBtn = true;
|
||||
fixCssAL("warning");
|
||||
@@ -273,7 +273,7 @@ namespace GMW.WebUserControls
|
||||
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
|
||||
tipoCodiceBarcode tipoBC = MagClass.tipoBCode_L5(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.AL || tipoBC == tipoCodiceBarcode.Imballo) && string.IsNullOrEmpty(currAL))
|
||||
{
|
||||
// sollevo errore, in primis va definito AL sorgente...
|
||||
Postazione.warningText = traduci("ERR-ALT-001");
|
||||
@@ -395,7 +395,7 @@ namespace GMW.WebUserControls
|
||||
break;
|
||||
case tipoCodiceBarcode.AL:
|
||||
// se linea libera...
|
||||
if (currAL == "")
|
||||
if (string.IsNullOrEmpty(currAL))
|
||||
{
|
||||
// verifico barcode valido
|
||||
if (checkAL(barcodeIn, "T"))
|
||||
@@ -482,7 +482,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
NewUDC = "";
|
||||
}
|
||||
if (NewUDC == "")
|
||||
if (string.IsNullOrEmpty(NewUDC))
|
||||
{
|
||||
// CASO 01: DTX in AL sorgente, particolare OK, NON C'E' UDC dest
|
||||
procDtx_Caso01(ref OldUDC, ref NewUDC, adesso);
|
||||
@@ -559,7 +559,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace GMW.WebUserControls
|
||||
catch
|
||||
{ }
|
||||
//2016.01.25 se vuoto metto ND!!!
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = "ND";
|
||||
}
|
||||
@@ -382,7 +382,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
// vers 2.9
|
||||
// controllo formato datamatrix sia impostato sulla linea (altrimenti errore linea "non battezzata")
|
||||
if (FormatoDtmxLinea == "")
|
||||
if (string.IsNullOrEmpty(FormatoDtmxLinea))
|
||||
{
|
||||
// errore poiché non è stato non specificato tipo Dtmx assegnato alla linea!
|
||||
Postazione.messaggiText = barcodeIn;
|
||||
@@ -447,7 +447,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
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);
|
||||
logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Formato Linea:{2}{0}Eccezione:{0}{2}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION);
|
||||
currParticolare = "";
|
||||
}
|
||||
if (currParticolare != "")
|
||||
@@ -545,7 +545,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
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);
|
||||
logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Formato Linea:{2}{0}Eccezione:{0}{2}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION);
|
||||
currParticolare = "";
|
||||
}
|
||||
if (currParticolare != "")
|
||||
@@ -849,7 +849,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
newUdcChild = "";
|
||||
}
|
||||
if (newUdcChild == "")
|
||||
if (string.IsNullOrEmpty(newUdcChild))
|
||||
{
|
||||
// controllo NON ci siano troppi UDC in posizione... da capienza ed assegnati
|
||||
DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga;
|
||||
|
||||
@@ -575,7 +575,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
newUdcChild = "";
|
||||
}
|
||||
if (newUdcChild == "")
|
||||
if (string.IsNullOrEmpty(newUdcChild))
|
||||
{
|
||||
// controllo NON ci siano troppi UDC in posizione... da capienza ed assegnati
|
||||
DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga;
|
||||
|
||||
@@ -5,433 +5,433 @@ using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_PostTT : System.Web.UI.UserControl
|
||||
public partial class mod_PostTT : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento richiesta update
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a RX
|
||||
/// </summary>
|
||||
protected string flusso = "TT";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a Controllato RX
|
||||
/// </summary>
|
||||
protected string statoUDC = "Tratt";
|
||||
/// <summary>
|
||||
/// codice evento dell'UDC che si crea
|
||||
/// </summary>
|
||||
protected string codEventoUdc = "UDC_TRATT";
|
||||
/// <summary>
|
||||
/// Codice AL sorgente da avanzare RX --> TT
|
||||
/// </summary>
|
||||
protected string sourceAL
|
||||
{
|
||||
/// <summary>
|
||||
/// evento richiesta update
|
||||
/// </summary>
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a RX
|
||||
/// </summary>
|
||||
protected string flusso = "TT";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a Controllato RX
|
||||
/// </summary>
|
||||
protected string statoUDC = "Tratt";
|
||||
/// <summary>
|
||||
/// codice evento dell'UDC che si crea
|
||||
/// </summary>
|
||||
protected string codEventoUdc = "UDC_TRATT";
|
||||
/// <summary>
|
||||
/// Codice AL sorgente da avanzare RX --> TT
|
||||
/// </summary>
|
||||
protected string sourceAL
|
||||
{
|
||||
get
|
||||
{
|
||||
return lblAL.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
lblAL.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero trattamento
|
||||
/// </summary>
|
||||
protected string NumTratt
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtNumTratt.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNumTratt.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Anno trattamento
|
||||
/// </summary>
|
||||
protected string AnnoTratt
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtAnno.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtAnno.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Durezza (ok/ko)
|
||||
/// </summary>
|
||||
public bool Durezza
|
||||
{
|
||||
get
|
||||
{
|
||||
return chkDurezza.Checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
chkDurezza.Checked = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
resetIN();
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = "";
|
||||
}
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// restta input
|
||||
/// </summary>
|
||||
private void resetIN()
|
||||
{
|
||||
AnnoTratt = DateTime.Now.Year.ToString();
|
||||
sourceAL = "";
|
||||
NumTratt = "";
|
||||
Durezza = false;
|
||||
txtNote.Text = "";
|
||||
txtPunzone.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
|
||||
switch (MagClass.tipoBCode_L5(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.AL:
|
||||
// verifico AL
|
||||
if (checkAL(barcodeIn))
|
||||
{
|
||||
resetIN();
|
||||
sourceAL = barcodeIn;
|
||||
}
|
||||
doUpdate();
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// verifico UDC
|
||||
if (checkUDC(barcodeIn))
|
||||
{
|
||||
string AL = "";
|
||||
// recupero da UDC
|
||||
try
|
||||
{
|
||||
AL = MagClass.magazzino.taAL2UDC.getByUDC(barcodeIn)[0].AL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreUdcNonAl");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
if (AL != "")
|
||||
{
|
||||
// verifico AL
|
||||
if (checkAL(AL))
|
||||
{
|
||||
sourceAL = AL;
|
||||
}
|
||||
}
|
||||
}
|
||||
doUpdate();
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// se è reset cancello tutto!
|
||||
if (barcodeIn == memLayer.ML.cdv("cmdReset"))
|
||||
{
|
||||
resetIN();
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = "";
|
||||
doUpdate();
|
||||
}
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = traduci("ERR-UNK-001");
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica l'AL se sia ok x procedere:
|
||||
/// - Tipo "R"
|
||||
/// - Attivo
|
||||
/// </summary>
|
||||
/// <param name="AL"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkAL(string AL)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = MagClass.magazzino.taEA.getByAL_TipoAttivo(AL, "R").Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (!answ)
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreAlNonRxAttivo");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
// reimporto AL comunque..
|
||||
sourceAL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica l'UDC se sia ok x procedere:
|
||||
/// - esista e sia IdxPosizione > 0
|
||||
/// - presente in un AL
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkUDC(string UDC)
|
||||
{
|
||||
bool answ = false;
|
||||
//faccio 3 controlli...
|
||||
bool udcOk = MagClass.magazzino.checkUDC(UDC);
|
||||
bool udcMov = MagClass.magazzino.checkUDC_mov(UDC);
|
||||
bool udcInAL = (MagClass.magazzino.taAL2UDC.getByUDC(UDC).Rows.Count > 0);
|
||||
// condizioni tutte soddisfatte?
|
||||
answ = (udcOk && udcMov && udcInAL);
|
||||
if (!answ)
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreUdcRx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna componenti + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
if (Durezza)
|
||||
{
|
||||
chkDurezza.Text = "OK";
|
||||
lblDurezza.Attributes.Remove("class");
|
||||
lblDurezza.Attributes.Add("class", "btn btn-success");
|
||||
}
|
||||
else
|
||||
{
|
||||
chkDurezza.Text = "KO";
|
||||
lblDurezza.Attributes.Remove("class");
|
||||
lblDurezza.Attributes.Add("class", "btn btn-danger");
|
||||
}
|
||||
grViewSource.DataBind();
|
||||
updateBtns();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
// controllo SE ho AL allora seleziono NumTratt o Durezza...
|
||||
if (sourceAL == "")
|
||||
{
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (NumTratt == "")
|
||||
{
|
||||
txtNumTratt.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Durezza)
|
||||
{
|
||||
chkDurezza.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (txtNote.Text.Trim() == "")
|
||||
{
|
||||
txtNote.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
lbtStampaAL.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fix visibilità btnStampa
|
||||
/// </summary>
|
||||
private void updateBtns()
|
||||
{
|
||||
// posso stampare se ho AL, ho num tratt e durezza..
|
||||
bool btnVis = (sourceAL != "");
|
||||
divNumTratt.Visible = btnVis;
|
||||
divDurezza.Visible = btnVis;
|
||||
divPunzone.Visible = btnVis;
|
||||
// posso stampare se ho AL, ho num tratt e durezza..
|
||||
btnVis = (sourceAL != "" && NumTratt != "" && Durezza);
|
||||
divStampa.Visible = btnVis;
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
MagClass.magazzino.stampaAL(udcReq, Postazione.printer, Request.UserHostName);
|
||||
// registro ri-stampa UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, "", "stampaAL", "Ri-Stampato AL TT");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// (ri)stampa AL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtStampaAL_Click(object sender, EventArgs e)
|
||||
{
|
||||
// verifico postazione sia valida...
|
||||
if (Postazione.name != "" && Postazione.IP != "" && Postazione.currCodCella != "")
|
||||
{
|
||||
/* generazione e stampa AL */
|
||||
string AL = "";
|
||||
string noteTrim = txtNote.Text.Trim();
|
||||
// ricalcolo numtratt come stringa formattata (anno + num 6 cifre)
|
||||
string codTratt = MagClass.magazzino.getCompTrattamenti(AnnoTratt, NumTratt);
|
||||
// punzone
|
||||
string punzone = txtPunzone.Text.Trim();
|
||||
// creazione AL ed associazione UDC / spostamento...
|
||||
try
|
||||
{
|
||||
AL = MagClass.magazzino.creaAssociaAlTT(sourceAL, tipoAL.AL_TT, MagClass.magazzino.CodSoggCurrUser, noteTrim, codTratt, Convert.ToInt32(Durezza), punzone);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (AL != "")
|
||||
{
|
||||
// lancio stampa
|
||||
MagClass.magazzino.stampaAL(AL, Postazione.printer, Request.UserHostName);
|
||||
// registro creazione AL
|
||||
MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, AL, "", "creaAL", string.Format("Creato AL TT su linea {0}, note: {1} ", Postazione.currCodLinea, noteTrim));
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
Postazione.warningText = "";
|
||||
Postazione.messaggiText = traduci("cartAlStampato");
|
||||
// resetto
|
||||
resetIN();
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.warningText = traduci("ErroreCreazioneALTT");
|
||||
Postazione.messaggiText = "";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
// ricarico che mi manca postazione!
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
Postazione.warningText = traduci("ERR-POS-001");
|
||||
Postazione.messaggiText = "";
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserito num trattamento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumTratt_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// controllo numero trattamento...
|
||||
string codTratt = MagClass.magazzino.getCompTrattamenti(AnnoTratt, NumTratt);
|
||||
// cerco se ci sia già (do errore...)
|
||||
if (MagClass.magazzino.taET.getByTratt(codTratt).Rows.Count > 0)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-NTT-001");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
NumTratt = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
Postazione.messaggiText = codTratt;
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// modificata durezza
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void chkDurezza_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
get
|
||||
{
|
||||
return lblAL.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
lblAL.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Numero trattamento
|
||||
/// </summary>
|
||||
protected string NumTratt
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtNumTratt.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtNumTratt.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Anno trattamento
|
||||
/// </summary>
|
||||
protected string AnnoTratt
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtAnno.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtAnno.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Durezza (ok/ko)
|
||||
/// </summary>
|
||||
public bool Durezza
|
||||
{
|
||||
get
|
||||
{
|
||||
return chkDurezza.Checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
chkDurezza.Checked = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
resetIN();
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = "";
|
||||
}
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// restta input
|
||||
/// </summary>
|
||||
private void resetIN()
|
||||
{
|
||||
AnnoTratt = DateTime.Now.Year.ToString();
|
||||
sourceAL = "";
|
||||
NumTratt = "";
|
||||
Durezza = false;
|
||||
txtNote.Text = "";
|
||||
txtPunzone.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
|
||||
switch (MagClass.tipoBCode_L5(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.AL:
|
||||
// verifico AL
|
||||
if (checkAL(barcodeIn))
|
||||
{
|
||||
resetIN();
|
||||
sourceAL = barcodeIn;
|
||||
}
|
||||
doUpdate();
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// verifico UDC
|
||||
if (checkUDC(barcodeIn))
|
||||
{
|
||||
string AL = "";
|
||||
// recupero da UDC
|
||||
try
|
||||
{
|
||||
AL = MagClass.magazzino.taAL2UDC.getByUDC(barcodeIn)[0].AL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreUdcNonAl");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
if (AL != "")
|
||||
{
|
||||
// verifico AL
|
||||
if (checkAL(AL))
|
||||
{
|
||||
sourceAL = AL;
|
||||
}
|
||||
}
|
||||
}
|
||||
doUpdate();
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// se è reset cancello tutto!
|
||||
if (barcodeIn == memLayer.ML.cdv("cmdReset"))
|
||||
{
|
||||
resetIN();
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = "";
|
||||
doUpdate();
|
||||
}
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText = "";
|
||||
Postazione.warningText = traduci("ERR-UNK-001");
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica l'AL se sia ok x procedere:
|
||||
/// - Tipo "R"
|
||||
/// - Attivo
|
||||
/// </summary>
|
||||
/// <param name="AL"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkAL(string AL)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = MagClass.magazzino.taEA.getByAL_TipoAttivo(AL, "R").Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (!answ)
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreAlNonRxAttivo");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
// reimporto AL comunque..
|
||||
sourceAL = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica l'UDC se sia ok x procedere:
|
||||
/// - esista e sia IdxPosizione > 0
|
||||
/// - presente in un AL
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkUDC(string UDC)
|
||||
{
|
||||
bool answ = false;
|
||||
//faccio 3 controlli...
|
||||
bool udcOk = MagClass.magazzino.checkUDC(UDC);
|
||||
bool udcMov = MagClass.magazzino.checkUDC_mov(UDC);
|
||||
bool udcInAL = (MagClass.magazzino.taAL2UDC.getByUDC(UDC).Rows.Count > 0);
|
||||
// condizioni tutte soddisfatte?
|
||||
answ = (udcOk && udcMov && udcInAL);
|
||||
if (!answ)
|
||||
{
|
||||
Postazione.warningText = traduci("ErroreUdcRx");
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna componenti + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
if (Durezza)
|
||||
{
|
||||
chkDurezza.Text = "OK";
|
||||
lblDurezza.Attributes.Remove("class");
|
||||
lblDurezza.Attributes.Add("class", "btn btn-success");
|
||||
}
|
||||
else
|
||||
{
|
||||
chkDurezza.Text = "KO";
|
||||
lblDurezza.Attributes.Remove("class");
|
||||
lblDurezza.Attributes.Add("class", "btn btn-danger");
|
||||
}
|
||||
grViewSource.DataBind();
|
||||
updateBtns();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
// controllo SE ho AL allora seleziono NumTratt o Durezza...
|
||||
if (string.IsNullOrEmpty(sourceAL))
|
||||
{
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(NumTratt))
|
||||
{
|
||||
txtNumTratt.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Durezza)
|
||||
{
|
||||
chkDurezza.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtNote.Text.Trim()))
|
||||
{
|
||||
txtNote.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
lbtStampaAL.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// fix visibilità btnStampa
|
||||
/// </summary>
|
||||
private void updateBtns()
|
||||
{
|
||||
// posso stampare se ho AL, ho num tratt e durezza..
|
||||
bool btnVis = (sourceAL != "");
|
||||
divNumTratt.Visible = btnVis;
|
||||
divDurezza.Visible = btnVis;
|
||||
divPunzone.Visible = btnVis;
|
||||
// posso stampare se ho AL, ho num tratt e durezza..
|
||||
btnVis = (sourceAL != "" && NumTratt != "" && Durezza);
|
||||
divStampa.Visible = btnVis;
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
MagClass.magazzino.stampaAL(udcReq, Postazione.printer, Request.UserHostName);
|
||||
// registro ri-stampa UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, "", "stampaAL", "Ri-Stampato AL TT");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// (ri)stampa AL
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtStampaAL_Click(object sender, EventArgs e)
|
||||
{
|
||||
// verifico postazione sia valida...
|
||||
if (Postazione.name != "" && Postazione.IP != "" && Postazione.currCodCella != "")
|
||||
{
|
||||
/* generazione e stampa AL */
|
||||
string AL = "";
|
||||
string noteTrim = txtNote.Text.Trim();
|
||||
// ricalcolo numtratt come stringa formattata (anno + num 6 cifre)
|
||||
string codTratt = MagClass.magazzino.getCompTrattamenti(AnnoTratt, NumTratt);
|
||||
// punzone
|
||||
string punzone = txtPunzone.Text.Trim();
|
||||
// creazione AL ed associazione UDC / spostamento...
|
||||
try
|
||||
{
|
||||
AL = MagClass.magazzino.creaAssociaAlTT(sourceAL, tipoAL.AL_TT, MagClass.magazzino.CodSoggCurrUser, noteTrim, codTratt, Convert.ToInt32(Durezza), punzone);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (AL != "")
|
||||
{
|
||||
// lancio stampa
|
||||
MagClass.magazzino.stampaAL(AL, Postazione.printer, Request.UserHostName);
|
||||
// registro creazione AL
|
||||
MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, AL, "", "creaAL", string.Format("Creato AL TT su linea {0}, note: {1} ", Postazione.currCodLinea, noteTrim));
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
Postazione.warningText = "";
|
||||
Postazione.messaggiText = traduci("cartAlStampato");
|
||||
// resetto
|
||||
resetIN();
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.warningText = traduci("ErroreCreazioneALTT");
|
||||
Postazione.messaggiText = "";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
// ricarico che mi manca postazione!
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
Postazione.warningText = traduci("ERR-POS-001");
|
||||
Postazione.messaggiText = "";
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inserito num trattamento
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtNumTratt_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
// controllo numero trattamento...
|
||||
string codTratt = MagClass.magazzino.getCompTrattamenti(AnnoTratt, NumTratt);
|
||||
// cerco se ci sia già (do errore...)
|
||||
if (MagClass.magazzino.taET.getByTratt(codTratt).Rows.Count > 0)
|
||||
{
|
||||
Postazione.warningText = traduci("ERR-NTT-001");
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
NumTratt = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.warningText = "";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
Postazione.messaggiText = codTratt;
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// modificata durezza
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void chkDurezza_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,7 +346,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
udcDest = "";
|
||||
}
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -6,462 +6,462 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_SterrTagIN : System.Web.UI.UserControl
|
||||
public partial class mod_SterrTagIN : System.Web.UI.UserControl
|
||||
{
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
traduciObj();
|
||||
idxCella = Postazione.currIdxCella;
|
||||
}
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaST_IN"))
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaST_IN");
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaST_IN", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debab mostrare un campo ricerca UDC attivo...
|
||||
/// </summary>
|
||||
private void fixRicercaUdc()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("valoreCercatoSTI"))
|
||||
{
|
||||
testoRicerca = memLayer.ML.StringSessionObj("valoreCercatoSTI");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Sterrato IN {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Sterrato IN");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
traduciObj();
|
||||
idxCella = Postazione.currIdxCella;
|
||||
}
|
||||
doChecks();
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare) && TermClass.Ter.isAnima(barcodeIn)) // è un particolare... ed un anima...
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaST_IN"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaST_IN");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaST_IN", value);
|
||||
}
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debab mostrare un campo ricerca UDC attivo...
|
||||
/// </summary>
|
||||
private void fixRicercaUdc()
|
||||
else
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("valoreCercatoSTI"))
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
testoRicerca = memLayer.ML.StringSessionObj("valoreCercatoSTI");
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W1000")
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Sterrato IN {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Sterrato IN");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare) && TermClass.Ter.isAnima(barcodeIn)) // è un particolare... ed un anima...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W1000")
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x fusi (pre sterratura/taglio)
|
||||
int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione;
|
||||
if (IdxPosizione == memLayer.ML.cdvi("IdxPosizioneFusi"))
|
||||
{
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo se UDC non sia già stato spostato in posizione... ds magazzino, posiz udc corrente, get By udc
|
||||
if (idxCellaCurr == Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti procedo...
|
||||
string codSogg = "";
|
||||
string particolare = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
decimal qta = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Qta;
|
||||
string noteTrim = "";
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
noteTrim = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Note.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
noteTrim = "";
|
||||
}
|
||||
DateTime adesso = DateTime.Now;
|
||||
// se ho cod cella sposto!
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), barcodeIn, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
// registro sposstamento UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, barcodeIn, particolare, "spostaUDC", string.Format("Caricato UDC Fusi su linea {2}, qta: {0} {1} ", qta, noteTrim, Postazione.currCodLinea));
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// udc NON corretto, mostro errore...
|
||||
Postazione.messaggiText += " - Attenzione, UDC NON VALIDO (IdxPosizione)!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
idxCella = Postazione.currIdxCella;
|
||||
grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
{
|
||||
// resetto i dati QtaTot e particolare...
|
||||
testoRicerca = "";
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// passo alla modalità OUT
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("SterrTaglioOUT.aspx");
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoSTI");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoSTI", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x fusi (pre sterratura/taglio)
|
||||
int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione;
|
||||
if (IdxPosizione == memLayer.ML.cdvi("IdxPosizioneFusi"))
|
||||
{
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo se UDC non sia già stato spostato in posizione... ds magazzino, posiz udc corrente, get By udc
|
||||
if (idxCellaCurr == Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti procedo...
|
||||
string codSogg = "";
|
||||
string particolare = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
decimal qta = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Qta;
|
||||
string noteTrim = "";
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
noteTrim = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Note.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
noteTrim = "";
|
||||
}
|
||||
DateTime adesso = DateTime.Now;
|
||||
// se ho cod cella sposto!
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), barcodeIn, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
// registro sposstamento UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, barcodeIn, particolare, "spostaUDC", string.Format("Caricato UDC Fusi su linea {2}, qta: {0} {1} ", qta, noteTrim, Postazione.currCodLinea));
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
else
|
||||
{
|
||||
// udc NON corretto, mostro errore...
|
||||
Postazione.messaggiText += " - Attenzione, UDC NON VALIDO (IdxPosizione)!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
idxCella = Postazione.currIdxCella;
|
||||
grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
{
|
||||
// resetto i dati QtaTot e particolare...
|
||||
testoRicerca = "";
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// passo alla modalità OUT
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.Redirect("SterrTaglioOUT.aspx");
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
memLayer.ML.emptySessionVal("valoreCercatoSTI");
|
||||
}
|
||||
else
|
||||
{
|
||||
memLayer.ML.setSessionVal("valoreCercatoSTI", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -801,7 +801,7 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoSTO");
|
||||
udcSelC = "";
|
||||
|
||||
@@ -7,357 +7,357 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_UdcCella : SteamWare.ApplicationUserControl
|
||||
public partial class mod_UdcCella : SteamWare.ApplicationUserControl
|
||||
{
|
||||
#region area da NON modificare
|
||||
|
||||
#region area protected
|
||||
|
||||
protected string _idxGridView;
|
||||
protected string _idxGridViewExt;
|
||||
protected string _tabCache;
|
||||
protected bool _showNewBtn = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
#region area da NON modificare
|
||||
|
||||
#region area protected
|
||||
|
||||
protected string _idxGridView;
|
||||
protected string _idxGridViewExt;
|
||||
protected string _tabCache;
|
||||
protected bool _showNewBtn = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// collega i controlli
|
||||
/// </summary>
|
||||
protected override void bindControlli()
|
||||
{
|
||||
base.bindControlli();
|
||||
caricaTabelle();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_resetSelezione;
|
||||
public event EventHandler eh_nuovoValore;
|
||||
public event EventHandler eh_selValore;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// effettua update del modulo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
resetSelezione();
|
||||
checkFixOds();
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
lblWarning.Visible = false;
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region area codice variabile
|
||||
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna controlli datagrid e numero righe in pagina
|
||||
/// </summary>
|
||||
protected override void aggiornaControlliDataGL()
|
||||
{
|
||||
base.aggiornaControlliDataGL();
|
||||
grView.PageSize = _righeDataGridShort;
|
||||
}
|
||||
/// <summary>
|
||||
/// carico le tabelle
|
||||
/// </summary>
|
||||
private void caricaTabelle()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
DS_magazzino.v_UdcDetailDataTable tabella = new DS_magazzino.v_UdcDetailDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduzione();
|
||||
azzeraPostUpdate();
|
||||
updateText();
|
||||
}
|
||||
_idxGridView = "UDC2edit";
|
||||
}
|
||||
/// <summary>
|
||||
/// traduzioni
|
||||
/// </summary>
|
||||
protected void traduzione()
|
||||
{
|
||||
// sistemo labels e buttons
|
||||
lblQta.Text = traduci("lblQta");
|
||||
lblNewPos.Text = traduci("lblNewPos");
|
||||
lblErrore.Text = traduci("ErroreCellaDestOccupata");
|
||||
btnQta.Text = traduci("btnQta");
|
||||
btnSposta.Text = traduci("btnSposta");
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// chiama procedura x spostamento tra celle di un UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSposta_Click1(object sender, EventArgs e)
|
||||
{
|
||||
// ricavo il valore dell'UDC cliccato...
|
||||
string UDC = memLayer.ML.StringSessionObj(string.Format("{0}_sel", _idxGridView));
|
||||
int IdxCellaTo = 0;
|
||||
bool cellaToOk = false;
|
||||
try
|
||||
{
|
||||
DS_magazzino.CelleRow rowCella = MagClass.magazzino.taCelle.getByCodCella(txtNewCella.Text)[0];
|
||||
IdxCellaTo = rowCella.IdxCella;
|
||||
// controllo che la cella di destinazione NON sia bloccata
|
||||
cellaToOk = rowCella.Attiva;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (cellaToOk)
|
||||
{
|
||||
// controllo che sia valido x fare l'operazione
|
||||
if (IdxCellaTo > 0)
|
||||
{
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
}
|
||||
azzeraPostUpdate();
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// la cella è bloccata, nn devo permettere spostamento
|
||||
lblErrore.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna la qta pezzi dell'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQta_Click(object sender, EventArgs e)
|
||||
{
|
||||
string UDC = memLayer.ML.StringSessionObj(string.Format("{0}_sel", _idxGridView));
|
||||
decimal qta = -1;
|
||||
try
|
||||
{
|
||||
qta = Convert.ToDecimal(txtQta.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (qta >= 0)
|
||||
{
|
||||
MagClass.magazzino.rettificaQtaUDC(UDC, qta, Request.UserHostName);
|
||||
}
|
||||
azzeraPostUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
azzeraPostUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// reset controlli post aggiornamento
|
||||
/// </summary>
|
||||
private void azzeraPostUpdate()
|
||||
{
|
||||
lblErrore.Visible = false;
|
||||
grView.DataBind();
|
||||
resetSelezione();
|
||||
txtNewCella.Text = "";
|
||||
txtQta.Text = "";
|
||||
doShowPanels(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true);
|
||||
// fix panels
|
||||
doShowPanels(true);
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_selValore != null)
|
||||
{
|
||||
eh_selValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// determina visibilità panels correzione valori
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
private void doShowPanels(bool p)
|
||||
{
|
||||
pnlQta.Visible = p;
|
||||
pnlSposta.Visible = p;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoCella");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoCella", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il testo cercato
|
||||
/// </summary>
|
||||
public void updateText()
|
||||
{
|
||||
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella") != "" && !Page.IsPostBack)
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// collega i controlli
|
||||
/// </summary>
|
||||
protected override void bindControlli()
|
||||
{
|
||||
base.bindControlli();
|
||||
caricaTabelle();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_resetSelezione;
|
||||
public event EventHandler eh_nuovoValore;
|
||||
public event EventHandler eh_selValore;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// effettua update del modulo
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
resetSelezione();
|
||||
checkFixOds();
|
||||
grView.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView));
|
||||
grView.SelectedIndex = -1;
|
||||
lblWarning.Visible = false;
|
||||
if (eh_resetSelezione != null)
|
||||
{
|
||||
eh_resetSelezione(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region area codice variabile
|
||||
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna controlli datagrid e numero righe in pagina
|
||||
/// </summary>
|
||||
protected override void aggiornaControlliDataGL()
|
||||
{
|
||||
base.aggiornaControlliDataGL();
|
||||
grView.PageSize = _righeDataGridShort;
|
||||
}
|
||||
/// <summary>
|
||||
/// carico le tabelle
|
||||
/// </summary>
|
||||
private void caricaTabelle()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
DS_magazzino.v_UdcDetailDataTable tabella = new DS_magazzino.v_UdcDetailDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializzazione valori di default
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduzione();
|
||||
azzeraPostUpdate();
|
||||
updateText();
|
||||
}
|
||||
_idxGridView = "UDC2edit";
|
||||
}
|
||||
/// <summary>
|
||||
/// traduzioni
|
||||
/// </summary>
|
||||
protected void traduzione()
|
||||
{
|
||||
// sistemo labels e buttons
|
||||
lblQta.Text = traduci("lblQta");
|
||||
lblNewPos.Text = traduci("lblNewPos");
|
||||
lblErrore.Text = traduci("ErroreCellaDestOccupata");
|
||||
btnQta.Text = traduci("btnQta");
|
||||
btnSposta.Text = traduci("btnSposta");
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// chiama procedura x spostamento tra celle di un UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSposta_Click1(object sender, EventArgs e)
|
||||
{
|
||||
// ricavo il valore dell'UDC cliccato...
|
||||
string UDC = memLayer.ML.StringSessionObj(string.Format("{0}_sel", _idxGridView));
|
||||
int IdxCellaTo = 0;
|
||||
bool cellaToOk = false;
|
||||
try
|
||||
{
|
||||
DS_magazzino.CelleRow rowCella = MagClass.magazzino.taCelle.getByCodCella(txtNewCella.Text)[0];
|
||||
IdxCellaTo = rowCella.IdxCella;
|
||||
// controllo che la cella di destinazione NON sia bloccata
|
||||
cellaToOk = rowCella.Attiva;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (cellaToOk)
|
||||
{
|
||||
// controllo che sia valido x fare l'operazione
|
||||
if (IdxCellaTo > 0)
|
||||
{
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), UDC, IdxCellaTo, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
}
|
||||
azzeraPostUpdate();
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// la cella è bloccata, nn devo permettere spostamento
|
||||
lblErrore.Visible = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna la qta pezzi dell'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQta_Click(object sender, EventArgs e)
|
||||
{
|
||||
string UDC = memLayer.ML.StringSessionObj(string.Format("{0}_sel", _idxGridView));
|
||||
decimal qta = -1;
|
||||
try
|
||||
{
|
||||
qta = Convert.ToDecimal(txtQta.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (qta >= 0)
|
||||
{
|
||||
MagClass.magazzino.rettificaQtaUDC(UDC, qta, Request.UserHostName);
|
||||
}
|
||||
azzeraPostUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
azzeraPostUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// reset controlli post aggiornamento
|
||||
/// </summary>
|
||||
private void azzeraPostUpdate()
|
||||
{
|
||||
lblErrore.Visible = false;
|
||||
grView.DataBind();
|
||||
resetSelezione();
|
||||
txtNewCella.Text = "";
|
||||
txtQta.Text = "";
|
||||
doShowPanels(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione cambio selezione valore
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// salvo in session il valore selezionato...
|
||||
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true);
|
||||
// fix panels
|
||||
doShowPanels(true);
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_selValore != null)
|
||||
{
|
||||
eh_selValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// determina visibilità panels correzione valori
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
private void doShowPanels(bool p)
|
||||
{
|
||||
pnlQta.Visible = p;
|
||||
pnlSposta.Visible = p;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoCella");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoCella", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna il testo cercato
|
||||
/// </summary>
|
||||
public void updateText()
|
||||
{
|
||||
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella") != "" && !Page.IsPostBack)
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercatoCella");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,263 +5,263 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_autocomplete : System.Web.UI.UserControl
|
||||
public partial class mod_autocomplete : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// evento valore selezionato
|
||||
/// </summary>
|
||||
public event EventHandler eh_valSelezionato;
|
||||
/// <summary>
|
||||
/// evento valore selezionato
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// segnaposto x casella testuale autocomplete
|
||||
/// </summary>
|
||||
public string placeholder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UID formattato con "_"
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
/// <summary>
|
||||
/// evento valore selezionato
|
||||
/// </summary>
|
||||
public event EventHandler eh_valSelezionato;
|
||||
/// <summary>
|
||||
/// evento valore selezionato
|
||||
/// </summary>
|
||||
public event EventHandler eh_reset;
|
||||
/// <summary>
|
||||
/// segnaposto x casella testuale autocomplete
|
||||
/// </summary>
|
||||
public string placeholder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UID formattato con "_"
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
// fix brutale: nelle pagine master c'è un ctl00_ iniziale di troppo...
|
||||
return this.UniqueID.Replace("$", "_").Replace("ctl00_", "").Replace("ctl01_", "");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
defaultVal = "";
|
||||
txtSel.Attributes["placeholder"] = placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtSel_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (txtSel.Text.Trim() == "")
|
||||
{
|
||||
hiddenFieldID.Text = defaultVal;
|
||||
_valore = defaultVal;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo valore selezionato!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void hiddenFieldID_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_valore = hiddenFieldID.Text;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore selezionato dal controllo (RW local)
|
||||
/// </summary>
|
||||
protected string _valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(uid + "_sel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(uid + "_sel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salva evento selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPost_Click(object sender, EventArgs e)
|
||||
{
|
||||
_valore = hiddenFieldID.Text;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore (chiave) selezionato dal controllo (R public)
|
||||
/// </summary>
|
||||
public string valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return hiddenFieldID.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
hiddenFieldID.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// label selezionato dal controllo (R public)
|
||||
/// </summary>
|
||||
public string selezione
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtSel.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtSel.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// label dell'etichetta di ricerca
|
||||
/// </summary>
|
||||
public string labelRicerca
|
||||
{
|
||||
set
|
||||
{
|
||||
lblField.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num minimo caratteri x autocomplete
|
||||
/// </summary>
|
||||
public Int32 minCharAutocomplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(txtMinCharAutoCom.Text);
|
||||
}
|
||||
set
|
||||
{
|
||||
txtMinCharAutoCom.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// path del webservice (compreso metodo)
|
||||
/// nb: DI NORMA fornisce risultati nel formato label#valore
|
||||
/// </summary>
|
||||
public string ServicePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtServiceUrl.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtServiceUrl.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta visibilità della textBox delle chiavi
|
||||
/// </summary>
|
||||
public bool showKey
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
hiddenFieldID.Width = Unit.Pixel(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta la stringa tooltip
|
||||
/// </summary>
|
||||
public string toolTip
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.ToolTip = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// larghezza textbox in unità EM
|
||||
/// </summary>
|
||||
public int textEmWidht
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.Width = Unit.Parse(string.Format("{0}em", value));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// larghezza textbox in unità %
|
||||
/// </summary>
|
||||
public int textEmPerc
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.Width = Unit.Parse(string.Format("{0}%", value));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta il focus sulla textBox
|
||||
/// </summary>
|
||||
public void setFocus()
|
||||
{
|
||||
txtSel.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// permette di passare altri parametri di contesto al metodo invocato x autocomplete
|
||||
/// </summary>
|
||||
public string contextKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtSel.AccessKey;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtSel.AccessKey = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tabIndex del controllo
|
||||
/// </summary>
|
||||
public short TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.TabIndex = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore di default (x reset)
|
||||
/// </summary>
|
||||
public string defaultVal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
// resetto selezione e ricerca!
|
||||
txtSel.Text = "";
|
||||
hiddenFieldID.Text = defaultVal;
|
||||
_valore = defaultVal;
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
// fix brutale: nelle pagine master c'è un ctl00_ iniziale di troppo...
|
||||
return this.UniqueID.Replace("$", "_").Replace("ctl00_", "").Replace("ctl01_", "");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
defaultVal = "";
|
||||
txtSel.Attributes["placeholder"] = placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtSel_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtSel.Text.Trim()))
|
||||
{
|
||||
hiddenFieldID.Text = defaultVal;
|
||||
_valore = defaultVal;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// salvo valore selezionato!
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void hiddenFieldID_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_valore = hiddenFieldID.Text;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore selezionato dal controllo (RW local)
|
||||
/// </summary>
|
||||
protected string _valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(uid + "_sel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(uid + "_sel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// salva evento selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPost_Click(object sender, EventArgs e)
|
||||
{
|
||||
_valore = hiddenFieldID.Text;
|
||||
if (eh_valSelezionato != null)
|
||||
{
|
||||
eh_valSelezionato(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// valore (chiave) selezionato dal controllo (R public)
|
||||
/// </summary>
|
||||
public string valore
|
||||
{
|
||||
get
|
||||
{
|
||||
return hiddenFieldID.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
hiddenFieldID.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// label selezionato dal controllo (R public)
|
||||
/// </summary>
|
||||
public string selezione
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtSel.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtSel.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// label dell'etichetta di ricerca
|
||||
/// </summary>
|
||||
public string labelRicerca
|
||||
{
|
||||
set
|
||||
{
|
||||
lblField.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num minimo caratteri x autocomplete
|
||||
/// </summary>
|
||||
public Int32 minCharAutocomplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(txtMinCharAutoCom.Text);
|
||||
}
|
||||
set
|
||||
{
|
||||
txtMinCharAutoCom.Text = value.ToString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// path del webservice (compreso metodo)
|
||||
/// nb: DI NORMA fornisce risultati nel formato label#valore
|
||||
/// </summary>
|
||||
public string ServicePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtServiceUrl.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtServiceUrl.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta visibilità della textBox delle chiavi
|
||||
/// </summary>
|
||||
public bool showKey
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
hiddenFieldID.Width = Unit.Pixel(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta la stringa tooltip
|
||||
/// </summary>
|
||||
public string toolTip
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.ToolTip = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// larghezza textbox in unità EM
|
||||
/// </summary>
|
||||
public int textEmWidht
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.Width = Unit.Parse(string.Format("{0}em", value));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// larghezza textbox in unità %
|
||||
/// </summary>
|
||||
public int textEmPerc
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.Width = Unit.Parse(string.Format("{0}%", value));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta il focus sulla textBox
|
||||
/// </summary>
|
||||
public void setFocus()
|
||||
{
|
||||
txtSel.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// permette di passare altri parametri di contesto al metodo invocato x autocomplete
|
||||
/// </summary>
|
||||
public string contextKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtSel.AccessKey;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtSel.AccessKey = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tabIndex del controllo
|
||||
/// </summary>
|
||||
public short TabIndex
|
||||
{
|
||||
set
|
||||
{
|
||||
txtSel.TabIndex = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore di default (x reset)
|
||||
/// </summary>
|
||||
public string defaultVal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
// resetto selezione e ricerca!
|
||||
txtSel.Text = "";
|
||||
hiddenFieldID.Text = defaultVal;
|
||||
_valore = defaultVal;
|
||||
if (eh_reset != null)
|
||||
{
|
||||
eh_reset(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,193 +8,6 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_confLinea : ApplicationUserControl
|
||||
{
|
||||
#if false
|
||||
/// <summary>
|
||||
/// reset della selezione
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta la selezione dei valori in caso di modifiche su altri controlli
|
||||
/// </summary>
|
||||
public void resetSelezione()
|
||||
{
|
||||
grView.SelectedIndex = -1;
|
||||
grView.DataBind();
|
||||
raiseEvent(ucEvType.Reset);
|
||||
}
|
||||
/// <summary>
|
||||
/// inserisce nuovo valore da footer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lblIns_click(object sender, EventArgs e)
|
||||
{
|
||||
// click su inserimento, chiamo il metodo insert dell'ObjectDataSource
|
||||
ods.Insert();
|
||||
}
|
||||
/// <summary>
|
||||
/// gestione evento richiesta nuovo valore (mostra footer, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// creo nuova riga NON ATTIVA!!!
|
||||
creaNuovaLinea();
|
||||
// reset selezione...
|
||||
resetSelezione();
|
||||
}
|
||||
/// <summary>
|
||||
/// Creo una nuova linea andando a creare prima tutte el dipendenze...
|
||||
/// </summary>
|
||||
private void creaNuovaLinea()
|
||||
{
|
||||
DS_magazzino.BlocchiRow rigaBlocco = null;
|
||||
DS_magazzino.TipoCellaRow rigaTipoCella = null;
|
||||
DS_magazzino.CelleDataTable tabCelle = null;
|
||||
DS_magazzino.CelleRow rigaCella = null;
|
||||
string codMagPost = "";
|
||||
string CodCS = memLayer.ML.CRS("CodCS");
|
||||
|
||||
// recupero blocco selezionato
|
||||
try
|
||||
{
|
||||
rigaBlocco = MagClass.magazzino.taBlocchi.getByCodBlocco(CodBlocco)[0];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (rigaBlocco != null)
|
||||
{
|
||||
// 2016.08.04 modifica: CodMag da decodifica Blocchi: CodBlocco selezionato --> vedo quale CodMag (e NON + da web.config)
|
||||
codMagPost = rigaBlocco.CodMag;
|
||||
//// OLD: magazzino linee: da web config ("WIP") cerco il suo CodMag
|
||||
//string codMagPost = memLayer.ML.CRS("codMagPost");
|
||||
|
||||
// recupero TipoCella
|
||||
try
|
||||
{
|
||||
// attenzione: capienza == 1 x quelle cercate...
|
||||
rigaTipoCella = ((DS_magazzino.TipoCellaRow)MagClass.magazzino.taTipoCella.getByCodMag(CodCS, codMagPost).Select(" Capienza = 1 ")[0]);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (rigaTipoCella != null)
|
||||
{
|
||||
// --> +1 qta cella
|
||||
MagClass.magazzino.taTipoCella.UpdateQuery(rigaTipoCella.IdxTipoCella, codMagPost, CodCS, rigaTipoCella.Quantita + 1, rigaTipoCella.Capienza, rigaTipoCella.Max_X, rigaTipoCella.Max_Y, rigaTipoCella.Max_Z, rigaTipoCella.Max_Kg, rigaTipoCella.CheckPiena, rigaTipoCella.SetMag);
|
||||
// --> +1 qta blocco
|
||||
MagClass.magazzino.taBlocchi.UpdateQuery(codMagPost, CodCS, rigaBlocco.CodBlocco, rigaBlocco.DescBlocco, rigaBlocco.NumX + 1, rigaBlocco.NumY, rigaBlocco.NumZ, rigaBlocco.IdxBlocco);
|
||||
// creo NUOVA CELLA
|
||||
utils.obj.taSTP.stp_celleCreaMancantiBlocco(CodCS, codMagPost, rigaBlocco.IdxBlocco, rigaTipoCella.IdxTipoCella);
|
||||
// recupero ultima cella creata...
|
||||
tabCelle = MagClass.magazzino.taCelle.getByIdxBlocco(rigaBlocco.IdxBlocco);
|
||||
if (tabCelle.Rows.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
rigaCella = (DS_magazzino.CelleRow)tabCelle.Select(string.Format("X = {0}", rigaBlocco.NumX + 1))[0];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (rigaCella != null)
|
||||
{
|
||||
// creo nuova linea
|
||||
MagClass.magazzino.taAL.Insert(rigaCella.CodCella.Substring(0, 5), "NUOVA LINEA", "", DateTime.Now, "", "", false, false, "ND", "IO", false, memLayer.ML.CRI("minTimeDef"), memLayer.ML.CRI("maxTimeDef"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// determina se sia eliminabile il record (=non usato)
|
||||
/// </summary>
|
||||
/// <param name="idxMaker"></param>
|
||||
/// <returns></returns>
|
||||
public bool delEnabled(object idxObj)
|
||||
{
|
||||
bool answ = isWritable();
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elenco colonne del datagrid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DataColumnCollection colonneObj()
|
||||
{
|
||||
DS_DataMatrix.TabSpecDtxDataTable tabella = new DS_DataMatrix.TabSpecDtxDataTable();
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
/// <summary>
|
||||
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
|
||||
/// questi devono essere opportunamente nominati (es: txt{0}, dl{0}, ...)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
|
||||
{
|
||||
//recupero la riga footer...
|
||||
DataColumnCollection colonne = colonneObj();
|
||||
string nomeCol;
|
||||
string tipoColonna = "";
|
||||
foreach (DataColumn colonna in colonne)
|
||||
{
|
||||
nomeCol = colonna.ColumnName;
|
||||
// cerco un textbox o quello che sia...
|
||||
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "textBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "dropDownList";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "checkBox";
|
||||
}
|
||||
else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null)
|
||||
{
|
||||
tipoColonna = "selAjax";
|
||||
}
|
||||
// in base al tipo salvo negli inputparameters dell'ODS
|
||||
switch (tipoColonna)
|
||||
{
|
||||
case "textBox":
|
||||
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
|
||||
break;
|
||||
case "dropDownList":
|
||||
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
|
||||
break;
|
||||
case "checkBox":
|
||||
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
|
||||
break;
|
||||
case "selAjax":
|
||||
e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tipoColonna = "";
|
||||
}
|
||||
// imposto formato Dtmx
|
||||
e.InputParameters["FormatoDtmx"] = "";
|
||||
}
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent(ucEvType.Selected);
|
||||
}
|
||||
#endif
|
||||
|
||||
public string codLinea
|
||||
{
|
||||
@@ -213,11 +26,11 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="_modo"></param>
|
||||
/// <returns></returns>
|
||||
public string cssFromModo(object _modo)
|
||||
public static string cssFromModo(object _modo)
|
||||
{
|
||||
int val = 0;
|
||||
string answ = "";
|
||||
int.TryParse(_modo.ToString(), out val);
|
||||
bool convOk = int.TryParse(_modo.ToString(), out val);
|
||||
switch (val)
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
lblALSel.Text = string.Format("AL KIT: <b>{0}</b>", currAL_KA);
|
||||
}
|
||||
if (lblALSel.Text == "")
|
||||
if (string.IsNullOrEmpty(lblALSel.Text))
|
||||
{
|
||||
lblALSel.Text = "...";
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = "stileComandoND";
|
||||
}
|
||||
@@ -478,7 +478,7 @@ namespace GMW.WebUserControls
|
||||
else
|
||||
{
|
||||
currMess = traduci("AttesaBCode");
|
||||
if (currUdcFrom == "")
|
||||
if (string.IsNullOrEmpty(currUdcFrom))
|
||||
{
|
||||
currCss = "stileAttesa";
|
||||
}
|
||||
|
||||
@@ -5,313 +5,313 @@ using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_consumoFusi : System.Web.UI.UserControl
|
||||
public partial class mod_consumoFusi : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
disableConfirm = false;
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("UDC FROM: <b>{0}</b>", currUdcFrom);
|
||||
}
|
||||
if (lblGitterBoxAttivo.Text == "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkConsuma();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnConsuma.Text = traduci("btnConsumaUdc");
|
||||
// fix button gestione disabilitazione conferme
|
||||
fixBtnDisableConf();
|
||||
}
|
||||
/// <summary>
|
||||
/// ssitema btn abilitazione/disabilitazione conferma comandi
|
||||
/// </summary>
|
||||
private void fixBtnDisableConf()
|
||||
{
|
||||
if (disableConfirm)
|
||||
{
|
||||
btnDisableConf.Text = traduci("confirmDisabled");
|
||||
btnDisableConf.CssClass = "btn btn-danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnDisableConf.Text = traduci("confirmEnabled");
|
||||
btnDisableConf.CssClass = "btn btn-success";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se siano disabilitate le conferme x avere operazioni veloci
|
||||
/// </summary>
|
||||
public bool disableConfirm
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("disableConfirm");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("disableConfirm", value);
|
||||
fixBtnDisableConf();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
Postazione.warningText = "";
|
||||
switch (tipoBCode)
|
||||
{
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo se NON ci siano NC "pending"
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc)
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
// controllo: se sono in fast mode SCARICO!
|
||||
if (disableConfirm)
|
||||
{
|
||||
scaricaUdcFrom();
|
||||
}
|
||||
// controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG...
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc)
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// se richiesto scarico rapido lo gestisco
|
||||
if (barcodeIn.ToUpper() == memLayer.ML.cdv("cmdFast").ToUpper())
|
||||
{
|
||||
disableConfirm = !disableConfirm;
|
||||
lblMessaggi.Text = traduci("enDisFastMode");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lblMessaggi.Text += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo abilitazione consumo
|
||||
/// </summary>
|
||||
private void checkConsuma()
|
||||
{
|
||||
bool consumaOk = false;
|
||||
if (!disableConfirm)
|
||||
{
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
consumaOk = true;
|
||||
}
|
||||
}
|
||||
btnConsuma.Enabled = consumaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConsuma_Click(object sender, EventArgs e)
|
||||
{
|
||||
scaricaUdcFrom();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua scaricamento UDC FROM
|
||||
/// </summary>
|
||||
private void scaricaUdcFrom()
|
||||
{
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// controllo UDC sia corretto (in giusta posizione...)
|
||||
if (MagClass.magazzino.IdxPosizioneUdc(currUdcFrom) == memLayer.ML.cdvi("IdxPosizioneFusi"))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC sbagliato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_tipoSbagliato"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_giaConsumato"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambia la modalità di scarico UDC dis/abilitando conferme
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDisableConf_Click(object sender, EventArgs e)
|
||||
{
|
||||
disableConfirm = !disableConfirm;
|
||||
}
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
disableConfirm = false;
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("UDC FROM: <b>{0}</b>", currUdcFrom);
|
||||
}
|
||||
if (string.IsNullOrEmpty(lblGitterBoxAttivo.Text))
|
||||
{
|
||||
lblGitterBoxAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkConsuma();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnConsuma.Text = traduci("btnConsumaUdc");
|
||||
// fix button gestione disabilitazione conferme
|
||||
fixBtnDisableConf();
|
||||
}
|
||||
/// <summary>
|
||||
/// ssitema btn abilitazione/disabilitazione conferma comandi
|
||||
/// </summary>
|
||||
private void fixBtnDisableConf()
|
||||
{
|
||||
if (disableConfirm)
|
||||
{
|
||||
btnDisableConf.Text = traduci("confirmDisabled");
|
||||
btnDisableConf.CssClass = "btn btn-danger";
|
||||
}
|
||||
else
|
||||
{
|
||||
btnDisableConf.Text = traduci("confirmEnabled");
|
||||
btnDisableConf.CssClass = "btn btn-success";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se siano disabilitate le conferme x avere operazioni veloci
|
||||
/// </summary>
|
||||
public bool disableConfirm
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj("disableConfirm");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("disableConfirm", value);
|
||||
fixBtnDisableConf();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
Postazione.warningText = "";
|
||||
switch (tipoBCode)
|
||||
{
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo se NON ci siano NC "pending"
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc)
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
// controllo: se sono in fast mode SCARICO!
|
||||
if (disableConfirm)
|
||||
{
|
||||
scaricaUdcFrom();
|
||||
}
|
||||
// controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG...
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc)
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// se richiesto scarico rapido lo gestisco
|
||||
if (barcodeIn.ToUpper() == memLayer.ML.cdv("cmdFast").ToUpper())
|
||||
{
|
||||
disableConfirm = !disableConfirm;
|
||||
lblMessaggi.Text = traduci("enDisFastMode");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lblMessaggi.Text += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo abilitazione consumo
|
||||
/// </summary>
|
||||
private void checkConsuma()
|
||||
{
|
||||
bool consumaOk = false;
|
||||
if (!disableConfirm)
|
||||
{
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
consumaOk = true;
|
||||
}
|
||||
}
|
||||
btnConsuma.Enabled = consumaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConsuma_Click(object sender, EventArgs e)
|
||||
{
|
||||
scaricaUdcFrom();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua scaricamento UDC FROM
|
||||
/// </summary>
|
||||
private void scaricaUdcFrom()
|
||||
{
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// controllo UDC sia corretto (in giusta posizione...)
|
||||
if (MagClass.magazzino.IdxPosizioneUdc(currUdcFrom) == memLayer.ML.cdvi("IdxPosizioneFusi"))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC sbagliato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_tipoSbagliato"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_giaConsumato"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// cambia la modalità di scarico UDC dis/abilitando conferme
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDisableConf_Click(object sender, EventArgs e)
|
||||
{
|
||||
disableConfirm = !disableConfirm;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,383 +5,383 @@ using System.Web.UI.WebControls;
|
||||
|
||||
public partial class mod_filtro : ApplicationUserControl
|
||||
{
|
||||
protected ObjectDataSource _ods;
|
||||
protected string _valore
|
||||
protected ObjectDataSource _ods;
|
||||
protected string _valore
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("valFiltro_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), value, false);
|
||||
}
|
||||
return memLayer.ML.StringSessionObj(string.Format("valFiltro_{0}", this.ID));
|
||||
}
|
||||
protected bool _changeCheckEnabled = true;
|
||||
protected bool _changeCheckVisible = true;
|
||||
protected bool _changeSelEnabled = true;
|
||||
protected string _where = "";
|
||||
protected string _showFiltered
|
||||
set
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("_showFiltered_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("_showFiltered_{0}", this.ID), value);
|
||||
traduciObj();
|
||||
}
|
||||
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), value, false);
|
||||
}
|
||||
protected string _showAll
|
||||
}
|
||||
protected bool _changeCheckEnabled = true;
|
||||
protected bool _changeCheckVisible = true;
|
||||
protected bool _changeSelEnabled = true;
|
||||
protected string _where = "";
|
||||
protected string _showFiltered
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("_showAll_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("_showAll_{0}", this.ID), value);
|
||||
traduciObj();
|
||||
}
|
||||
return memLayer.ML.StringSessionObj(string.Format("_showFiltered_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("_showFiltered_{0}", this.ID), value);
|
||||
traduciObj();
|
||||
}
|
||||
}
|
||||
protected string _showAll
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("_showAll_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("_showAll_{0}", this.ID), value);
|
||||
traduciObj();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
base.OnInit(e);
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if (_showFiltered == "") _showFiltered = "mostraSoloSelez";
|
||||
if (_showAll == "") _showAll = "mostraTutti";
|
||||
}
|
||||
if (string.IsNullOrEmpty(_showFiltered)) _showFiltered = "mostraSoloSelez";
|
||||
if (string.IsNullOrEmpty(_showAll)) _showAll = "mostraTutti";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduzione oggetti
|
||||
/// </summary>
|
||||
protected override void traduciObj()
|
||||
/// <summary>
|
||||
/// traduzione oggetti
|
||||
/// </summary>
|
||||
protected override void traduciObj()
|
||||
{
|
||||
if (_changeCheckVisible)
|
||||
{
|
||||
if (_changeCheckVisible)
|
||||
{
|
||||
if (!chkFilt.Checked)
|
||||
{
|
||||
chkFilt.Text = traduci(_showFiltered);
|
||||
}
|
||||
else
|
||||
{
|
||||
chkFilt.Text = traduci(_showAll);
|
||||
}
|
||||
}
|
||||
if (!chkFilt.Checked)
|
||||
{
|
||||
chkFilt.Text = traduci(_showFiltered);
|
||||
}
|
||||
else
|
||||
{
|
||||
chkFilt.Text = traduci(_showAll);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set messaggio di attivazione filtraggio
|
||||
/// </summary>
|
||||
public string filterChekText
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set messaggio di attivazione filtraggio
|
||||
/// </summary>
|
||||
public string filterChekText
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showFiltered;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showFiltered = value;
|
||||
}
|
||||
return _showFiltered;
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set messaggio di disattivazione filtraggio
|
||||
/// </summary>
|
||||
public string filterUnchekText
|
||||
set
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showAll;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showAll = value;
|
||||
}
|
||||
_showFiltered = value;
|
||||
}
|
||||
protected void chkFilt_CheckedChanged(object sender, EventArgs e)
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set messaggio di disattivazione filtraggio
|
||||
/// </summary>
|
||||
public string filterUnchekText
|
||||
{
|
||||
get
|
||||
{
|
||||
// cambio modalità visualizzazione del filtro...
|
||||
dlFiltr.Visible = !dlFiltr.Visible;
|
||||
raiseSelEvent();
|
||||
return _showAll;
|
||||
}
|
||||
set
|
||||
{
|
||||
_showAll = value;
|
||||
}
|
||||
}
|
||||
protected void chkFilt_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
// cambio modalità visualizzazione del filtro...
|
||||
dlFiltr.Visible = !dlFiltr.Visible;
|
||||
raiseSelEvent();
|
||||
}
|
||||
|
||||
protected void raiseSelEvent()
|
||||
protected void raiseSelEvent()
|
||||
{
|
||||
if (!dlFiltr.Visible)
|
||||
{
|
||||
if (!dlFiltr.Visible)
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), "", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_valore = dlFiltr.SelectedValue;
|
||||
}
|
||||
if (eh_selValore != null)
|
||||
{
|
||||
eh_selValore(this, new EventArgs());
|
||||
}
|
||||
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), "", false);
|
||||
}
|
||||
protected void updateChk()
|
||||
else
|
||||
{
|
||||
chkFilt.Enabled = _changeCheckEnabled;
|
||||
if (!_changeCheckEnabled)
|
||||
{
|
||||
chkFilt.Checked = true;
|
||||
dlFiltr.Visible = true;
|
||||
}
|
||||
_valore = dlFiltr.SelectedValue;
|
||||
}
|
||||
protected void updateSel()
|
||||
if (eh_selValore != null)
|
||||
{
|
||||
dlFiltr.Enabled = _changeSelEnabled;
|
||||
eh_selValore(this, new EventArgs());
|
||||
}
|
||||
protected void updateChkLbl()
|
||||
}
|
||||
protected void updateChk()
|
||||
{
|
||||
chkFilt.Enabled = _changeCheckEnabled;
|
||||
if (!_changeCheckEnabled)
|
||||
{
|
||||
chkFilt.Visible = _changeCheckVisible;
|
||||
}
|
||||
protected override void bindControlli()
|
||||
{
|
||||
updateChk();
|
||||
fixValore();
|
||||
where.Text = _where;
|
||||
traduciObj();
|
||||
}
|
||||
protected SteamWare.tipoVistaMod _modo = SteamWare.tipoVistaMod.editing;
|
||||
protected void dlFiltr_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseSelEvent();
|
||||
chkFilt.Checked = true;
|
||||
dlFiltr.Visible = true;
|
||||
}
|
||||
}
|
||||
protected void updateSel()
|
||||
{
|
||||
dlFiltr.Enabled = _changeSelEnabled;
|
||||
}
|
||||
protected void updateChkLbl()
|
||||
{
|
||||
chkFilt.Visible = _changeCheckVisible;
|
||||
}
|
||||
protected override void bindControlli()
|
||||
{
|
||||
updateChk();
|
||||
fixValore();
|
||||
where.Text = _where;
|
||||
traduciObj();
|
||||
}
|
||||
protected SteamWare.tipoVistaMod _modo = SteamWare.tipoVistaMod.editing;
|
||||
protected void dlFiltr_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseSelEvent();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// condizione where per ridurre elementi mostrati in selettore
|
||||
/// </summary>
|
||||
public string condizione
|
||||
/// <summary>
|
||||
/// condizione where per ridurre elementi mostrati in selettore
|
||||
/// </summary>
|
||||
public string condizione
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _where;
|
||||
}
|
||||
set
|
||||
{
|
||||
_where = value;
|
||||
}
|
||||
return _where;
|
||||
}
|
||||
set
|
||||
{
|
||||
_where = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fornisce il valore scelto o "*" se nulla selezionato
|
||||
/// </summary>
|
||||
public string valore
|
||||
/// <summary>
|
||||
/// fornisce il valore scelto o "*" se nulla selezionato
|
||||
/// </summary>
|
||||
public string valore
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "*";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
answ = dlFiltr.SelectedValue;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
_valore = value;
|
||||
fixValore();
|
||||
}
|
||||
string answ = "*";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
answ = dlFiltr.SelectedValue;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
_valore = value;
|
||||
fixValore();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// primo valore di una chiave multicampo
|
||||
/// </summary>
|
||||
public string val_1
|
||||
/// <summary>
|
||||
/// primo valore di una chiave multicampo
|
||||
/// </summary>
|
||||
public string val_1
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
string answ = "";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
try
|
||||
{
|
||||
string answ = "";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] _dataKey = dlFiltr.SelectedValue.Split('#');
|
||||
answ = _dataKey[0];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "*";
|
||||
}
|
||||
return answ;
|
||||
string[] _dataKey = dlFiltr.SelectedValue.Split('#');
|
||||
answ = _dataKey[0];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "*";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// secondo valore di una chiave multicampo
|
||||
/// </summary>
|
||||
public string val_2
|
||||
}
|
||||
/// <summary>
|
||||
/// secondo valore di una chiave multicampo
|
||||
/// </summary>
|
||||
public string val_2
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
string answ = "";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
try
|
||||
{
|
||||
string answ = "";
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] _dataKey = dlFiltr.SelectedValue.Split('#');
|
||||
answ = _dataKey[1];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "*";
|
||||
}
|
||||
return answ;
|
||||
string[] _dataKey = dlFiltr.SelectedValue.Split('#');
|
||||
answ = _dataKey[1];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = "*";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// fornisce il valore scelto o "0" se nulla selezionato o non valido
|
||||
/// </summary>
|
||||
public int valoreInt
|
||||
}
|
||||
/// <summary>
|
||||
/// fornisce il valore scelto o "0" se nulla selezionato o non valido
|
||||
/// </summary>
|
||||
public int valoreInt
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
int answ = -1;
|
||||
try
|
||||
{
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
int answ = -1;
|
||||
try
|
||||
{
|
||||
if (chkFilt.Checked)
|
||||
{
|
||||
answ = Convert.ToInt32(dlFiltr.SelectedValue);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
answ = Convert.ToInt32(dlFiltr.SelectedValue);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
protected void fixValore()
|
||||
}
|
||||
protected void fixValore()
|
||||
{
|
||||
if (_ods != null)
|
||||
{
|
||||
if (_ods != null)
|
||||
try
|
||||
{
|
||||
dlFiltr.DataSource = _ods;
|
||||
dlFiltr.DataBind();
|
||||
if (_valore != "")
|
||||
{
|
||||
try
|
||||
{
|
||||
dlFiltr.DataSource = _ods;
|
||||
dlFiltr.DataBind();
|
||||
if (_valore != "")
|
||||
{
|
||||
dlFiltr.SelectedValue = _valore;
|
||||
dlFiltr.Visible = true;
|
||||
chkFilt.Checked = true;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
dlFiltr.SelectedValue = _valore;
|
||||
dlFiltr.Visible = true;
|
||||
chkFilt.Checked = true;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public event EventHandler eh_selValore;
|
||||
public event EventHandler eh_selValore;
|
||||
|
||||
/// <summary>
|
||||
/// determina se sia possibile (de)selezionare il check di filtraggio, altrimenti sempre attivo
|
||||
/// </summary>
|
||||
public bool changeCheckEnabled
|
||||
/// <summary>
|
||||
/// determina se sia possibile (de)selezionare il check di filtraggio, altrimenti sempre attivo
|
||||
/// </summary>
|
||||
public bool changeCheckEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _changeCheckEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
_changeCheckEnabled = value;
|
||||
updateChk();
|
||||
}
|
||||
return _changeCheckEnabled;
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia possibile modificare la selezione
|
||||
/// </summary>
|
||||
public bool changeSelEnabled
|
||||
set
|
||||
{
|
||||
get
|
||||
{
|
||||
return _changeSelEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
_changeSelEnabled = value;
|
||||
updateSel();
|
||||
}
|
||||
_changeCheckEnabled = value;
|
||||
updateChk();
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia possibile visibile il check di filtraggio
|
||||
/// </summary>
|
||||
public bool changeCheckVisible
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia possibile modificare la selezione
|
||||
/// </summary>
|
||||
public bool changeSelEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _changeCheckVisible;
|
||||
}
|
||||
set
|
||||
{
|
||||
_changeCheckVisible = value;
|
||||
updateChkLbl();
|
||||
}
|
||||
return _changeSelEnabled;
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set della checkbox
|
||||
/// </summary>
|
||||
public bool isChecked
|
||||
set
|
||||
{
|
||||
get
|
||||
{
|
||||
return chkFilt.Checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
chkFilt.Checked = value;
|
||||
dlFiltr.Visible = value;
|
||||
updateChkLbl();
|
||||
}
|
||||
_changeSelEnabled = value;
|
||||
updateSel();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// determina se sia possibile visibile il check di filtraggio
|
||||
/// </summary>
|
||||
public bool changeCheckVisible
|
||||
{
|
||||
get
|
||||
{
|
||||
return _changeCheckVisible;
|
||||
}
|
||||
set
|
||||
{
|
||||
_changeCheckVisible = value;
|
||||
updateChkLbl();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set della checkbox
|
||||
/// </summary>
|
||||
public bool isChecked
|
||||
{
|
||||
get
|
||||
{
|
||||
return chkFilt.Checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
chkFilt.Checked = value;
|
||||
dlFiltr.Visible = value;
|
||||
updateChkLbl();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
|
||||
/// </summary>
|
||||
public ObjectDataSource ods
|
||||
/// <summary>
|
||||
/// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
|
||||
/// </summary>
|
||||
public ObjectDataSource ods
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ods;
|
||||
}
|
||||
set
|
||||
{
|
||||
_ods = value;
|
||||
bindControlli();
|
||||
}
|
||||
return _ods;
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta il controllo (un-checked)
|
||||
/// </summary>
|
||||
public void reset()
|
||||
set
|
||||
{
|
||||
chkFilt.Checked = false;
|
||||
dlFiltr.Visible = false;
|
||||
memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID));
|
||||
_ods = value;
|
||||
bindControlli();
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set per la larghezza della combo dropdown
|
||||
/// </summary>
|
||||
public int comboWidth
|
||||
}
|
||||
/// <summary>
|
||||
/// resetta il controllo (un-checked)
|
||||
/// </summary>
|
||||
public void reset()
|
||||
{
|
||||
chkFilt.Checked = false;
|
||||
dlFiltr.Visible = false;
|
||||
memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID));
|
||||
}
|
||||
/// <summary>
|
||||
/// get/set per la larghezza della combo dropdown
|
||||
/// </summary>
|
||||
public int comboWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(dlFiltr.Width);
|
||||
}
|
||||
set
|
||||
{
|
||||
dlFiltr.Width = value;
|
||||
}
|
||||
return Convert.ToInt32(dlFiltr.Width);
|
||||
}
|
||||
set
|
||||
{
|
||||
dlFiltr.Width = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -633,7 +633,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ namespace GMW.WebUserControls
|
||||
if (OpAuth.isAuth || !OpAuth.opAuthReq)
|
||||
{
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W3000" || Postazione.currCodLinea == "")
|
||||
if (Postazione.currCodLinea == "W3000" || string.IsNullOrEmpty(Postazione.currCodLinea))
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
|
||||
@@ -6,423 +6,423 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_lavMeccIN : GMW_data.UserControl
|
||||
public partial class mod_lavMeccIN : GMW_data.UserControl
|
||||
{
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
traduciObj();
|
||||
idxCella = Postazione.currIdxCella;
|
||||
}
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaLM_IN"))
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
traduciObj();
|
||||
idxCella = Postazione.currIdxCella;
|
||||
}
|
||||
doChecks();
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaLM_IN");
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaLM_IN", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debab mostrare un campo ricerca UDC attivo...
|
||||
/// </summary>
|
||||
private void fixRicercaUdc()
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("valoreCercatoLMI"))
|
||||
{
|
||||
testoRicerca = memLayer.ML.StringSessionObj("valoreCercatoLMI");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Finito LM IN {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Finito LM IN");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaLM_IN"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaLM_IN");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaLM_IN", value);
|
||||
}
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debab mostrare un campo ricerca UDC attivo...
|
||||
/// </summary>
|
||||
private void fixRicercaUdc()
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare) && TermClass.Ter.isAnima(barcodeIn)) // è un particolare... ed un anima...
|
||||
{
|
||||
if (memLayer.ML.isInSessionObject("valoreCercatoLMI"))
|
||||
{
|
||||
testoRicerca = memLayer.ML.StringSessionObj("valoreCercatoLMI");
|
||||
}
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
else
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
try
|
||||
{
|
||||
// cerco tra UDC
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Finito LM IN {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Finito LM IN");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string lastBarcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfLastBCode.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfLastBCode.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
Postazione.warningText = "";
|
||||
switch (tipoBCode)
|
||||
{
|
||||
get
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W2000")
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare) && TermClass.Ter.isAnima(barcodeIn)) // è un particolare... ed un anima...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra UDC
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string lastBarcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfLastBCode.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfLastBCode.Value = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
Postazione.warningText = "";
|
||||
switch (tipoBCode)
|
||||
{
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W2000")
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo se NON ci siano NC "pending"
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc)
|
||||
{
|
||||
// controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x trattati (pre lavorazioni meccaniche)
|
||||
int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione;
|
||||
if (IdxPosizione == memLayer.ML.cdvi("IdxPosizioneTrattati"))
|
||||
{
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo se UDC non sia già stato spostato in posizione... ds magazzino, posiz udc corrente, get By udc
|
||||
if (idxCellaCurr == Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti procedo...
|
||||
string codSogg = "";
|
||||
string particolare = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
decimal qta = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Qta;
|
||||
string noteTrim = "";
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
noteTrim = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Note.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
noteTrim = "";
|
||||
}
|
||||
DateTime adesso = DateTime.Now;
|
||||
// se ho cod cella sposto!
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), barcodeIn, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
// registro spostamento UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, barcodeIn, particolare, "spostaUDC", string.Format("Caricato UDC Trattati su linea {2}, qta: {0} {1} ", qta, noteTrim, Postazione.currCodLinea));
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// udc NON corretto, mostro errore...
|
||||
Postazione.messaggiText += " - Attenzione, UDC NON VALIDO (IdxPosizione)!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
|
||||
// controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG...
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc)
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
lastBarcodeIn = "-";
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastBarcodeIn == "")
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
lastBarcodeIn = "";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
idxCella = Postazione.currIdxCella;
|
||||
grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
{
|
||||
// resetto i dati QtaTot e particolare...
|
||||
testoRicerca = "";
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoLMI");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoLMI", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// controllo se NON ci siano NC "pending"
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc)
|
||||
{
|
||||
// controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x trattati (pre lavorazioni meccaniche)
|
||||
int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione;
|
||||
if (IdxPosizione == memLayer.ML.cdvi("IdxPosizioneTrattati"))
|
||||
{
|
||||
int idxCellaCurr = 0;
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
idxCellaCurr = MagClass.magazzino.taPosUdcCorr.getByUDC(barcodeIn)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo se UDC non sia già stato spostato in posizione... ds magazzino, posiz udc corrente, get By udc
|
||||
if (idxCellaCurr == Postazione.currIdxCella)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, UDC già caricato!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
// altrimenti procedo...
|
||||
string codSogg = "";
|
||||
string particolare = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
|
||||
decimal qta = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Qta;
|
||||
string noteTrim = "";
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
noteTrim = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Note.Trim();
|
||||
}
|
||||
catch
|
||||
{
|
||||
noteTrim = "";
|
||||
}
|
||||
DateTime adesso = DateTime.Now;
|
||||
// se ho cod cella sposto!
|
||||
MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), barcodeIn, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName);
|
||||
// registro spostamento UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, barcodeIn, particolare, "spostaUDC", string.Format("Caricato UDC Trattati su linea {2}, qta: {0} {1} ", qta, noteTrim, Postazione.currCodLinea));
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// udc NON corretto, mostro errore...
|
||||
Postazione.messaggiText += " - Attenzione, UDC NON VALIDO (IdxPosizione)!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
|
||||
// controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG...
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc)
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
else
|
||||
{
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += string.Format("<br />{0}", traduci("ERR-NC-001"));
|
||||
// recupero l'NC associata...
|
||||
Postazione.warningText += string.Format("<br />{0}", MagClass.magazzino.getDescrNc2Udc(barcodeIn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
lastBarcodeIn = "-";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(lastBarcodeIn))
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
lastBarcodeIn = "";
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
idxCella = Postazione.currIdxCella;
|
||||
grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
{
|
||||
// resetto i dati QtaTot e particolare...
|
||||
testoRicerca = "";
|
||||
doChecks();
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
testoRicerca = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoLMI");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercatoLMI", testoRicerca);
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// traduce gli header delle colonne
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_DataBound(object sender, EventArgs e)
|
||||
{
|
||||
if (grView.Rows.Count > 0)
|
||||
{
|
||||
LinkButton lb;
|
||||
// aggiorno gli headers
|
||||
foreach (TableCell cella in grView.HeaderRow.Cells)
|
||||
{
|
||||
try
|
||||
{
|
||||
lb = (LinkButton)cella.Controls[0];
|
||||
lb.Text = traduci(lb.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
||||
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblNumRec.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -694,7 +694,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = memLayer.ML.cdv("CodImballoFiniti");
|
||||
}
|
||||
@@ -1028,7 +1028,7 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercatoLMO");
|
||||
udcSelC = "";
|
||||
|
||||
@@ -5,310 +5,310 @@ using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_nuovaListaPrelievo : System.Web.UI.UserControl
|
||||
public partial class mod_nuovaListaPrelievo : System.Web.UI.UserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// traduco!
|
||||
lblTipo.Text = traduci("TipoLista");
|
||||
lblParticolare.Text = traduci("Particolare");
|
||||
lblEsponente.Text = traduci("Esponente");
|
||||
lblFigura.Text = traduci("Figura");
|
||||
lblQta.Text = traduci("Qta");
|
||||
lblImballo.Text = traduci("Imballo");
|
||||
lblDestinatario.Text = traduci("Destinatario");
|
||||
// all'avvio disabilito ricerca x campi "avanzati..."
|
||||
setFullControlsVisibility(false);
|
||||
btnCreaNuova.Text = traduci("CreaNuovaListaPrelievo");
|
||||
// // sistema il tipo oggetto dell'autocompletamento...
|
||||
// fixAutocomplete();
|
||||
}
|
||||
checkParticolare();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// traduco!
|
||||
lblTipo.Text = traduci("TipoLista");
|
||||
lblParticolare.Text = traduci("Particolare");
|
||||
lblEsponente.Text = traduci("Esponente");
|
||||
lblFigura.Text = traduci("Figura");
|
||||
lblQta.Text = traduci("Qta");
|
||||
lblImballo.Text = traduci("Imballo");
|
||||
lblDestinatario.Text = traduci("Destinatario");
|
||||
// all'avvio disabilito ricerca x campi "avanzati..."
|
||||
setFullControlsVisibility(false);
|
||||
btnCreaNuova.Text = traduci("CreaNuovaListaPrelievo");
|
||||
// // sistema il tipo oggetto dell'autocompletamento...
|
||||
// fixAutocomplete();
|
||||
}
|
||||
checkParticolare();
|
||||
#if false
|
||||
acParticolare.eh_valSelezionato += acParticolare_eh_valSelezionato;
|
||||
acParticolare.eh_reset += acParticolare_eh_reset;
|
||||
#endif
|
||||
}
|
||||
|
||||
private void acParticolare_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
void acParticolare_eh_valSelezionato(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
// /// <summary>
|
||||
// /// imposta il corretto autocompletamento del particolare
|
||||
// /// </summary>
|
||||
// private void fixAutocomplete()
|
||||
// {
|
||||
// // quale tipo lista?
|
||||
// string tipoLista = ddlTipoLista.SelectedValue;
|
||||
// string tipoObj = "";
|
||||
// try
|
||||
// {
|
||||
// tipoObj = GMW_data.utils.obj.taSelTipoLista.getByValue(tipoLista)[0].conditio;
|
||||
// }
|
||||
// catch
|
||||
// { }
|
||||
// switch (tipoObj)
|
||||
// {
|
||||
// case "A":
|
||||
// //aceParticolare.ServiceMethod = "elencoAnime";
|
||||
|
||||
// // acParticolare.ServicePath = "../WS/DataFeed.asmx/anime";
|
||||
// break;
|
||||
// case "P":
|
||||
// //aceParticolare.ServiceMethod = "elencoParticolari";
|
||||
// // acParticolare.ServicePath = "../WS/DataFeed.asmx/particolari";
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
private void setFullControlsVisibility(bool completeVisible)
|
||||
{
|
||||
lblEsponente.Visible = completeVisible;
|
||||
ddlEsponente.Visible = completeVisible;
|
||||
lblFigura.Visible = completeVisible;
|
||||
ddlFigura.Visible = completeVisible;
|
||||
lblQta.Visible = completeVisible;
|
||||
txtQta.Visible = completeVisible;
|
||||
lblDestinatario.Visible = completeVisible;
|
||||
ddlDestin.Visible = completeVisible;
|
||||
lblImballo.Visible = completeVisible;
|
||||
ddlImballo.Visible = completeVisible;
|
||||
btnCreaNuova.Visible = completeVisible;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// verifico se il codice particolare sia conforme
|
||||
/// </summary>
|
||||
/// <param name="particolare"></param>
|
||||
/// <returns></returns>
|
||||
protected bool particolareOk(string particolare)
|
||||
{
|
||||
bool answ = false;
|
||||
answ = DataProxy.obj.taAnagParticolari.getByParticolare(particolare).Rows.Count > 0;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// completata selezione particoalre, avanzo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtParticolare_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla il particolare se sia valido
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
{
|
||||
// calcolo ed aggiorno conteggio pezzi disponibili...
|
||||
int numPezziDisp = 0;
|
||||
try
|
||||
{
|
||||
string codEsponente = ddlEsponente.SelectedValue;
|
||||
if (codEsponente == "") codEsponente = "*";
|
||||
string codFigura = ddlFigura.SelectedValue;
|
||||
if (codFigura == "") codFigura = "*";
|
||||
string CodImballo = ddlImballo.SelectedValue;
|
||||
if (CodImballo == "") CodImballo = "*";
|
||||
string codTipoLista = ddlTipoLista.SelectedValue;
|
||||
numPezziDisp = MagClass.magazzino.numUdcDaPart(memLayer.ML.cdv("CodCS"), ParticolareRichiesto, codEsponente, codFigura, CodImballo, codTipoLista);
|
||||
// sottraggo quelli
|
||||
lblTotPz.Text = string.Format("{0} UDC ", numPezziDisp);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
httpLog(string.Format("Eccezione in verifica pezzi disponibili per il particolare {0}: eccezione {1}", ParticolareRichiesto, e), tipoLog.EXCEPTION);
|
||||
}
|
||||
// controllo se cod particolare è valido...
|
||||
//if (particolareOk(txtParticolare.Text.Trim()))
|
||||
if (particolareOk(ParticolareRichiesto))
|
||||
{
|
||||
// abilito ricerca esponente figura...
|
||||
setFullControlsVisibility(true);
|
||||
// setto ddl a "*"
|
||||
ddlEsponente.SelectedValue = "*";
|
||||
ddlFigura.SelectedValue = "*";
|
||||
ddlImballo.SelectedValue = "*";
|
||||
// verifico
|
||||
if (numPezziDisp > 0)
|
||||
{
|
||||
btnCreaNuova.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnCreaNuova.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// disabilito ricerce esponenti figure
|
||||
ddlEsponente.Visible = false;
|
||||
ddlFigura.Visible = false;
|
||||
txtQta.Visible = false;
|
||||
ddlDestin.Visible = false;
|
||||
ddlImballo.Visible = false;
|
||||
btnCreaNuova.Visible = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// crea nuova lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCreaNuova_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo se qta != 0...
|
||||
decimal qta = 0;
|
||||
string destinatario = "";
|
||||
string destinatarioDescr = "";
|
||||
try
|
||||
{
|
||||
// calcolo il dato del destinatario...
|
||||
GMW_data.DS_Utility.v_selDestinatariListePrelievoRow riga = utils.obj.taDestListePre.getByValue(ddlDestin.SelectedValue)[0];
|
||||
destinatario = riga.value.Trim();
|
||||
destinatarioDescr = riga.label.Trim();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
qta = Convert.ToDecimal(txtQta.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (qta > 0 && destinatario != "")
|
||||
{
|
||||
MagClass.magazzino.creaListaPrelievo(memLayer.ML.cdv("CodCS"), ddlTipoLista.SelectedValue, ParticolareRichiesto, ddlEsponente.SelectedValue, ddlFigura.SelectedValue, qta, ddlImballo.SelectedValue, destinatario, destinatarioDescr);
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_nuovoValore;
|
||||
/// <summary>
|
||||
/// valore del aprticolare della lsita prelievo get/set
|
||||
/// </summary>
|
||||
public string ParticolareRichiesto
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtParticolare.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtParticolare.Text = value;
|
||||
//acParticolare.valore = value;
|
||||
checkParticolare();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// blocca il tipo lista selezionabile che non può essere cambiata
|
||||
/// </summary>
|
||||
public bool bloccaTipoLista
|
||||
{
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
ddlTipoLista.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// (pre)imposta il valore del tipo lista di prelievo
|
||||
/// </summary>
|
||||
public string valoreTipoLista
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlTipoLista.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlTipoLista.SelectedValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlTipoLista_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fixAutocomplete();
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlEsponente_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlFigura_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlImballo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void acParticolare_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
void acParticolare_eh_valSelezionato(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
// /// <summary>
|
||||
// /// imposta il corretto autocompletamento del particolare
|
||||
// /// </summary>
|
||||
// private void fixAutocomplete()
|
||||
// {
|
||||
// // quale tipo lista?
|
||||
// string tipoLista = ddlTipoLista.SelectedValue;
|
||||
// string tipoObj = "";
|
||||
// try
|
||||
// {
|
||||
// tipoObj = GMW_data.utils.obj.taSelTipoLista.getByValue(tipoLista)[0].conditio;
|
||||
// }
|
||||
// catch
|
||||
// { }
|
||||
// switch (tipoObj)
|
||||
// {
|
||||
// case "A":
|
||||
// //aceParticolare.ServiceMethod = "elencoAnime";
|
||||
|
||||
// // acParticolare.ServicePath = "../WS/DataFeed.asmx/anime";
|
||||
// break;
|
||||
// case "P":
|
||||
// //aceParticolare.ServiceMethod = "elencoParticolari";
|
||||
// // acParticolare.ServicePath = "../WS/DataFeed.asmx/particolari";
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
private void setFullControlsVisibility(bool completeVisible)
|
||||
{
|
||||
lblEsponente.Visible = completeVisible;
|
||||
ddlEsponente.Visible = completeVisible;
|
||||
lblFigura.Visible = completeVisible;
|
||||
ddlFigura.Visible = completeVisible;
|
||||
lblQta.Visible = completeVisible;
|
||||
txtQta.Visible = completeVisible;
|
||||
lblDestinatario.Visible = completeVisible;
|
||||
ddlDestin.Visible = completeVisible;
|
||||
lblImballo.Visible = completeVisible;
|
||||
ddlImballo.Visible = completeVisible;
|
||||
btnCreaNuova.Visible = completeVisible;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// verifico se il codice particolare sia conforme
|
||||
/// </summary>
|
||||
/// <param name="particolare"></param>
|
||||
/// <returns></returns>
|
||||
protected bool particolareOk(string particolare)
|
||||
{
|
||||
bool answ = false;
|
||||
answ = DataProxy.obj.taAnagParticolari.getByParticolare(particolare).Rows.Count > 0;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// completata selezione particoalre, avanzo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtParticolare_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla il particolare se sia valido
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
{
|
||||
// calcolo ed aggiorno conteggio pezzi disponibili...
|
||||
int numPezziDisp = 0;
|
||||
try
|
||||
{
|
||||
string codEsponente = ddlEsponente.SelectedValue;
|
||||
if (string.IsNullOrEmpty(codEsponente)) codEsponente = "*";
|
||||
string codFigura = ddlFigura.SelectedValue;
|
||||
if (string.IsNullOrEmpty(codFigura)) codFigura = "*";
|
||||
string CodImballo = ddlImballo.SelectedValue;
|
||||
if (string.IsNullOrEmpty(CodImballo)) CodImballo = "*";
|
||||
string codTipoLista = ddlTipoLista.SelectedValue;
|
||||
numPezziDisp = MagClass.magazzino.numUdcDaPart(memLayer.ML.cdv("CodCS"), ParticolareRichiesto, codEsponente, codFigura, CodImballo, codTipoLista);
|
||||
// sottraggo quelli
|
||||
lblTotPz.Text = string.Format("{0} UDC ", numPezziDisp);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
httpLog(string.Format("Eccezione in verifica pezzi disponibili per il particolare {0}: eccezione {1}", ParticolareRichiesto, e), tipoLog.EXCEPTION);
|
||||
}
|
||||
// controllo se cod particolare è valido...
|
||||
//if (particolareOk(txtParticolare.Text.Trim()))
|
||||
if (particolareOk(ParticolareRichiesto))
|
||||
{
|
||||
// abilito ricerca esponente figura...
|
||||
setFullControlsVisibility(true);
|
||||
// setto ddl a "*"
|
||||
ddlEsponente.SelectedValue = "*";
|
||||
ddlFigura.SelectedValue = "*";
|
||||
ddlImballo.SelectedValue = "*";
|
||||
// verifico
|
||||
if (numPezziDisp > 0)
|
||||
{
|
||||
btnCreaNuova.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnCreaNuova.Visible = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// disabilito ricerce esponenti figure
|
||||
ddlEsponente.Visible = false;
|
||||
ddlFigura.Visible = false;
|
||||
txtQta.Visible = false;
|
||||
ddlDestin.Visible = false;
|
||||
ddlImballo.Visible = false;
|
||||
btnCreaNuova.Visible = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// crea nuova lista di prelievo
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCreaNuova_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo se qta != 0...
|
||||
decimal qta = 0;
|
||||
string destinatario = "";
|
||||
string destinatarioDescr = "";
|
||||
try
|
||||
{
|
||||
// calcolo il dato del destinatario...
|
||||
GMW_data.DS_Utility.v_selDestinatariListePrelievoRow riga = utils.obj.taDestListePre.getByValue(ddlDestin.SelectedValue)[0];
|
||||
destinatario = riga.value.Trim();
|
||||
destinatarioDescr = riga.label.Trim();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
try
|
||||
{
|
||||
qta = Convert.ToDecimal(txtQta.Text);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (qta > 0 && destinatario != "")
|
||||
{
|
||||
MagClass.magazzino.creaListaPrelievo(memLayer.ML.cdv("CodCS"), ddlTipoLista.SelectedValue, ParticolareRichiesto, ddlEsponente.SelectedValue, ddlFigura.SelectedValue, qta, ddlImballo.SelectedValue, destinatario, destinatarioDescr);
|
||||
// sollevo evento nuovo valore...
|
||||
if (eh_nuovoValore != null)
|
||||
{
|
||||
eh_nuovoValore(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// evento nuovo valore
|
||||
/// </summary>
|
||||
public event EventHandler eh_nuovoValore;
|
||||
/// <summary>
|
||||
/// valore del aprticolare della lsita prelievo get/set
|
||||
/// </summary>
|
||||
public string ParticolareRichiesto
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtParticolare.Text;
|
||||
}
|
||||
set
|
||||
{
|
||||
txtParticolare.Text = value;
|
||||
//acParticolare.valore = value;
|
||||
checkParticolare();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// blocca il tipo lista selezionabile che non può essere cambiata
|
||||
/// </summary>
|
||||
public bool bloccaTipoLista
|
||||
{
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
ddlTipoLista.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// (pre)imposta il valore del tipo lista di prelievo
|
||||
/// </summary>
|
||||
public string valoreTipoLista
|
||||
{
|
||||
get
|
||||
{
|
||||
return ddlTipoLista.SelectedValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
ddlTipoLista.SelectedValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ddlTipoLista_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fixAutocomplete();
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlEsponente_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlFigura_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
protected void ddlImballo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkParticolare();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace GMW.WebUserControls
|
||||
DataColumnCollection colonne = tabella.Columns;
|
||||
return colonne;
|
||||
}
|
||||
|
||||
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent(ucEvType.Selected);
|
||||
@@ -111,7 +111,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == "" || value == null) value = "###";
|
||||
if (string.IsNullOrEmpty(value)) value = "###";
|
||||
hfCodKIT.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,186 +1,186 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_postRX_DT_LIST.ascx.cs" Inherits="GMW.WebUserControls.mod_postRX_DT_LIST" %>
|
||||
<%if (false)
|
||||
{ %>
|
||||
{ %>
|
||||
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
|
||||
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />
|
||||
<%} %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div style="float: left; text-align: center;">
|
||||
<div class="card bg-warning small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("DtxLetti") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" Width="100%" OnDataBound="grView_DataBound" DataKeyNames="FormatoDtmx" DataSourceID="ods" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<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 ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="btnReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class="fa fa-search-plus btn-lg"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="FormatoDtmx" SortExpression="FormatoDtmx">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("FormatoDtmx") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="LettureDtx" SortExpression="DataOra_INI">
|
||||
<ItemTemplate>
|
||||
<div class="didascalia">
|
||||
<asp:Label ID="lblPM" runat="server" Text='<%# Eval("DataOra_INI", "PM: {0:dd/MM/yy HH:mm}") %>' ToolTip='<%# traduci("PrimoMarcato") %>' />
|
||||
</div>
|
||||
<div class="didascalia">
|
||||
<asp:Label ID="lblUM" runat="server" Text='<%# Eval("DataOra_END", "UM: {0:dd/MM/yy HH:mm}") %>' ToolTip='<%# traduci("UltimoMarcato") %>' Visible='<%# (Eval("DTX_END").ToString() != "") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<span style="padding: 0px 4px;">
|
||||
<b>
|
||||
<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:#}") %>' /></b>
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick="return confirm('Confermi eliminazione?')" CssClass="text-danger" Visible='<%# (Eval("DTX_END").ToString() == "") %>'><i class="fa fa-trash btn-lg"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByLinea" DeleteMethod="deleteQuery" TypeName="GMW_data.DS_DataMatrixTableAdapters.Linea2Dtx_IETableAdapter" OnDeleted="ods_Deleted">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="CodLinea" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
<DeleteParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="Original_CodLinea" PropertyName="Value" Type="String" />
|
||||
<asp:Parameter Name="Original_FormatoDtmx" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfCodLinea" />
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divDetDtx" class="card bg-info small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("ParticolariCaricati") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:GridView runat="server" ID="grViewDet" AutoGenerateColumns="False" DataSourceID="odsDet">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="UDC" HeaderText="UDC" ReadOnly="True" SortExpression="UDC" />
|
||||
<asp:BoundField DataField="Particolare" HeaderText="Particolare" ReadOnly="True" SortExpression="Particolare" />
|
||||
<asp:BoundField DataField="Qta" HeaderText="Qta" ReadOnly="True" SortExpression="Qta" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsDet" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_DataMatrixTableAdapters.L2D_dettPartTableAdapter" OnDeleted="ods_Deleted">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="CodLinea" PropertyName="Value" Type="String" />
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="P" Name="FormatoDtmx" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div style="float: left; text-align: center;">
|
||||
<div class="card bg-warning small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("DtxLetti") %></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="3em" Text="" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblDescrAttivo" Font-Size="2em" Text="" ToolTip="particolare" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblDisegno" Font-Size="1.8em" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="divModoInput" runat="server" style="width: 320px; margin: auto; text-align: center;">
|
||||
<asp:RadioButtonList ID="rblInputMode" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rblInputMode_SelectedIndexChanged" class="btn-group" RepeatDirection="Horizontal" RepeatLayout="Flow">
|
||||
<asp:ListItem Value="BARCODE" Text="MATRIX" Selected="True" class="btn btn-default btn-lg"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div id="divElenco" runat="server">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblElencoPart" AssociatedControlID="ddlPart"><%: traduci("lblElencoPart") %></asp:Label>
|
||||
</div>
|
||||
<span style="font-size: 18pt;">
|
||||
<asp:DropDownList ID="ddlPart" runat="server" DataSourceID="odsParticolari" DataTextField="label" DataValueField="value"></asp:DropDownList>
|
||||
</span>
|
||||
<asp:ObjectDataSource ID="odsParticolari" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio" TypeName="GMW_data.DS_UtilityTableAdapters.v_selParticolariTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="P" Name="conditio" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:LinkButton runat="server" ID="lbtAddPart" CssClass="btn btn-primary" OnClick="lbtAddPart_Click"><i aria-hidden='true' class='fa fa-plus'></i></asp:LinkButton>
|
||||
</div>
|
||||
<div id="divBarcode" runat="server">
|
||||
<div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" AssociatedControlID="txtBarcode"><%: traduci("lblDataMatrix") %></asp:Label>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="divNote" runat="server">
|
||||
<div>
|
||||
<%: traduci("Note") %>
|
||||
</div>
|
||||
<div>
|
||||
<asp:TextBox runat="server" ID="txtNote" Height="4em" Width="100%" Font-Size="2em" TextMode="MultiLine" />
|
||||
</div>
|
||||
<div style="width: 400px; margin: auto;">
|
||||
<asp:LinkButton runat="server" ID="lbtGeneraAl" Width="100%" CssClass="btn btn-warning btn-lg" OnClick="lbtGeneraAl_Click"><i aria-hidden='true' class='fa fa-check fa-2x'></i> <%: traduci("lbtCreaUdcAl") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtStampaAL" Width="100%" CssClass="btn btn-success btn-lg" OnClick="lbtStampaAL_Click"><i aria-hidden='true' class='fa fa-print fa-2x'></i> <%: traduci("lbtStampaAL") %></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div style="float: right; text-align: center;">
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("lblQtaPart") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<%--disabilitati in maschera dtx--%>
|
||||
<asp:TextBox runat="server" ID="txtQta" Width="100%" Font-Size="28pt" Style="text-align: center" Enabled="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("DataFusione") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:Label runat="server" ID="lblDTFus" />
|
||||
<br />
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:GridView ID="grView" runat="server" AllowSorting="True" AutoGenerateColumns="False" Width="100%" OnDataBound="grView_DataBound" DataKeyNames="FormatoDtmx" DataSourceID="ods" OnSelectedIndexChanged="grView_SelectedIndexChanged">
|
||||
<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 ShowHeader="False">
|
||||
<HeaderTemplate>
|
||||
<asp:LinkButton ID="btnReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-default btn-sm"><i class="fa fa-refresh"></i> <%: traduci("Reset") %></asp:LinkButton>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbSelect" runat="server" CausesValidation="False" CommandName="Select" CssClass="text-success"><i class="fa fa-search-plus btn-lg"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="FormatoDtmx" SortExpression="FormatoDtmx">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblParticolare" runat="server" Text='<%# Eval("FormatoDtmx") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="LettureDtx" SortExpression="DataOra_INI">
|
||||
<ItemTemplate>
|
||||
<div class="didascalia">
|
||||
<asp:Label ID="lblPM" runat="server" Text='<%# Eval("DataOra_INI", "PM: {0:dd/MM/yy HH:mm}") %>' ToolTip='<%# traduci("PrimoMarcato") %>' />
|
||||
</div>
|
||||
<div class="didascalia">
|
||||
<asp:Label ID="lblUM" runat="server" Text='<%# Eval("DataOra_END", "UM: {0:dd/MM/yy HH:mm}") %>' ToolTip='<%# traduci("UltimoMarcato") %>' Visible='<%# (Eval("DTX_END").ToString() != "") %>' />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Qta" SortExpression="Qta" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<span style="padding: 0px 4px;">
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblLinFus" /></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("lblCesta") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:TextBox runat="server" ID="txtCesta" Width="100%" Font-Size="28pt" Style="text-align: center" palceholder="num cesta" AutoPostBack="True" OnTextChanged="txtCesta_TextChanged" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label ID="lblQta" runat="server" Text='<%# Eval("Qta","{0:#}") %>' /></b>
|
||||
</span>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lbtDelete" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick="return confirm('Confermi eliminazione?')" CssClass="text-danger" Visible='<%# string.IsNullOrEmpty((Eval("DTX_END").ToString() )) %>'><i class="fa fa-trash btn-lg"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByLinea" DeleteMethod="deleteQuery" TypeName="GMW_data.DS_DataMatrixTableAdapters.Linea2Dtx_IETableAdapter" OnDeleted="ods_Deleted">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="CodLinea" PropertyName="Value" Type="String" />
|
||||
</SelectParameters>
|
||||
<DeleteParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="Original_CodLinea" PropertyName="Value" Type="String" />
|
||||
<asp:Parameter Name="Original_FormatoDtmx" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:HiddenField runat="server" ID="hfCodLinea" />
|
||||
</div>
|
||||
</div>
|
||||
<div runat="server" id="divDetDtx" class="card bg-info small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("ParticolariCaricati") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:GridView runat="server" ID="grViewDet" AutoGenerateColumns="False" DataSourceID="odsDet">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="UDC" HeaderText="UDC" ReadOnly="True" SortExpression="UDC" />
|
||||
<asp:BoundField DataField="Particolare" HeaderText="Particolare" ReadOnly="True" SortExpression="Particolare" />
|
||||
<asp:BoundField DataField="Qta" HeaderText="Qta" ReadOnly="True" SortExpression="Qta" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="odsDet" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_DataMatrixTableAdapters.L2D_dettPartTableAdapter" OnDeleted="ods_Deleted">
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="hfCodLinea" DefaultValue="W" Name="CodLinea" PropertyName="Value" Type="String" />
|
||||
<asp:ControlParameter ControlID="grView" DefaultValue="P" Name="FormatoDtmx" PropertyName="SelectedValue" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblParticolareAttivo" Font-Size="3em" Text="" />
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblDescrAttivo" Font-Size="2em" Text="" ToolTip="particolare" />
|
||||
<br />
|
||||
<asp:Label runat="server" ID="lblDisegno" Font-Size="1.8em" Text="" ForeColor="#FFFFFF" Font-Bold="true" ToolTip="disegno" />
|
||||
</div>
|
||||
<div>
|
||||
<div id="divModoInput" runat="server" style="width: 320px; margin: auto; text-align: center;">
|
||||
<asp:RadioButtonList ID="rblInputMode" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rblInputMode_SelectedIndexChanged" class="btn-group" RepeatDirection="Horizontal" RepeatLayout="Flow">
|
||||
<asp:ListItem Value="BARCODE" Text="MATRIX" Selected="True" class="btn btn-default btn-lg"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div id="divElenco" runat="server">
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblElencoPart" AssociatedControlID="ddlPart"><%: traduci("lblElencoPart") %></asp:Label>
|
||||
</div>
|
||||
<span style="font-size: 18pt;">
|
||||
<asp:DropDownList ID="ddlPart" runat="server" DataSourceID="odsParticolari" DataTextField="label" DataValueField="value"></asp:DropDownList>
|
||||
</span>
|
||||
<asp:ObjectDataSource ID="odsParticolari" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio" TypeName="GMW_data.DS_UtilityTableAdapters.v_selParticolariTableAdapter">
|
||||
<SelectParameters>
|
||||
<asp:Parameter DefaultValue="P" Name="conditio" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
<asp:LinkButton runat="server" ID="lbtAddPart" CssClass="btn btn-primary" OnClick="lbtAddPart_Click"><i aria-hidden='true' class='fa fa-plus'></i></asp:LinkButton>
|
||||
</div>
|
||||
<div id="divBarcode" runat="server">
|
||||
<div>
|
||||
<div>
|
||||
<asp:Label runat="server" ID="lblBarcode" AssociatedControlID="txtBarcode"><%: traduci("lblDataMatrix") %></asp:Label>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtBarcode" Height="1.2em" Width="100%" Font-Size="3em" AutoPostBack="True" Style="text-align: center" TabIndex="1" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="divNote" runat="server">
|
||||
<div>
|
||||
<%: traduci("Note") %>
|
||||
</div>
|
||||
<div>
|
||||
<asp:TextBox runat="server" ID="txtNote" Height="4em" Width="100%" Font-Size="2em" TextMode="MultiLine" />
|
||||
</div>
|
||||
<div style="width: 400px; margin: auto;">
|
||||
<asp:LinkButton runat="server" ID="lbtGeneraAl" Width="100%" CssClass="btn btn-warning btn-lg" OnClick="lbtGeneraAl_Click"><i aria-hidden='true' class='fa fa-check fa-2x'></i> <%: traduci("lbtCreaUdcAl") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtStampaAL" Width="100%" CssClass="btn btn-success btn-lg" OnClick="lbtStampaAL_Click"><i aria-hidden='true' class='fa fa-print fa-2x'></i> <%: traduci("lbtStampaAL") %></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div style="float: right; text-align: center;">
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("lblQtaPart") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<%--disabilitati in maschera dtx--%>
|
||||
<asp:TextBox runat="server" ID="txtQta" Width="100%" Font-Size="28pt" Style="text-align: center" Enabled="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("DataFusione") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:Label runat="server" ID="lblDTFus" />
|
||||
<br />
|
||||
<b>
|
||||
<asp:Label runat="server" ID="lblLinFus" /></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card bg-default small">
|
||||
<div class="card-header">
|
||||
<b><%: traduci("lblCesta") %></b>
|
||||
</div>
|
||||
<div class="card-body bg-light text-dark">
|
||||
<asp:TextBox runat="server" ID="txtCesta" Width="100%" Font-Size="28pt" Style="text-align: center" palceholder="num cesta" AutoPostBack="True" OnTextChanged="txtCesta_TextChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace GMW.WebUserControls
|
||||
catch
|
||||
{ }
|
||||
//2016.01.25 se vuoto metto ND!!!
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = "ND";
|
||||
}
|
||||
@@ -401,7 +401,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
// vers 2.9
|
||||
// controllo formato datamatrix sia impostato sulla linea (altrimenti errore linea "non battezzata")
|
||||
if (FormatoDtmxLinea == "")
|
||||
if (string.IsNullOrEmpty(FormatoDtmxLinea))
|
||||
{
|
||||
// errore poiché non è stato non specificato tipo Dtmx assegnato alla linea!
|
||||
Postazione.messaggiText = barcodeIn;
|
||||
@@ -435,7 +435,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
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);
|
||||
logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Formato Linea:{2}{0}Eccezione:{0}{2}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION);
|
||||
currParticolare = "";
|
||||
}
|
||||
if (currParticolare != "")
|
||||
|
||||
@@ -664,7 +664,7 @@ namespace GMW.WebUserControls
|
||||
else // PROCEDO!!!
|
||||
{
|
||||
// controllo formato datamatrix sia impostato sulla linea (altrimenti errore linea "non battezzata")
|
||||
if (FormatoDtmxLinea == "")
|
||||
if (string.IsNullOrEmpty(FormatoDtmxLinea))
|
||||
{
|
||||
// errore poiché non è stato non specificato tipo Dtmx assegnato alla linea!
|
||||
Postazione.messaggiText = barcodeIn;
|
||||
@@ -747,7 +747,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
newUdcChild = "";
|
||||
}
|
||||
if (newUdcChild == "")
|
||||
if (string.IsNullOrEmpty(newUdcChild))
|
||||
{
|
||||
// controllo NON ci siano troppi UDC in posizione... da capienza ed assegnati
|
||||
DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga;
|
||||
|
||||
@@ -5,182 +5,182 @@ using System.Web.UI;
|
||||
public partial class mod_ricercaGenerica : ApplicationUserControl
|
||||
{
|
||||
|
||||
#region gestione eventi
|
||||
#region gestione eventi
|
||||
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
# region area protected
|
||||
#region area protected
|
||||
|
||||
#region area ricerche dettaglio specifiche
|
||||
#region area ricerche dettaglio specifiche
|
||||
|
||||
protected bool _cercaMatricole = false;
|
||||
protected bool _cercaUsername = false;
|
||||
//protected bool _cercaManufacturer = false;
|
||||
//protected bool _cercaCategorie = false;
|
||||
protected bool _cercaModelli = false;
|
||||
protected bool _cercaMag = false;
|
||||
protected bool _cercaMatricole = false;
|
||||
protected bool _cercaUsername = false;
|
||||
//protected bool _cercaManufacturer = false;
|
||||
//protected bool _cercaCategorie = false;
|
||||
protected bool _cercaModelli = false;
|
||||
protected bool _cercaMag = false;
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
protected override void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
updateText();
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtCerca.Text = "";
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
{
|
||||
salvaCerca();
|
||||
}
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
{
|
||||
get
|
||||
{
|
||||
base.Page_Load(sender, e);
|
||||
updateText();
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
/// <summary>
|
||||
/// cambiato valore in ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCerca_TextChanged(object sender, EventArgs e)
|
||||
set
|
||||
{
|
||||
salvaCerca();
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettuato reset
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lnkReset_Click(object sender, EventArgs e)
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (string.IsNullOrEmpty(testoRicerca))
|
||||
{
|
||||
txtCerca.Text = "";
|
||||
salvaCerca();
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
|
||||
SteamWare.memLayer.ML.emptySessionVal("listaMatricoleSearch");
|
||||
}
|
||||
/// <summary>
|
||||
/// pressione del button di ricerca
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCerca_Click(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
salvaCerca();
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
|
||||
// verifico ricerche accessorie
|
||||
if (_cercaMatricole)
|
||||
{
|
||||
salvaCercaMatricole();
|
||||
}
|
||||
if (_cercaUsername)
|
||||
{
|
||||
salvaCercaUsername();
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// testo ricerca trimmato da spazi
|
||||
/// </summary>
|
||||
protected string testoRicerca
|
||||
}
|
||||
/// <summary>
|
||||
/// ricerca utenti e salva lista matricole x SQL IN
|
||||
/// </summary>
|
||||
protected void salvaCercaMatricole()
|
||||
{
|
||||
// salvo anche l'elenco delle matricole compatibili...
|
||||
DataLayer_AnagGen.UTENTEDataTable righeUtenti = DataWrap.DW.taUtente.getByRicercaNomeCognome(testoRicerca);
|
||||
string listaMatricoleSearch = "";
|
||||
foreach (DataLayer_AnagGen.UTENTERow riga in righeUtenti)
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtCerca.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtCerca.Text = value;
|
||||
}
|
||||
listaMatricoleSearch += string.Format("'{0}', ", riga.MATRICOLA);
|
||||
}
|
||||
if (listaMatricoleSearch.Length > 0)
|
||||
{
|
||||
listaMatricoleSearch = listaMatricoleSearch.Remove(listaMatricoleSearch.Length - 2);
|
||||
}
|
||||
SteamWare.memLayer.ML.setSessionVal("listaMatricoleSearch", listaMatricoleSearch);
|
||||
}
|
||||
/// <summary>
|
||||
/// ricerca utenti e salva lista username x SQL IN
|
||||
/// </summary>
|
||||
protected void salvaCercaUsername()
|
||||
{
|
||||
// salvo anche l'elenco delle matricole compatibili...
|
||||
DataLayer_AnagGen.UTENTEDataTable righeUtenti = DataWrap.DW.taUtente.getByRicercaNomeCognome(testoRicerca);
|
||||
string listaUsernameSearch = "";
|
||||
foreach (DataLayer_AnagGen.UTENTERow riga in righeUtenti)
|
||||
{
|
||||
listaUsernameSearch += string.Format("'{0}', ", riga.USER_NAME);
|
||||
}
|
||||
if (listaUsernameSearch.Length > 0)
|
||||
{
|
||||
listaUsernameSearch = listaUsernameSearch.Remove(listaUsernameSearch.Length - 2);
|
||||
}
|
||||
SteamWare.memLayer.ML.setSessionVal("listaUsernameSearch", listaUsernameSearch);
|
||||
}
|
||||
|
||||
protected void salvaCerca()
|
||||
{
|
||||
if (testoRicerca == "")
|
||||
{
|
||||
SteamWare.memLayer.ML.emptySessionVal("valoreCercato");
|
||||
SteamWare.memLayer.ML.emptySessionVal("listaMatricoleSearch");
|
||||
}
|
||||
else
|
||||
{
|
||||
SteamWare.memLayer.ML.setSessionVal("valoreCercato", testoRicerca);
|
||||
// verifico ricerche accessorie
|
||||
if (_cercaMatricole)
|
||||
{
|
||||
salvaCercaMatricole();
|
||||
}
|
||||
if (_cercaUsername)
|
||||
{
|
||||
salvaCercaUsername();
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_nuovaRicerca != null)
|
||||
{
|
||||
eh_nuovaRicerca(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ricerca utenti e salva lista matricole x SQL IN
|
||||
/// </summary>
|
||||
protected void salvaCercaMatricole()
|
||||
{
|
||||
// salvo anche l'elenco delle matricole compatibili...
|
||||
DataLayer_AnagGen.UTENTEDataTable righeUtenti = DataWrap.DW.taUtente.getByRicercaNomeCognome(testoRicerca);
|
||||
string listaMatricoleSearch = "";
|
||||
foreach (DataLayer_AnagGen.UTENTERow riga in righeUtenti)
|
||||
{
|
||||
listaMatricoleSearch += string.Format("'{0}', ", riga.MATRICOLA);
|
||||
}
|
||||
if (listaMatricoleSearch.Length > 0)
|
||||
{
|
||||
listaMatricoleSearch = listaMatricoleSearch.Remove(listaMatricoleSearch.Length - 2);
|
||||
}
|
||||
SteamWare.memLayer.ML.setSessionVal("listaMatricoleSearch", listaMatricoleSearch);
|
||||
}
|
||||
/// <summary>
|
||||
/// ricerca utenti e salva lista username x SQL IN
|
||||
/// </summary>
|
||||
protected void salvaCercaUsername()
|
||||
{
|
||||
// salvo anche l'elenco delle matricole compatibili...
|
||||
DataLayer_AnagGen.UTENTEDataTable righeUtenti = DataWrap.DW.taUtente.getByRicercaNomeCognome(testoRicerca);
|
||||
string listaUsernameSearch = "";
|
||||
foreach (DataLayer_AnagGen.UTENTERow riga in righeUtenti)
|
||||
{
|
||||
listaUsernameSearch += string.Format("'{0}', ", riga.USER_NAME);
|
||||
}
|
||||
if (listaUsernameSearch.Length > 0)
|
||||
{
|
||||
listaUsernameSearch = listaUsernameSearch.Remove(listaUsernameSearch.Length - 2);
|
||||
}
|
||||
SteamWare.memLayer.ML.setSessionVal("listaUsernameSearch", listaUsernameSearch);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
#region area public
|
||||
|
||||
#region area public
|
||||
/// <summary>
|
||||
/// aggiorna il testo cercato
|
||||
/// </summary>
|
||||
public void updateText()
|
||||
{
|
||||
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercato");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna il testo cercato
|
||||
/// </summary>
|
||||
public void updateText()
|
||||
/// <summary>
|
||||
/// indica se generare da stringa search un elenco delle matricole corrispondenti
|
||||
/// </summary>
|
||||
public bool cercaMatricole
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SteamWare.memLayer.ML.StringSessionObj("valoreCercato") != "" && !Page.IsPostBack)
|
||||
{
|
||||
testoRicerca = SteamWare.memLayer.ML.StringSessionObj("valoreCercato");
|
||||
}
|
||||
return _cercaMatricole;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// indica se generare da stringa search un elenco delle matricole corrispondenti
|
||||
/// </summary>
|
||||
public bool cercaMatricole
|
||||
set
|
||||
{
|
||||
get
|
||||
{
|
||||
return _cercaMatricole;
|
||||
}
|
||||
set
|
||||
{
|
||||
_cercaMatricole = value;
|
||||
}
|
||||
_cercaMatricole = value;
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se generare da stringa search un elenco di username corrispondenti
|
||||
/// </summary>
|
||||
public bool cercaUsername
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se generare da stringa search un elenco di username corrispondenti
|
||||
/// </summary>
|
||||
public bool cercaUsername
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
return _cercaUsername;
|
||||
}
|
||||
set
|
||||
{
|
||||
_cercaUsername = value;
|
||||
}
|
||||
return _cercaUsername;
|
||||
}
|
||||
set
|
||||
{
|
||||
_cercaUsername = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace GMW.WebUserControls
|
||||
// controllo se ho QueryString modalità operativa...
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if (memLayer.ML.QSS("RNC_Mode") == "")
|
||||
if (string.IsNullOrEmpty(memLayer.ML.QSS("RNC_Mode")))
|
||||
{
|
||||
// reinvio impostando modalità Delibera Semplice...
|
||||
Response.Redirect(string.Format("{0}?RNC_Mode=sim", user_std.pagCorrente), false);
|
||||
|
||||
@@ -5,335 +5,335 @@ using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_sanpos_associaz_F10_F18 : System.Web.UI.UserControl
|
||||
public partial class mod_sanpos_associaz_F10_F18 : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
calcolaPostazione();
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("{1}: <b>{0}</b>", currUdcFrom, traduci("UdcPartenza"));
|
||||
}
|
||||
if (lblGitterBoxAttivo.Text != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += "<br />";
|
||||
}
|
||||
if (currUdcTo != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("{1}: <b>{0}</b>", currUdcTo, traduci("UdcArrivo"));
|
||||
}
|
||||
if (lblGitterBoxAttivo.Text == "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkStampa();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnAssocia.Text = traduci("btnAssocia");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola postazione corrente (ip, name, printer)
|
||||
/// </summary>
|
||||
private void calcolaPostazione()
|
||||
{
|
||||
postazione_IP = Request.UserHostName;
|
||||
postazione_name = dnsUtils.DetermineCompName(postazione_IP);
|
||||
// cerco stampante x postazione
|
||||
postazione_printer = "n.d.";
|
||||
try
|
||||
{
|
||||
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(postazione_name);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
postazione_printer = tabPost[0].stampante;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// tabPost = DataProxy.obj.taElPost.getByCod("default");
|
||||
// postazione_printer = tabPost[0].stampante;
|
||||
//}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC TO (F18) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcTo
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcTo");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcTo", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo il tipo imballo dell'UDC per decidere se sia F10 o F18...
|
||||
if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidi"))
|
||||
{
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
}
|
||||
else if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidiDaSpedire"))
|
||||
{
|
||||
// salvo UDC to
|
||||
currUdcTo = barcodeIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += " - codice UDC non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// - almeno 1 trattamento
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkStampa()
|
||||
{
|
||||
bool associaOk = false;
|
||||
if (currUdcFrom != "" && currUdcTo != "")
|
||||
{
|
||||
associaOk = true;
|
||||
}
|
||||
btnAssocia.Enabled = associaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAssocia_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (currUdcFrom != "" && currUdcTo != "")
|
||||
{
|
||||
// associo i 2 cartellini
|
||||
MagClass.magazzino.associaUdcParent(currUdcTo, currUdcFrom);
|
||||
// indico UDC associati!
|
||||
Postazione.messaggiText = string.Format("{0} {1} -> {2}", traduci("effettuataAssociazione"), currUdcFrom, currUdcTo);
|
||||
currUdcFrom = "";
|
||||
currUdcTo = "";
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
calcolaPostazione();
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("{1}: <b>{0}</b>", currUdcFrom, traduci("UdcPartenza"));
|
||||
}
|
||||
if (lblGitterBoxAttivo.Text != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += "<br />";
|
||||
}
|
||||
if (currUdcTo != "")
|
||||
{
|
||||
lblGitterBoxAttivo.Text += string.Format("{1}: <b>{0}</b>", currUdcTo, traduci("UdcArrivo"));
|
||||
}
|
||||
if (string.IsNullOrEmpty(lblGitterBoxAttivo.Text))
|
||||
{
|
||||
lblGitterBoxAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkStampa();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnAssocia.Text = traduci("btnAssocia");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola postazione corrente (ip, name, printer)
|
||||
/// </summary>
|
||||
private void calcolaPostazione()
|
||||
{
|
||||
postazione_IP = Request.UserHostName;
|
||||
postazione_name = dnsUtils.DetermineCompName(postazione_IP);
|
||||
// cerco stampante x postazione
|
||||
postazione_printer = "n.d.";
|
||||
try
|
||||
{
|
||||
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(postazione_name);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
postazione_printer = tabPost[0].stampante;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// tabPost = DataProxy.obj.taElPost.getByCod("default");
|
||||
// postazione_printer = tabPost[0].stampante;
|
||||
//}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC TO (F18) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcTo
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcTo");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcTo", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo il tipo imballo dell'UDC per decidere se sia F10 o F18...
|
||||
if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidi"))
|
||||
{
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
}
|
||||
else if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidiDaSpedire"))
|
||||
{
|
||||
// salvo UDC to
|
||||
currUdcTo = barcodeIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += " - codice UDC non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// - almeno 1 trattamento
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkStampa()
|
||||
{
|
||||
bool associaOk = false;
|
||||
if (currUdcFrom != "" && currUdcTo != "")
|
||||
{
|
||||
associaOk = true;
|
||||
}
|
||||
btnAssocia.Enabled = associaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAssocia_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (currUdcFrom != "" && currUdcTo != "")
|
||||
{
|
||||
// associo i 2 cartellini
|
||||
MagClass.magazzino.associaUdcParent(currUdcTo, currUdcFrom);
|
||||
// indico UDC associati!
|
||||
Postazione.messaggiText = string.Format("{0} {1} -> {2}", traduci("effettuataAssociazione"), currUdcFrom, currUdcTo);
|
||||
currUdcFrom = "";
|
||||
currUdcTo = "";
|
||||
lblGitterBoxAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,340 +5,340 @@ using System.Web.UI;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_sanpos_consumoF10 : System.Web.UI.UserControl
|
||||
public partial class mod_sanpos_consumoF10 : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblParticolareAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblParticolareAttivo.Text += string.Format("UDC FROM: <b>{0}</b>", currUdcFrom);
|
||||
}
|
||||
if (lblParticolareAttivo.Text == "")
|
||||
{
|
||||
lblParticolareAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, postazione_printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Fusi {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, postazione_name, postazione_IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Fusi");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkConsuma();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnConsuma.Text = traduci("btnConsumaUdcF10");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo il tipo imballo dell'UDC per decidere se sia F10 o F18...
|
||||
if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidi"))
|
||||
{
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += " - codice UDC non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// - almeno 1 trattamento
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkConsuma()
|
||||
{
|
||||
bool associaOk = false;
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
associaOk = true;
|
||||
}
|
||||
btnConsuma.Enabled = associaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConsuma_Click(object sender, EventArgs e)
|
||||
{
|
||||
// effettuo controlli che cod_soggetto e cod particolare siano disponibili...
|
||||
string codSogg = "";
|
||||
string particolare = "";
|
||||
DateTime adesso = DateTime.Now;
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
particolare = MagClass.magazzino.getParticolareByUDC(currUdcFrom);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (codSogg != "" && particolare != "")
|
||||
{
|
||||
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// registro consumo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, currUdcFrom, particolare, "consumaUDC", "Consumato UDC F10");
|
||||
}
|
||||
// indico UDC consumato!
|
||||
Postazione.messaggiText = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
lblParticolareAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduciObj();
|
||||
}
|
||||
doChecks();
|
||||
lblParticolareAttivo.Text = "";
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
lblParticolareAttivo.Text += string.Format("UDC FROM: <b>{0}</b>", currUdcFrom);
|
||||
}
|
||||
if (string.IsNullOrEmpty(lblParticolareAttivo.Text))
|
||||
{
|
||||
lblParticolareAttivo.Text = "...";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, postazione_printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Fusi {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, postazione_name, postazione_IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Fusi");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkConsuma();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
{
|
||||
// buttons
|
||||
btnConsuma.Text = traduci("btnConsumaUdcF10");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica UDC FROM (F10) selezionato
|
||||
/// </summary>
|
||||
protected string currUdcFrom
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("currUdcFrom");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("currUdcFrom", value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.AppConf["prefComandi"];
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
// controllo se sia un particolare Tipo P
|
||||
else if (TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare && TermClass.Ter.isParticolare(barcodeIn)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo il tipo imballo dell'UDC per decidere se sia F10 o F18...
|
||||
if (tipoImballo == memLayer.ML.cdv("CodImballoLiquidi"))
|
||||
{
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText += " - codice UDC non valido / non trovato.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
/// - particolare ok
|
||||
/// - qta > 0
|
||||
/// - almeno 1 trattamento
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkConsuma()
|
||||
{
|
||||
bool associaOk = false;
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
associaOk = true;
|
||||
}
|
||||
btnConsuma.Enabled = associaOk;
|
||||
}
|
||||
/// <summary>
|
||||
/// genera i barcode di
|
||||
/// - trattamenti
|
||||
/// - nuovo x pezzi liquidi
|
||||
/// e lancia la relativa stampa
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnConsuma_Click(object sender, EventArgs e)
|
||||
{
|
||||
// effettuo controlli che cod_soggetto e cod particolare siano disponibili...
|
||||
string codSogg = "";
|
||||
string particolare = "";
|
||||
DateTime adesso = DateTime.Now;
|
||||
try
|
||||
{
|
||||
codSogg = MagClass.magazzino.CodSoggCurrUser;
|
||||
particolare = MagClass.magazzino.getParticolareByUDC(currUdcFrom);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (codSogg != "" && particolare != "")
|
||||
{
|
||||
|
||||
if (currUdcFrom != "")
|
||||
{
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// registro consumo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, currUdcFrom, particolare, "consumaUDC", "Consumato UDC F10");
|
||||
}
|
||||
// indico UDC consumato!
|
||||
Postazione.messaggiText = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
lblParticolareAttivo.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -538,7 +538,7 @@ namespace GMW.WebUserControls
|
||||
codImballo = memLayer.ML.cdv("CodImballoLiquidi");
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = memLayer.ML.cdv("CodImballoLiquidi");
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (answ == "") answ = "IO";
|
||||
if (string.IsNullOrEmpty(answ)) answ = "IO";
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
@@ -403,7 +403,7 @@ namespace GMW.WebUserControls
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagLineeRow riga = MagClass.magazzino.taAL.getByKey(codLinea)[0];
|
||||
if (riga.codPostazione == "" || riga.codPostazione == Postazione.name)
|
||||
if (string.IsNullOrEmpty(riga.codPostazione) || riga.codPostazione == Postazione.name)
|
||||
{
|
||||
lineaLibera = true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using GMW_data;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
@@ -44,9 +45,6 @@ namespace GMW.WebUserControls
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALS00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
@@ -399,7 +397,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
udcDest = "";
|
||||
}
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -410,10 +408,10 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in creazione UDC temp ST x travaso: {0}{1}", Environment.NewLine, exc));
|
||||
logger.lg.scriviLog(string.Format(new CultureInfo("en-US"), "Errore in creazione UDC temp ST x travaso: {0}{1}", Environment.NewLine, exc));
|
||||
}
|
||||
}
|
||||
if (udcDest != "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
Postazione.warningText = "";
|
||||
|
||||
@@ -100,9 +100,6 @@ namespace GMW.WebUserControls
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALS00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
@@ -508,7 +505,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
udcDest = "";
|
||||
}
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
try
|
||||
{
|
||||
if (user_std.UtSn.mappaSito == "")
|
||||
if (string.IsNullOrEmpty(user_std.UtSn.mappaSito))
|
||||
{
|
||||
Response.Redirect("default.aspx", false);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ namespace GMW.WebUserControls
|
||||
string[] uri = Request.Url.LocalPath.Split('/');
|
||||
// salvo pagina corrente
|
||||
user_std.pagCorrente = uri.Last();
|
||||
if (user_std.pagPrecedente == "")
|
||||
if (string.IsNullOrEmpty(user_std.pagPrecedente))
|
||||
{
|
||||
user_std.pagPrecedente = user_std.pagCorrente;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public partial class forceUser : System.Web.UI.Page
|
||||
get
|
||||
{
|
||||
string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage");
|
||||
if (pagina == "")
|
||||
if (string.IsNullOrEmpty(pagina))
|
||||
{
|
||||
pagina = "menu.aspx";
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public partial class login : System.Web.UI.Page
|
||||
get
|
||||
{
|
||||
string pagina = memLayer.ML.StringSessionObj("nextPage");
|
||||
if (pagina == "")
|
||||
if (string.IsNullOrEmpty(pagina))
|
||||
{
|
||||
// cerco se ho prev / prec page
|
||||
if (user_std.pagPrecedente != "")
|
||||
|
||||
@@ -1548,7 +1548,7 @@ namespace GMW_data
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format(" | {24} | CodSoggetto / particolare non validi! tentativo di creazione cartellino come {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", CodCS, CodBilanciaTrim, annoTrim, CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, codEventoTrim, Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_parentTrim, noteTrim, clientIp), tipoLog.ERROR);
|
||||
logger.lg.scriviLog(string.Format(" | {23} | CodSoggetto / particolare non validi! tentativo di creazione cartellino come {0} | {1} | {2} | {3} | {4} | {5} | {6} | {7} | {8} | {9} | {10} | {11} | {12} | {13} | {14} | {15} | {16} | {17} | {18} | {19} | {20} | {21} | {22}", CodCS, CodBilanciaTrim, annoTrim, CodClienteTrim, ParticolareTrim, CodImpiantoTrim, CodStampoTrim, EsponenteTrim, FiguraTrim, DataRif, TurnoRif, CodImballoTrim, CodSoggettoTrim, Tara, IdxPosizione, CodTipoDichiarazioneTrim, codEventoTrim, Quantita, PesoTot, PesoCad, CodStatoTrim, UDC_parentTrim, noteTrim, clientIp), tipoLog.ERROR);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -1893,12 +1893,12 @@ namespace GMW_data
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Non sono riuscito a recuperare il codice soggetto DALLA SESSIONE per l'utente loggato: {0}, errore {1}{2}", user_std.UtSn.userNameAD, Environment.NewLine, e), tipoLog.ERROR);
|
||||
}
|
||||
if (CodSoggetto == "")
|
||||
if (string.IsNullOrEmpty(CodSoggetto))
|
||||
{
|
||||
// provo a recuperare da cookie...
|
||||
CodSoggetto = memLayer.ML.getCookieVal("CodSoggetto");
|
||||
}
|
||||
if (CodSoggetto == "")
|
||||
if (string.IsNullOrEmpty(CodSoggetto))
|
||||
{
|
||||
if (user_std.UtSn.utente != "")
|
||||
{
|
||||
@@ -2557,7 +2557,7 @@ namespace GMW_data
|
||||
* OVVERO tutte le righe hanno nella tab trans posiz eventi una riga valida
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
bool listaScaricabile = true;
|
||||
if (riga.Destinatario == "")
|
||||
if (string.IsNullOrEmpty(riga.Destinatario))
|
||||
{
|
||||
listaScaricabile = false;
|
||||
}
|
||||
@@ -2730,7 +2730,7 @@ namespace GMW_data
|
||||
* OVVERO tutte le righe hanno nella tab trans posiz eventi una riga valida
|
||||
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
||||
bool listaScaricabile = true;
|
||||
if (riga.Destinatario == "")
|
||||
if (string.IsNullOrEmpty(riga.Destinatario))
|
||||
{
|
||||
listaScaricabile = false;
|
||||
}
|
||||
@@ -3041,7 +3041,7 @@ namespace GMW_data
|
||||
foreach (DS_magazzino.RapQualRow rqRow in tabRapQual)
|
||||
{
|
||||
// se non ha già un UDC... e se NON E' stato già scaricato...
|
||||
if (rqRow.UDC == "" && rqRow.LegaScaric.ToUpper() == "N")
|
||||
if (string.IsNullOrEmpty(rqRow.UDC) && rqRow.LegaScaric.ToUpper() == "N")
|
||||
{
|
||||
answ = true;
|
||||
// controllo se sia con benestare, se "N" imposto con stato Non accettata (da web.config) altrimenti con stato MP ok...
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace GMW_data
|
||||
{
|
||||
string answ = memLayer.ML.StringSessionObj("CodCS");
|
||||
// se lo perdesse lo recupera da DB
|
||||
if (answ == "")
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
answ = memLayer.ML.cdv("CodCS");
|
||||
}
|
||||
|
||||
@@ -218,9 +218,6 @@ namespace GMW_data
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
// tolto 2015.06.25 redirect a pagina default
|
||||
//// se avesse perso codice cella rimando a pagina default...
|
||||
//if (Postazione.currCodCella == "") Response.Redirect("Default.aspx");
|
||||
answ = string.Format("ALF00{0}", Postazione.currCodCella);
|
||||
// controllo se esista AL sennò lo creo...
|
||||
if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0)
|
||||
@@ -992,7 +989,7 @@ namespace GMW_data
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastBarcodeIn == "")
|
||||
if (string.IsNullOrEmpty(lastBarcodeIn))
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.warningText = "";
|
||||
@@ -1263,7 +1260,7 @@ namespace GMW_data
|
||||
}
|
||||
if (createUdcOut && checkDone)
|
||||
{
|
||||
if (udcDest == "")
|
||||
if (string.IsNullOrEmpty(udcDest))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1361,7 +1358,7 @@ namespace GMW_data
|
||||
codImballo = CodImballoStd;
|
||||
}
|
||||
// se NON HA selezionato prendo default...
|
||||
if (codImballo == "" || codImballo == "-")
|
||||
if (string.IsNullOrEmpty(codImballo) || codImballo == "-")
|
||||
{
|
||||
codImballo = CodImballoStd;
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ public class reportPrinter
|
||||
break;
|
||||
}
|
||||
// carico di dati con lettura da web.config parametrica
|
||||
if (printerName == "")
|
||||
if (string.IsNullOrEmpty(printerName))
|
||||
{
|
||||
printerName = memLayer.ML.cdv(string.Format("printer{0}", tipo));
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=2133']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=2135']) {
|
||||
// impiego numero di build del SINGOLO RAMO
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '4.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
// forzo numero di build x tutti rami uguali
|
||||
|
||||
Reference in New Issue
Block a user