diff --git a/GMW/GMW.Publish.xml b/GMW/GMW.Publish.xml index b60489cb..98ffc28d 100644 --- a/GMW/GMW.Publish.xml +++ b/GMW/GMW.Publish.xml @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/GMW/GMW.csproj b/GMW/GMW.csproj index ba72144a..4c79f506 100644 --- a/GMW/GMW.csproj +++ b/GMW/GMW.csproj @@ -161,6 +161,7 @@ + @@ -251,6 +252,13 @@ chLang.aspx + + consumoFusi.aspx + ASPXCodeBehind + + + consumoFusi.aspx + Default.aspx ASPXCodeBehind @@ -574,6 +582,13 @@ mod_confMag.ascx + + mod_consumoFusi.ascx + ASPXCodeBehind + + + mod_consumoFusi.ascx + mod_delibera.ascx ASPXCodeBehind @@ -1193,6 +1208,7 @@ + diff --git a/GMW/Web.TK_prod.config b/GMW/Web.TK_prod.config index ec675eaf..bdcec848 100644 --- a/GMW/Web.TK_prod.config +++ b/GMW/Web.TK_prod.config @@ -42,6 +42,7 @@ + diff --git a/GMW/Web.TK_test.config b/GMW/Web.TK_test.config index 3a8704f4..9e44166a 100644 --- a/GMW/Web.TK_test.config +++ b/GMW/Web.TK_test.config @@ -43,6 +43,7 @@ + diff --git a/GMW/WebUserControls/mod_consumoFusi.ascx b/GMW/WebUserControls/mod_consumoFusi.ascx new file mode 100644 index 00000000..09d53f7d --- /dev/null +++ b/GMW/WebUserControls/mod_consumoFusi.ascx @@ -0,0 +1,46 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_consumoFusi.ascx.cs" Inherits="GMW.WebUserControls.mod_consumoFusi" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + +
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ + +
+
+
+ +
+   +
+ +
+
+
+
+
+
diff --git a/GMW/WebUserControls/mod_consumoFusi.ascx.cs b/GMW/WebUserControls/mod_consumoFusi.ascx.cs new file mode 100644 index 00000000..3e9359e2 --- /dev/null +++ b/GMW/WebUserControls/mod_consumoFusi.ascx.cs @@ -0,0 +1,308 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; +using GMW_data; + +namespace GMW.WebUserControls +{ + public partial class mod_consumoFusi : System.Web.UI.UserControl + { + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + calcolaPostazione(); + traduciObj(); + } + doChecks(); + lblGitterBoxAttivo.Text = ""; + if (currUdcFrom != "") + { + lblGitterBoxAttivo.Text += string.Format("UDC FROM: {0}", currUdcFrom); + } + if (lblGitterBoxAttivo.Text == "") + { + lblGitterBoxAttivo.Text = "..."; + } + } + /// + /// effettua controlli visibilità + /// + private void doChecks() + { + checkBarcode(); + checkConsuma(); + } + /// + /// 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")); + lblCurrentPage.Text = traduci(PagCorrente); + // buttons + btnConsuma.Text = traduci("btnConsumaUdcF10"); + } + /// + /// 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 UDC FROM (F10) selezionato + /// + protected string currUdcFrom + { + get + { + return memLayer.ML.StringSessionObj("currUdcFrom"); + } + set + { + memLayer.ML.setSessionVal("currUdcFrom", value, false); + } + } + /// + /// indica se i caratteri vadano forzati a maiuscoli + /// + public bool forceUppercase + { + get + { + return memLayer.ML.confReadBool("forceUppercase"); + } + } + /// + /// 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 particolare "P" + else if (barcodeIn.StartsWith("P")) + { + 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; + } + } + /// + /// controlla se ci sia un barcode + /// + private void checkBarcode() + { + if (barcodeIn != "") + { + DS_Applicazione.ElencoCartelliniRow rigaCart; + string tipoImballo = ""; + lblMessaggi.Text = 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 + { } + // salvo UDC from + currUdcFrom = barcodeIn; + } + break; + default: + lblMessaggi.Text += " - codice non riconosciuto!"; + pnlAll.CssClass = "stileComandoND"; + break; + } + barcodeIn = ""; + } + else + { + lblMessaggi.Text = "...attesa barcode..."; + } + //grView.DataBind(); + txtBarcode.Focus(); + } + /// + /// controllo abilitazione consumo + /// + private void checkConsuma() + { + bool consumaOk = false; + if (currUdcFrom != "") + { + consumaOk = true; + } + btnConsuma.Enabled = consumaOk; + } + /// + /// genera i barcode di + /// - trattamenti + /// - nuovo x pezzi liquidi + /// e lancia la relativa stampa + /// + /// + /// + protected void btnConsuma_Click(object sender, EventArgs e) + { + if (currUdcFrom != "") + { + // controllo se UDC non sia già consumato... + if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom)) + { + // consumo UDC + MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName); + } + // indico UDC consumato! + lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom); + currUdcFrom = ""; + lblGitterBoxAttivo.Text = ""; + } + } + } +} \ No newline at end of file diff --git a/GMW/WebUserControls/mod_consumoFusi.ascx.designer.cs b/GMW/WebUserControls/mod_consumoFusi.ascx.designer.cs new file mode 100644 index 00000000..0251216f --- /dev/null +++ b/GMW/WebUserControls/mod_consumoFusi.ascx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GMW.WebUserControls { + + + public partial class mod_consumoFusi { + + /// + /// 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; + + /// + /// lblGitterBoxAttivo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblGitterBoxAttivo; + + /// + /// 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; + + /// + /// 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; + + /// + /// lblConsuma control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblConsuma; + + /// + /// btnConsuma control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnConsuma; + } +} diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index b5ec53c6..2a5e2c6d 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 b3c7a03d..4ae5d724 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 5995ad6e..47c6a697 100644 Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ diff --git a/GMW/consumoFusi.aspx b/GMW/consumoFusi.aspx new file mode 100644 index 00000000..27f5196c --- /dev/null +++ b/GMW/consumoFusi.aspx @@ -0,0 +1,5 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="consumoFusi.aspx.cs" Inherits="GMW.consumoFusi" %> +<%@ Register src="WebUserControls/mod_consumoFusi.ascx" tagname="mod_consumoFusi" tagprefix="uc1" %> + + + diff --git a/GMW/consumoFusi.aspx.cs b/GMW/consumoFusi.aspx.cs new file mode 100644 index 00000000..eb2ca005 --- /dev/null +++ b/GMW/consumoFusi.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace GMW +{ + public partial class consumoFusi : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/GMW/consumoFusi.aspx.designer.cs b/GMW/consumoFusi.aspx.designer.cs new file mode 100644 index 00000000..a4e0d9e9 --- /dev/null +++ b/GMW/consumoFusi.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GMW { + + + public partial class consumoFusi { + + /// + /// mod_consumoFusi1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GMW.WebUserControls.mod_consumoFusi mod_consumoFusi1; + } +} diff --git a/GMW_Term/bin/GMW_Term.dll b/GMW_Term/bin/GMW_Term.dll index 7de3ed62..f6b393b2 100644 Binary files a/GMW_Term/bin/GMW_Term.dll and b/GMW_Term/bin/GMW_Term.dll differ diff --git a/GMW_Term/bin/GMW_data.dll b/GMW_Term/bin/GMW_data.dll index 39d46062..09b226e1 100644 Binary files a/GMW_Term/bin/GMW_data.dll and b/GMW_Term/bin/GMW_data.dll differ diff --git a/GMW_Term/bin/SteamWare.dll b/GMW_Term/bin/SteamWare.dll index 5995ad6e..d1628b5e 100644 Binary files a/GMW_Term/bin/SteamWare.dll and b/GMW_Term/bin/SteamWare.dll differ diff --git a/GMW_data/MagClass.cs b/GMW_data/MagClass.cs index 6c331cbd..382fbfe8 100644 --- a/GMW_data/MagClass.cs +++ b/GMW_data/MagClass.cs @@ -509,16 +509,16 @@ namespace GMW_data /// Codice dello stampo /// codice dell'esponente dello stampo /// Codice figura - /// Data di rif per la dichiarazione - /// Turno di rif per la dichiarazione - /// codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input) - /// codice dell'operatore /// codice dell'UDC parent (UDC della tara) /// peso in kg (0 se non noto) da associare all'UDC come tara del contenitore + /// codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input) /// tipo di dichiarazione (vedere relativa anagrafica consentita, es U=uomo, M=macchina...) + /// codice dell'operatore /// numero pezzi associati all'UDC /// Peso totale rilevato /// Peso unitario rilevato + /// Data di rif per la dichiarazione + /// Turno di rif per la dichiarazione /// Codice dello stato del pezzo (da anagrafica: sabbiato, ...) /// Codice del magazzino in cui inserire l'UDC /// NOME della posizione default in cui creare UDC diff --git a/GMW_data/SqlScripts/V2.1/GMW_00516.sql b/GMW_data/SqlScripts/V2.1/GMW_00516.sql new file mode 100644 index 00000000..25fc69a2 --- /dev/null +++ b/GMW_data/SqlScripts/V2.1/GMW_00516.sql @@ -0,0 +1,6 @@ + + +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(516, GETDATE()) +GO + +SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC diff --git a/GMW_data/SqlScripts/Vocabolario/vocab_516.sql b/GMW_data/SqlScripts/Vocabolario/vocab_516.sql new file mode 100644 index 00000000..64f40653 --- /dev/null +++ b/GMW_data/SqlScripts/Vocabolario/vocab_516.sql @@ -0,0 +1,10 @@ +exec stp_insNewLemma 'ConsFusi', 'Consumo Fusi' +exec stp_insNewLemma 'ConsFusiExpl', 'Gestione Consumo Fusi' + + + + +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(516, GETDATE()) +GO + +SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC diff --git a/GMW_data/bin/SP_prod/GMW_data.dll b/GMW_data/bin/SP_prod/GMW_data.dll index f0e9f01c..9d0f54e0 100644 Binary files a/GMW_data/bin/SP_prod/GMW_data.dll and b/GMW_data/bin/SP_prod/GMW_data.dll differ diff --git a/GMW_data/bin/SP_prod/SteamWare.dll b/GMW_data/bin/SP_prod/SteamWare.dll index 79288680..5efa2cdf 100644 Binary files a/GMW_data/bin/SP_prod/SteamWare.dll and b/GMW_data/bin/SP_prod/SteamWare.dll differ diff --git a/GMW_data/bin/TK_prod/GMW_data.dll b/GMW_data/bin/TK_prod/GMW_data.dll index 25d07fbd..09b226e1 100644 Binary files a/GMW_data/bin/TK_prod/GMW_data.dll and b/GMW_data/bin/TK_prod/GMW_data.dll differ