diff --git a/GMW/Web.config b/GMW/Web.config index e1b80e16..9bb1d8a4 100644 --- a/GMW/Web.config +++ b/GMW/Web.config @@ -121,6 +121,8 @@ + + diff --git a/GMW/WebUserControls/mod_trattamenti.ascx b/GMW/WebUserControls/mod_trattamenti.ascx index a467eadb..67035c16 100644 --- a/GMW/WebUserControls/mod_trattamenti.ascx +++ b/GMW/WebUserControls/mod_trattamenti.ascx @@ -51,14 +51,12 @@
-
-
+
+
-
-
-
+
@@ -67,104 +65,40 @@
-
-
-
+
- +
-
-
-
+
+
+

+
- - - - - - - - - - - - - - <%-- - - - - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - P | C - <%----%> - - - - - - - - - - - - - - +
+
+ +
+
+
+ +
+
+ +
+
+
-
+

@@ -175,7 +109,7 @@
-
+

diff --git a/GMW/WebUserControls/mod_trattamenti.ascx.cs b/GMW/WebUserControls/mod_trattamenti.ascx.cs index 1e5e1360..4791677e 100644 --- a/GMW/WebUserControls/mod_trattamenti.ascx.cs +++ b/GMW/WebUserControls/mod_trattamenti.ascx.cs @@ -14,10 +14,14 @@ namespace GMW.WebUserControls /// protected string flusso = "TT"; /// - /// stato associato (hard coded) a FUSI + /// stato associato (hard coded) a Trattati /// protected string statoUDC = "Tratt"; /// + /// stato associato all'UDC precedente (Sterrato) + /// + protected string statoUDC_pre = "Sterr"; + /// /// tipo di evento associato alla creazione dell'UDC /// protected string eventoUDC = "UDC_TRATT"; @@ -74,7 +78,7 @@ namespace GMW.WebUserControls storicoVisibile = false; fixStorico(); // imposto pos abilitata x cancellazione - mod_storicoAzioniOperatore1.idxPosizione2del = memLayer.ML.confReadInt("IdxPosizioneAnime"); + mod_storicoAzioniOperatore1.idxPosizione2del = memLayer.ML.confReadInt("IdxPosizioneTrattati"); } doChecks(); mod_storicoAzioniOperatore1.eh_stampa += new EventHandler(mod_storicoAzioniOperatore1_eh_stampa); @@ -87,7 +91,7 @@ namespace GMW.WebUserControls /// void mod_storicoAzioniOperatore1_eh_stampa(object sender, EventArgs e) { - MagClass.magazzino.stampaUdc(udcReq, postazione_printer, tipoCartellino.cartAnime, Request.UserHostName); + MagClass.magazzino.stampaUdc(udcReq, postazione_printer, tipoCartellino.cartTratt, Request.UserHostName); // registro ri-stampa UDC DateTime adesso = DateTime.Now; // calcolo particolare... @@ -100,9 +104,9 @@ namespace GMW.WebUserControls } catch { - logger.lg.scriviLog(string.Format("Errore recupero particolare UDC AnimeExt {0}", udcReq), tipoLog.EXCEPTION); + logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Trattati {0}", udcReq), tipoLog.EXCEPTION); } - MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, postazione_name, postazione_IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Anime Mult"); + MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, postazione_name, postazione_IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Trattati"); } /// /// udc da stampare @@ -163,8 +167,12 @@ namespace GMW.WebUserControls lblQta.Text = traduci("lblQuantitaTotale"); lblNote.Text = traduci("lblNote"); lblCurrentPage.Text = traduci(PagCorrente); + lblAnnoTratt.Text = traduci("lblAnnoTratt"); + lblNumTratt.Text = traduci("lblNumTratt"); + lblUDC.Text = traduci("lblUDC"); //txtBox - txtQta.Text = memLayer.ML.confReadString("QtaImballoAnime"); + txtQta.Text = memLayer.ML.confReadString("QtaImballoTratt"); + txtAnno.Text = DateTime.Now.Year.ToString(); // buttons btnStampa.Text = traduci("btnStampa"); btnEmptyNote.Text = traduci("btnEmptyNote"); @@ -458,7 +466,6 @@ namespace GMW.WebUserControls private void doUpdate() { checkStampa(); - grView.DataBind(); mod_storicoAzioniOperatore1.doUpdate(); txtBarcode.Focus(); } @@ -526,7 +533,7 @@ namespace GMW.WebUserControls string[] stringSeparators = new string[] { "#" }; try { - // creo nuovo UDC anime multiple + // creo nuovo UDC trattati newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoSterr"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.confReadInt("IdxPosizioneSterrati"), "IdxPosizioneSterrati", eventoUDC, noteTrim, "", adesso.Year, Request.UserHostName); // registro creazione nuovo UDC MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "creaUDC", string.Format("Creato nuovo UDC Sterrato, qta: {0} {1}", qta, noteTrim)); @@ -570,7 +577,7 @@ namespace GMW.WebUserControls } else { - httpLog(string.Format("ANIME MULTIPLE, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR); + httpLog(string.Format("TRATTATI, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR); Response.Redirect("~/login.aspx"); } mod_storicoAzioniOperatore1.doUpdate(); @@ -752,36 +759,7 @@ namespace GMW.WebUserControls private void checkFixOds() { } - /// - /// traduce gli header delle colonne - /// - /// - /// - 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 = ""; - } - } - + protected void rbl_DataBinding(object sender, EventArgs e) { RadioButtonList rbl = (RadioButtonList)sender; @@ -892,5 +870,101 @@ namespace GMW.WebUserControls txtTratt.Text = ""; updateListBoxTrattamenti(); } + + /// + /// elenco dictionary dei trattamenti da associare ad UDC + /// + public Dictionary elencoUDC + { + get + { + try + { + return (Dictionary)memLayer.ML.objSessionObj("elencoUDC"); + } + catch + { + return new Dictionary(); + } + } + set + { + memLayer.ML.setSessionVal("elencoUDC", value, false); + } + } + /// + /// svuota elenco trattamenti + /// + /// + /// + protected void btnSvuotaUDC_Click(object sender, EventArgs e) + { + Dictionary elenco = new Dictionary(); + elencoUDC = elenco; + //txtUDC.Text = ""; + //lblWarnUdc.Visible = false; + updateListBoxUDC(); + doChecks(); + } + /// + /// controlla validità UDC x inserire in elenco... + /// + /// + private void checkUdc4elenco(string valore) + { +#if false + if (MagClass.magazzino.checkUDC(valore)) + { + // controllo sia un cartellino F10... + DS_Applicazione.ElencoCartelliniRow rigaCart; + string tipoImballo = ""; + try + { + rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(valore)[0]; + tipoImballo = rigaCart.CodImballo; + } + catch + { } + // controllo il tipo imballo dell'UDC per decidere se sia F10... + if (tipoImballo == memLayer.ML.confReadString("CodImballoLiquidi")) + { + Dictionary elenco = elencoUDC; + // controllo il valore non ci sia già... + if (!elenco.ContainsKey(valore)) + { + elenco.Add(valore, valore); + elencoUDC = elenco; + } + txtUDC.Text = ""; + lblWarnUdc.Visible = false; + updateListBoxUDC(); + } + else + { + // elimino UDC con imballo non valido! + txtUDC.Text = ""; + lblWarnUdc.Text = traduci("UdcImballoErrato"); + lblWarnUdc.Visible = true; + } + } + else + { + // elimino UDC non valido! + txtUDC.Text = ""; + lblWarnUdc.Text = traduci("UdcNonTrovato"); + lblWarnUdc.Visible = true; + } +#endif + } + /// + /// aggiorna la listbox + /// + private void updateListBoxUDC() + { + lbUdc.DataSource = elencoUDC; + lbUdc.DataTextField = "Value"; + lbUdc.DataValueField = "Key"; + lbUdc.DataBind(); + } } } \ No newline at end of file diff --git a/GMW/WebUserControls/mod_trattamenti.ascx.designer.cs b/GMW/WebUserControls/mod_trattamenti.ascx.designer.cs index f521e1b3..55b46acb 100644 --- a/GMW/WebUserControls/mod_trattamenti.ascx.designer.cs +++ b/GMW/WebUserControls/mod_trattamenti.ascx.designer.cs @@ -211,31 +211,31 @@ namespace GMW.WebUserControls { protected global::System.Web.UI.WebControls.TextBox txtAnno; /// - /// grView control. + /// lblUDC control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.GridView grView; + protected global::System.Web.UI.WebControls.Label lblUDC; /// - /// ods control. + /// lbUdc control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.ObjectDataSource ods; + protected global::System.Web.UI.WebControls.ListBox lbUdc; /// - /// lblNumRec control. + /// btnSvuotaUDC control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lblNumRec; + protected global::System.Web.UI.WebControls.Button btnSvuotaUDC; /// /// lblQta control. diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 81d46dc1..59d5b1b6 100644 Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ diff --git a/GMW/bin/GMW_data.dll b/GMW/bin/GMW_data.dll index deeba18b..360d45a8 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW/bin/SteamWare.dll b/GMW/bin/SteamWare.dll index 2d47a8ec..1c53539e 100644 Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ diff --git a/GMW_data/utils.cs b/GMW_data/utils.cs index 610cb461..c17acb4c 100644 --- a/GMW_data/utils.cs +++ b/GMW_data/utils.cs @@ -146,6 +146,7 @@ public enum tipoCartellino cartMP, cartSterr, cartTara, + cartTratt, cartWip } public enum tipoSelettore