diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index d6035fe2..684c7aaf 100644 Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ diff --git a/GMW-RT/bin/GMW_data.dll b/GMW-RT/bin/GMW_data.dll index aabc4163..92bc84b7 100644 Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ diff --git a/GMW-UT/bin/GMW-UT.dll b/GMW-UT/bin/GMW-UT.dll index 547194f4..3eb35361 100644 Binary files a/GMW-UT/bin/GMW-UT.dll and b/GMW-UT/bin/GMW-UT.dll differ diff --git a/GMW-UT/bin/GMW_data.dll b/GMW-UT/bin/GMW_data.dll index aabc4163..92bc84b7 100644 Binary files a/GMW-UT/bin/GMW_data.dll and b/GMW-UT/bin/GMW_data.dll differ diff --git a/GMW/WebUserControls/mod_finiti.ascx.cs b/GMW/WebUserControls/mod_finiti.ascx.cs index 1e6a2307..71501c56 100644 --- a/GMW/WebUserControls/mod_finiti.ascx.cs +++ b/GMW/WebUserControls/mod_finiti.ascx.cs @@ -9,7 +9,7 @@ using GMW_data; namespace GMW.WebUserControls { - public partial class mod_finiti : GMW_data.UserControl + public partial class mod_finiti : GMW_data.UserControlBCodeMan { /// /// flusso associato (hard coded) a sterrati @@ -96,16 +96,6 @@ namespace GMW.WebUserControls base.ristampaUdc(tipoUdcRist, udcReq); } /// - /// udc da stampare - /// - protected string udcReq - { - get - { - return memLayer.ML.StringSessionObj("udcSelSAO"); - } - } - /// /// controlla particolare selezionato /// private void checkParticolare() @@ -116,14 +106,7 @@ namespace GMW.WebUserControls // 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 - { } + getDescrDisegnoParticolare(currParticolare, ref descr, ref disegno); lblDescrAttivo.Text = descr; lblDisegno.Text = disegno; } @@ -154,53 +137,6 @@ namespace GMW.WebUserControls 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; - } - } - /// - /// indica il codice articolo correntemente selezionato - /// - protected string currParticolare - { - get - { - return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); - } - } - /// - /// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT - /// - protected string origParticolare - { - get - { - return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); - } - } - /// /// indica UDC correntemente selezionato /// protected string currUDC diff --git a/GMW/WebUserControls/mod_finitiSuperCub.ascx.cs b/GMW/WebUserControls/mod_finitiSuperCub.ascx.cs index 30910b90..6bb8777e 100644 --- a/GMW/WebUserControls/mod_finitiSuperCub.ascx.cs +++ b/GMW/WebUserControls/mod_finitiSuperCub.ascx.cs @@ -9,7 +9,7 @@ using GMW_data; namespace GMW.WebUserControls { - public partial class mod_finitiSuperCub : GMW_data.UserControl + public partial class mod_finitiSuperCub : GMW_data.UserControlBCodeMan { /// /// flusso associato (hard coded) a sterrati @@ -95,16 +95,6 @@ namespace GMW.WebUserControls base.ristampaUdc(tipoUdcRist, udcReq); } /// - /// udc da stampare - /// - protected string udcReq - { - get - { - return memLayer.ML.StringSessionObj("udcSelSAO"); - } - } - /// /// controlla particolare selezionato /// private void checkParticolare() @@ -115,14 +105,7 @@ namespace GMW.WebUserControls // 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 - { } + getDescrDisegnoParticolare(currParticolare, ref descr, ref disegno); lblDescrAttivo.Text = descr; lblDisegno.Text = disegno; } @@ -153,53 +136,6 @@ namespace GMW.WebUserControls 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; - } - } - /// - /// indica il codice articolo correntemente selezionato - /// - protected string currParticolare - { - get - { - return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); - } - } - /// - /// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT - /// - protected string origParticolare - { - get - { - return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); - } - } - /// /// indica UDC correntemente selezionato /// protected string currUDC diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index b9435163..b1bc90a6 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 aabc4163..92bc84b7 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW_data/GMW_data.csproj b/GMW_data/GMW_data.csproj index 99f4393a..9bee95ce 100644 --- a/GMW_data/GMW_data.csproj +++ b/GMW_data/GMW_data.csproj @@ -243,6 +243,9 @@ ASPXCodeBehind + + ASPXCodeBehind + diff --git a/GMW_data/UserControl.cs b/GMW_data/UserControl.cs index 08b9b645..05a69444 100644 --- a/GMW_data/UserControl.cs +++ b/GMW_data/UserControl.cs @@ -66,74 +66,23 @@ namespace GMW_data } } /// - /// IDX cella associata alla linea corrente + /// restituisce il nome della pagina corrente /// - protected int idxCella - { - get - { - int answ = 0; - if (memLayer.ML.isInSessionObject(string.Format("IdxCella_{0}", uid))) - { - answ = memLayer.ML.IntSessionObj(string.Format("IdxCella_{0}", uid)); - } - return answ; - } - set - { - memLayer.ML.setSessionVal(string.Format("IdxCella_{0}", uid), value); - } - } - /// - /// Codice AL associato alla cella corrente... - /// - protected string AlByCella + public string PagCorrente { get { 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("ALF00{0}", Postazione.currCodCella); - // controllo se esista AL sennò lo creo... - if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0) - { - MagClass.magazzino.taEA.Insert(answ, true, DateTime.Now, MagClass.magazzino.CodSoggCurrUser, "", ""); - } - } - catch - { } + 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; } } - /// - /// Richiesta (ri)stampa UDC - /// - /// Tipo Udc (x messaggio log/SAO) - /// Codice UDC - public void ristampaUdc(string tipoUdc, string udcReq) - { - 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 {0} {1}", tipoUdc, udcReq), tipoLog.EXCEPTION); - } - if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", string.Format("Ri-Stampato UDC {0}", tipoUdc)); - raiseEvent(ucEvType.ReqUpdateParent); - } } } diff --git a/GMW_data/UserControlBCodeMan.cs b/GMW_data/UserControlBCodeMan.cs new file mode 100644 index 00000000..a94b43d3 --- /dev/null +++ b/GMW_data/UserControlBCodeMan.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using SteamWare; + +namespace GMW_data +{ + public class UserControlBCodeMan : GMW_data.UserControl + { + /// + /// IDX cella associata alla linea corrente + /// + protected int idxCella + { + get + { + int answ = 0; + if (memLayer.ML.isInSessionObject(string.Format("IdxCella_{0}", uid))) + { + answ = memLayer.ML.IntSessionObj(string.Format("IdxCella_{0}", uid)); + } + return answ; + } + set + { + memLayer.ML.setSessionVal(string.Format("IdxCella_{0}", uid), value); + } + } + /// + /// Codice AL associato alla cella corrente... + /// + protected string AlByCella + { + get + { + 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("ALF00{0}", Postazione.currCodCella); + // controllo se esista AL sennò lo creo... + if (MagClass.magazzino.taEA.getByAL(answ).Rows.Count == 0) + { + MagClass.magazzino.taEA.Insert(answ, true, DateTime.Now, MagClass.magazzino.CodSoggCurrUser, "", ""); + } + } + catch + { } + return answ; + } + } + /// + /// Richiesta (ri)stampa UDC + /// + /// Tipo Udc (x messaggio log/SAO) + /// Codice UDC + public void ristampaUdc(string tipoUdc, string udcReq) + { + 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 {0} {1}", tipoUdc, udcReq), tipoLog.EXCEPTION); + } + if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", string.Format("Ri-Stampato UDC {0}", tipoUdc)); + raiseEvent(ucEvType.ReqUpdateParent); + } + /// + /// udc da stampare + /// + protected string udcReq + { + get + { + return memLayer.ML.StringSessionObj("udcSelSAO"); + } + } + /// + /// indica il codice articolo correntemente selezionato + /// + protected string currParticolare + { + get + { + return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); + } + } + /// + /// indica il codice articolo "originale" in caso di trascodifica GRZ/GRZ o GRZ/LVT o LVT/LVT + /// + protected string origParticolare + { + get + { + return memLayer.ML.StringSessionObj(string.Format("origParticolare_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("origParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel")); + } + } + /// + /// Recupera descrizione e disegno dato un particolare + /// + /// + /// + /// + public void getDescrDisegnoParticolare(string CodParticolare, ref string descr, ref string disegno) + { + try + { + DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(CodParticolare, CodCs)[0]; + descr = riga.DescParticolare; + disegno = string.Format("( {0} )", riga.DisegnoGrezzo); + } + catch + { } + } + } +}