diff --git a/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx new file mode 100644 index 00000000..0a3b8da3 --- /dev/null +++ b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx @@ -0,0 +1,47 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_sanpos_associaz_F10_F18.ascx.cs" + Inherits="GMW.WebUserControls.mod_sanpos_associaz_F10_F18" %> +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ + +
+
+
+ +
+
+ +
+
+
+
+
+
diff --git a/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.cs b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.cs new file mode 100644 index 00000000..da5e4ecf --- /dev/null +++ b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.cs @@ -0,0 +1,326 @@ +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_sanpos_associaz_F10_F18 : 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 += "
"; + } + if (currUdcTo != "") + { + lblGitterBoxAttivo.Text += string.Format("UDC TO: {0}", currUdcTo); + } + if (lblGitterBoxAttivo.Text == "") + { + lblGitterBoxAttivo.Text = "..."; + } + } + /// + /// effettua controlli visibilità + /// + private void doChecks() + { + checkBarcode(); + checkStampa(); + } + /// + /// 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")); + // buttons + btnAssocia.Text = traduci("btnAssocia"); + } + /// + /// 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 UDC TO (F18) selezionato + /// + protected string currUdcTo + { + get + { + return memLayer.ML.StringSessionObj("currUdcTo"); + } + set + { + memLayer.ML.setSessionVal("currUdcTo", 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 + { } + // controllo il tipo imballo dell'UDC per decidere se sia F10 o F18... + if (tipoImballo == memLayer.ML.confReadString("CodImballoLiquidi")) + { + // salvo UDC from + currUdcFrom = barcodeIn; + } + else if (tipoImballo == memLayer.ML.confReadString("CodImballoLiquidiDaSpedire")) + { + // salvo UDC to + currUdcTo = barcodeIn; + } + else + { + lblMessaggi.Text += " - codice UDC non valido / non trovato."; + pnlAll.CssClass = "stileComandoKo"; + } + } + + 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 associaOk = false; + if (currUdcFrom != "" && currUdcTo != "") + { + associaOk = true; + } + btnAssocia.Enabled = associaOk; + } + /// + /// genera i barcode di + /// - trattamenti + /// - nuovo x pezzi liquidi + /// e lancia la relativa stampa + /// + /// + /// + protected void btnAssocia_Click(object sender, EventArgs e) + { + if (currUdcFrom != "" && currUdcTo != "") + { + // associo i 2 cartellini + MagClass.magazzino.associaUdcParent(currUdcTo, currUdcFrom); + // indico UDC associati! + lblMessaggi.Text = string.Format("{0} {1} -> {2}", traduci("effettuataAssociazione"), currUdcFrom, currUdcTo); + currUdcFrom = ""; + currUdcTo = ""; + lblGitterBoxAttivo.Text = ""; + } + } + } +} \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.designer.cs new file mode 100644 index 00000000..03116fc5 --- /dev/null +++ b/GMW/GMW/WebUserControls/mod_sanpos_associaz_F10_F18.ascx.designer.cs @@ -0,0 +1,115 @@ +//------------------------------------------------------------------------------ +// +// 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_sanpos_associaz_F10_F18 { + + /// + /// 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; + + /// + /// 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; + + /// + /// lblAssociazione control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblAssociazione; + + /// + /// btnAssocia control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAssocia; + } +} diff --git a/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx b/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx index 89e68442..71a85a4e 100644 --- a/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx +++ b/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx @@ -23,7 +23,7 @@
-
+
@@ -52,7 +52,7 @@
-
+

diff --git a/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx.cs b/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx.cs index 10b03f54..298c7f57 100644 --- a/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_sanpos_controlloLiquidi.ascx.cs @@ -39,8 +39,8 @@ namespace GMW.WebUserControls /// private void doChecks() { - checkStampa(); checkBarcode(); + checkStampa(); } /// /// sistemo labels oggetti diff --git a/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx b/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx index eab2b01d..e60b5d47 100644 --- a/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx +++ b/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx @@ -43,7 +43,7 @@
+ Font-Size="32pt" AutoPostBack="True" />
diff --git a/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx.cs b/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx.cs index 6cca3e26..aff1f66e 100644 --- a/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_sanpos_creazioneF18.ascx.cs @@ -38,8 +38,8 @@ namespace GMW.WebUserControls /// private void doChecks() { - checkStampa(); checkBarcode(); + checkStampa(); } /// /// sistemo labels oggetti @@ -357,14 +357,5 @@ namespace GMW.WebUserControls MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartFin); } } - /// - /// controllo campo barcode - /// - /// - /// - protected void txtBarcode_TextChanged(object sender, EventArgs e) - { - //doChecks(); - } } } \ No newline at end of file diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index cbd78cd2..21cf441a 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index cbd78cd2..21cf441a 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/sanpos_associaz_F10_F18.aspx b/GMW/GMW/sanpos_associaz_F10_F18.aspx new file mode 100644 index 00000000..4bd564c3 --- /dev/null +++ b/GMW/GMW/sanpos_associaz_F10_F18.aspx @@ -0,0 +1,6 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="sanpos_associaz_F10_F18.aspx.cs" Inherits="GMW.sanpos_associaz_F10_F18" %> +<%@ Register src="WebUserControls/mod_sanpos_associaz_F10_F18.ascx" tagname="mod_sanpos_associaz_F10_F18" tagprefix="uc1" %> + + + diff --git a/GMW/GMW/sanpos_associaz_F10_F18.aspx.cs b/GMW/GMW/sanpos_associaz_F10_F18.aspx.cs new file mode 100644 index 00000000..66c5c176 --- /dev/null +++ b/GMW/GMW/sanpos_associaz_F10_F18.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 sanpos_associaz_F10_F18 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/GMW/GMW/sanpos_associaz_F10_F18.aspx.designer.cs b/GMW/GMW/sanpos_associaz_F10_F18.aspx.designer.cs new file mode 100644 index 00000000..76a441ec --- /dev/null +++ b/GMW/GMW/sanpos_associaz_F10_F18.aspx.designer.cs @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 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 { + + + public partial class sanpos_associaz_F10_F18 { + + /// + /// mod_sanpos_associaz_F10_F181 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GMW.WebUserControls.mod_sanpos_associaz_F10_F18 mod_sanpos_associaz_F10_F181; + } +} diff --git a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll index 00e7ea5a..e0a15724 100644 Binary files a/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll and b/GMW/GMW_data/obj/Debug/Refactor/GMW_data.dll differ