diff --git a/GMW/GMW/WebUserControls/mod_anime.ascx.cs b/GMW/GMW/WebUserControls/mod_anime.ascx.cs
index ad914be6..c1123b22 100644
--- a/GMW/GMW/WebUserControls/mod_anime.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_anime.ascx.cs
@@ -30,18 +30,23 @@ namespace GMW.WebUserControls
lblParticolareAttivo.Text = string.Format("Particolare selezionato
{0}", currParticolare);
// aggiungo descrizione del particolare
string descr = "";
+ string disegno = "";
try
{
- descr = utils.obj.taSelPart.getByConditioPref("", currParticolare)[0].label;
+ DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0];
+ descr = riga.DescParticolare;
+ disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
}
catch
{ }
lblDescrAttivo.Text = descr;
+ lblDisegno.Text = disegno;
}
else
{
lblParticolareAttivo.Text = "...";
lblDescrAttivo.Text = "";
+ lblDisegno.Text = "";
}
}
///
diff --git a/GMW/GMW/WebUserControls/mod_anime.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_anime.ascx.designer.cs
index 44320610..a96a5c11 100644
--- a/GMW/GMW/WebUserControls/mod_anime.ascx.designer.cs
+++ b/GMW/GMW/WebUserControls/mod_anime.ascx.designer.cs
@@ -76,6 +76,15 @@ namespace GMW.WebUserControls {
///
protected global::System.Web.UI.WebControls.Label lblDescrAttivo;
+ ///
+ /// lblDisegno control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDisegno;
+
///
/// lblMessaggi control.
///
diff --git a/GMW/GMW/WebUserControls/mod_animeMult.ascx b/GMW/GMW/WebUserControls/mod_animeMult.ascx
new file mode 100644
index 00000000..2dbee205
--- /dev/null
+++ b/GMW/GMW/WebUserControls/mod_animeMult.ascx
@@ -0,0 +1,85 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_animeMult.ascx.cs"
+ Inherits="GMW.WebUserControls.mod_animeMult" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+
+
+
diff --git a/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs b/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs
new file mode 100644
index 00000000..8db6447c
--- /dev/null
+++ b/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs
@@ -0,0 +1,481 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Net;
+using SteamWare;
+using GMW_data;
+
+namespace GMW.WebUserControls
+{
+ public partial class mod_animeMult : System.Web.UI.UserControl
+ {
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ calcolaPostazione();
+ traduciObj();
+ }
+ doChecks();
+ }
+ ///
+ /// controlla particolare selezionato
+ ///
+ private void checkParticolare()
+ {
+ if (currParticolare != "")
+ {
+ lblParticolareAttivo.Text = string.Format("Particolare selezionato {0}", currParticolare);
+ // aggiungo descrizione del particolare
+ string descr = "";
+ string disegno = "";
+ try
+ {
+ DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0];
+ descr = riga.DescParticolare;
+ disegno = string.Format("( {0} )", riga.DisegnoGrezzo);
+ }
+ catch
+ { }
+ lblDescrAttivo.Text = descr;
+ lblDisegno.Text = disegno;
+ }
+ else
+ {
+ lblParticolareAttivo.Text = "...";
+ lblDescrAttivo.Text = "";
+ lblDisegno.Text = "";
+ }
+ }
+ ///
+ /// effettua controlli visibilitÃ
+ ///
+ private void doChecks()
+ {
+ checkBarcode();
+ checkStampa();
+ checkParticolare();
+ }
+ ///
+ /// sistemo labels oggetti
+ ///
+ private void traduciObj()
+ {
+ // labels
+ lblPostazione.Text = string.Format("{2}: {0} ({1})", postazione_name, postazione_IP, traduci("postazione"));
+ lblPrinter.Text = string.Format("{1}: {0}", postazione_printer, traduci("stampante"));
+ lblQtaUDC.Text = traduci("lblQtaUDC");
+ lblNumUDC.Text = traduci("lblNumUDC");
+ lblQta.Text = traduci("lblQuantitaTotale");
+ lblNote.Text = traduci("lblNote");
+ lblCurrentPage.Text = traduci(PagCorrente);
+ //txtBox
+ txtQta.Text = memLayer.ML.confReadString("QtaImballoAnime");
+ // buttons
+ btnStampa.Text = traduci("btnStampa");
+ btnEmptyNote.Text = traduci("btnEmptyNote");
+ }
+ ///
+ /// restituisce il nome della pagina corrente
+ ///
+ 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;
+ }
+ }
+ ///
+ /// wrapper traduzione
+ ///
+ ///
+ ///
+ public string traduci(object lemma)
+ {
+ return user_std.UtSn.Traduci(lemma.ToString());
+ }
+ ///
+ /// calcola postazione corrente (ip, name, printer)
+ ///
+ 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
+ { }
+ }
+ ///
+ /// indica name della postazione corrente
+ ///
+ protected string postazione_name
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("postazione_name");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("postazione_name", value);
+ }
+ }
+ ///
+ /// indica ip della postazione corrente
+ ///
+ protected string postazione_IP
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("postazione_IP");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("postazione_IP", value);
+ }
+ }
+ ///
+ /// indica stampante associata alla postazione corrente
+ ///
+ protected string postazione_printer
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("postazione_printer");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("postazione_printer", value);
+ }
+ }
+ ///
+ /// indica il codice articolo correntemente selezionato
+ ///
+ protected string currParticolare
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("currParticolare");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("currParticolare", value, memLayer.ML.confReadBool("keepParticolareSel"));
+ }
+ }
+ ///
+ /// indica se i caratteri vadano forzati a maiuscoli
+ ///
+ public bool forceUppercase
+ {
+ get
+ {
+ return memLayer.ML.confReadBool("forceUppercase");
+ }
+ }
+ ///
+ /// num pezzi dell'ultimo UDC del particolare generato
+ ///
+ public int pezziUdc
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = (int)MagClass.magazzino.taCartellini.getLastByParticolare(memLayer.ML.StringSessionObj("CodCS"), currParticolare)[0].Qta;
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// decodifica il tipo barcode acquisito
+ ///
+ public tipoCodiceBarcode tipoBCode
+ {
+ get
+ {
+ tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
+ int trovati = 0;
+ // controllo non si tratti di un comando...
+ string preCmd = memLayer.ML.confReadString("prefComandi");
+ if (barcodeIn.StartsWith(preCmd))
+ {
+ answ = tipoCodiceBarcode.Comando;
+ }
+ // controllo se sia un anima "A"
+ else if (barcodeIn.StartsWith("A")) // !!! CONTROLLARE!!!
+ {
+ 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;
+ }
+ }
+ ///
+ /// valore barcode
+ ///
+ public string barcodeIn
+ {
+ get
+ {
+ return txtBarcode.Text.Trim();
+ }
+ set
+ {
+ txtBarcode.Text = value;
+ }
+ }
+ ///
+ /// qta pezzi TOTALE
+ ///
+ public int qta
+ {
+ get
+ {
+ int qta = 0;
+ try
+ {
+ qta = Convert.ToInt32(txtQta.Text.Trim());
+ }
+ catch
+ { }
+ return qta;
+ }
+ set
+ {
+ txtQta.Text = value.ToString();
+ }
+ }
+ ///
+ /// qta pezzi x UDC
+ ///
+ public int qtaUDC
+ {
+ get
+ {
+ int qtaUDC = 0;
+ try
+ {
+ qtaUDC = Convert.ToInt32(txtQtaUDC.Text.Trim());
+ }
+ catch
+ { }
+ return qtaUDC;
+ }
+ set
+ {
+ txtQtaUDC.Text = value.ToString();
+ }
+ }
+ ///
+ /// num UDC
+ ///
+ public int numUDC
+ {
+ get
+ {
+ int numUDC = 0;
+ try
+ {
+ numUDC = Convert.ToInt32(txtNumUDC.Text.Trim());
+ }
+ catch
+ { }
+ return numUDC;
+ }
+ set
+ {
+ txtNumUDC.Text = value.ToString();
+ }
+ }
+ ///
+ /// controlla se ci sia un barcode
+ ///
+ private void checkBarcode()
+ {
+ if (barcodeIn != "")
+ {
+ lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
+ switch (tipoBCode)
+ {
+ case tipoCodiceBarcode.Particolare:
+ // imposto il particolare corrente
+ currParticolare = barcodeIn;
+ // controllo esista il particolare scansionato
+ if (DataProxy.obj.taAnagParticolari.getByParticolare(currParticolare).Rows.Count == 0)
+ {
+ currParticolare = "";
+ lblMessaggi.Text += " - codice particolare non valido / non trovato in RILPRO.";
+ pnlAll.CssClass = "stileComandoKo";
+ }
+ else
+ {
+ lblMessaggi.Text += " - impostato particolare!";
+ pnlAll.CssClass = "stileComandoOk";
+ }
+ break;
+ case tipoCodiceBarcode.UDC:
+ // procedo solo se UDC esistente
+ if (MagClass.magazzino.checkUDC(barcodeIn))
+ {
+ // recupero il particolare dai dati del cartellino preesistente
+ currParticolare = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare;
+ // controllo esista il particolare
+ if (DataProxy.obj.taAnagParticolari.getByParticolare(currParticolare).Rows.Count == 0)
+ {
+ currParticolare = "";
+ lblMessaggi.Text += " - codice particolare da UDC non valido / non trovato in RILPRO.";
+ pnlAll.CssClass = "stileComandoKo";
+ }
+ else
+ {
+ lblMessaggi.Text += " - impostato particolare!";
+ pnlAll.CssClass = "stileComandoOk";
+ }
+ }
+
+ break;
+ default:
+ lblMessaggi.Text += " - codice non riconosciuto!";
+ pnlAll.CssClass = "stileComandoND";
+ break;
+ }
+ barcodeIn = "";
+ }
+ else
+ {
+ lblMessaggi.Text = "...attesa barcode...";
+ }
+ //grView.DataBind();
+ txtBarcode.Focus();
+ }
+ ///
+ /// controllo l'abilitazioen alla stampa UDC:
+ /// - particolare ok
+ /// - qta > 0
+ /// - almeno 1 trattamento
+ /// altrimenti disabilito btn stampa
+ ///
+ private void checkStampa()
+ {
+ bool stampaOk = false;
+ //controllo siano inseriti valori qta
+ if (qta > 0 && qtaUDC > 0 && numUDC > 0)
+ {
+ // controllo ci siano particolare e qta tornino (numUdc x qtaUdc = qtaTOT)
+ if (currParticolare != "" && ((numUDC * qtaUDC) == qta))
+ {
+ stampaOk = true;
+ }
+ }
+ btnStampa.Enabled = stampaOk;
+ }
+ ///
+ /// genera i barcode di
+ /// - trattamenti
+ /// - nuovo x pezzi liquidi
+ /// e lancia la relativa stampa
+ ///
+ ///
+ ///
+ protected void btnStampa_Click(object sender, EventArgs e)
+ {
+ string newUdcChild = "";
+ int qta = memLayer.ML.confReadInt("QtaImballoAnime");
+ string noteTrim = txtNote.Text.Trim();
+ try
+ {
+ qta = Convert.ToInt32(txtQtaUDC.Text);
+ }
+ catch
+ { }
+ for (int i = 0; i < numUDC; i++)
+ {
+ // genero cartellino liquidi
+ try
+ {
+ // creo nuovo UDC del trattamento liquidi
+ newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "Fin", memLayer.ML.confReadInt("IdxPosizioneAnime"), true, "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year); // !!! "AN" HARD CODED x indicare flusso ANIME
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore creazione UDC: {0}", exc), tipoLog.EXCEPTION);
+ }
+ // se ho cart liquidi genero (se non ci sono) cart trattamenti
+ if (newUdcChild != "")
+ {
+ // ora stampo il nuovo cartellino!!!
+ MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartAnime);
+ }
+ }
+ // resetto
+ doResetData();
+ }
+ ///
+ /// effettua reset dati
+ ///
+ private void doResetData()
+ {
+ // resetto i dati QtaTot e particolare...
+ qta = 0;
+ currParticolare = "";
+ txtQta.Text = "";
+ doChecks();
+ }
+ ///
+ /// svuoto le note
+ ///
+ ///
+ ///
+ protected void btnEmptyNote_Click(object sender, EventArgs e)
+ {
+ txtNote.Text = "";
+ }
+ }
+}
\ No newline at end of file
diff --git a/GMW/GMW/WebUserControls/mod_animeMult.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_animeMult.ascx.designer.cs
new file mode 100644
index 00000000..f533266f
--- /dev/null
+++ b/GMW/GMW/WebUserControls/mod_animeMult.ascx.designer.cs
@@ -0,0 +1,214 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.4963
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GMW.WebUserControls {
+
+
+ public partial class mod_animeMult {
+
+ ///
+ /// pnlAll control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel pnlAll;
+
+ ///
+ /// lblPostazione control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPostazione;
+
+ ///
+ /// lblPrinter control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPrinter;
+
+ ///
+ /// lblCurrentPage control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblCurrentPage;
+
+ ///
+ /// hlMenu control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.HyperLink hlMenu;
+
+ ///
+ /// lblParticolareAttivo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblParticolareAttivo;
+
+ ///
+ /// lblDescrAttivo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDescrAttivo;
+
+ ///
+ /// lblDisegno control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDisegno;
+
+ ///
+ /// lblMessaggi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMessaggi;
+
+ ///
+ /// lblQtaUDC control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblQtaUDC;
+
+ ///
+ /// txtQtaUDC control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtQtaUDC;
+
+ ///
+ /// lblNumUDC control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumUDC;
+
+ ///
+ /// txtNumUDC control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtNumUDC;
+
+ ///
+ /// lblQta control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblQta;
+
+ ///
+ /// txtQta control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtQta;
+
+ ///
+ /// btnStampa control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnStampa;
+
+ ///
+ /// lblBarcode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblBarcode;
+
+ ///
+ /// txtBarcode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtBarcode;
+
+ ///
+ /// aceParticolare control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.AutoCompleteExtender aceParticolare;
+
+ ///
+ /// lblNote control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNote;
+
+ ///
+ /// txtNote control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtNote;
+
+ ///
+ /// btnEmptyNote control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnEmptyNote;
+ }
+}
diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
index 713db4cc..bb61cacb 100644
--- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
+++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx
@@ -47,8 +47,7 @@
-
+
@@ -185,8 +184,8 @@