From 0ed92b84d4e655d1dca220bd3530e1b0887fd0d5 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 30 Dec 2020 16:20:04 +0100 Subject: [PATCH] start UDC-pedane (2 check x correttezza...) --- MP-MAG/MP-MAG.csproj | 8 + .../WebUserControls/cmp_OrderListByUdc.ascx | 47 + .../cmp_OrderListByUdc.ascx.cs | 88 ++ .../cmp_OrderListByUdc.ascx.designer.cs | 53 + MP-MAG/WebUserControls/cmp_PLScanner.ascx | 1 + MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs | 119 ++- .../cmp_PLScanner.ascx.designer.cs | 9 + MP-MAG/WebUserControls/cmp_SelUdc.ascx | 6 +- MP-MAG/WebUserControls/cmp_SelUdc.ascx.cs | 20 +- .../cmp_SelUdc.ascx.designer.cs | 18 + MagData/DS_Mag.Designer.cs | 917 +++++++++++++++++- MagData/DS_Mag.xsd | 104 ++ MagData/DS_Mag.xss | 2 +- MagData/DS_PackList.Designer.cs | 56 +- MagData/DS_PackList.xsd | 12 + MagData/DS_PackList.xss | 4 +- MagData/MagDataLayer.cs | 3 + 17 files changed, 1418 insertions(+), 49 deletions(-) create mode 100644 MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx create mode 100644 MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.cs create mode 100644 MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.designer.cs diff --git a/MP-MAG/MP-MAG.csproj b/MP-MAG/MP-MAG.csproj index 4876a61..8647ef7 100644 --- a/MP-MAG/MP-MAG.csproj +++ b/MP-MAG/MP-MAG.csproj @@ -453,6 +453,13 @@ cmp_OrderListAdd.ascx + + cmp_OrderListByUdc.ascx + ASPXCodeBehind + + + cmp_OrderListByUdc.ascx + cmp_packList.ascx ASPXCodeBehind @@ -710,6 +717,7 @@ + diff --git a/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx new file mode 100644 index 0000000..0c52cb6 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx @@ -0,0 +1,47 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_OrderListByUdc.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_OrderListByUdc" %> + + + + + + + +
+
+ Nessun record trovato +
+
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.cs b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.cs new file mode 100644 index 0000000..aa966da --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.cs @@ -0,0 +1,88 @@ +using MagData; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_MAG.WebUserControls +{ + public partial class cmp_OrderListByUdc : BaseUserControl + { + #region Public Properties + + public int PackListID + { + get + { + int answ = 0; + int.TryParse(hfPackListID.Value, out answ); + return answ; + } + set + { + hfPackListID.Value = $"{value}"; + } + } + + public string UdcSel + { + get + { + return hfUdc.Value; + } + set + { + hfUdc.Value = value; + doUpdate(); + } + } + + #endregion Public Properties + + #region Private Methods + + private void Cmp_OrderListAdd_eh_addNew(object sender, EventArgs e) + { + resetSelezione(); + } + + private void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseReset(); + } + + #endregion Private Methods + + #region Protected Methods + + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods + + #region Public Methods + + public void doUpdate() + { + // calcolo il codcliente + grView.DataBind(); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.designer.cs new file mode 100644 index 0000000..4868a39 --- /dev/null +++ b/MP-MAG/WebUserControls/cmp_OrderListByUdc.ascx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MP_MAG.WebUserControls +{ + + + public partial class cmp_OrderListByUdc + { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfPackListID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfPackListID; + + /// + /// Controllo hfUdc. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfUdc; + } +} diff --git a/MP-MAG/WebUserControls/cmp_PLScanner.ascx b/MP-MAG/WebUserControls/cmp_PLScanner.ascx index b8f5e5b..d832f07 100644 --- a/MP-MAG/WebUserControls/cmp_PLScanner.ascx +++ b/MP-MAG/WebUserControls/cmp_PLScanner.ascx @@ -19,6 +19,7 @@
+
diff --git a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs index f946dc0..776c294 100644 --- a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs @@ -28,6 +28,21 @@ namespace MP_MAG.WebUserControls } } + /// + /// UDC selezionato + /// + protected string LastUDC + { + get + { + return hfLastUDC.Value; + } + set + { + hfLastUDC.Value = value; + } + } + /// /// ULTIMO Comando barcode VALIDO (!="") letto /// @@ -59,6 +74,7 @@ namespace MP_MAG.WebUserControls set { cmp_SelPackList.PackListID = value; + cmp_SelUdc.PackListID = value; } } @@ -264,7 +280,9 @@ namespace MP_MAG.WebUserControls { // seleziono PackList SelPackList = codeInt; - tryLinkAlUdc(); + // resetto PEDANA ed UDC + SelPedana = ""; + SelUDC = ""; } break; @@ -295,7 +313,11 @@ namespace MP_MAG.WebUserControls } else if (tabAL[0].PackListID != SelPackList) { - cmp_barcode.showOutput("badge badge-danger", $"Errore: {rawData} già associata a PackList {tabAL[0].PackListID}"); + cmp_barcode.showOutput("badge badge-danger", $"Errore: AL {rawData} già associata a PackList {tabAL[0].PackListID}"); + } + else if (tabAL[0].Status > 0) + { + cmp_barcode.showOutput("badge badge-danger", $"Errore: AL {rawData} non modificabile"); } else { @@ -307,22 +329,91 @@ namespace MP_MAG.WebUserControls if (allOk) { SelPedana = rawData; + // resetto UDC + SelUDC = ""; } } break; case codeType.Udc: - - // verifico e seleziono udc - - if (true) + // verifico di avere pack list + allOk = false; + if (SelPackList == 0) { - SelUDC = rawData; + cmp_barcode.showOutput("badge badge-danger", "Errore: manca PackList!"); + } + else + { + // verifico di avere Pedana + if (string.IsNullOrEmpty(SelPedana)) + { + cmp_barcode.showOutput("badge badge-danger", "Errore: manca Pedana!"); + } + else + { + // verifico esista + var tabUDC = MagDataLayer.man.taEUdc.getByKey(rawData); + if (tabUDC.Rows.Count == 0) + { + cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC non trovato: {rawData}"); + } + else + { + // ...e NON sia stato TRASFERITO + if (tabUDC[0].IdxPosizione > 0) + { + cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC già trasferito: {rawData}"); + } + else + { + // cerco AL se sia quello selezionato... + var tabAL = MagDataLayer.man.taEAL.getByUdc(rawData); + // se non trovo --> associo + if (tabAL.Rows.Count == 0) + { + // tutto ok + allOk = true; + } + // se uguale OK + else if (tabAL[0].AL == SelPedana) + { + // tutto ok + allOk = true; + } + else + { + // se siamo in seconda lettura --> OK x spostamento + if (LastUDC == rawData) + { + allOk = true; + LastUDC = ""; + } + else + { + // verifico pedana (vecchia/attuale) libera... + if (tabAL[0].Status > 0) + { + cmp_barcode.showOutput("badge badge-danger", $"Attenzione: AL di origine ({tabAL[0].AL}) non modificabile, impossibile spostare"); + } + // chiedo seconda lettura SE AL "libero" + else + { + cmp_barcode.showOutput("badge badge-info", $"Attenzione: UDC {rawData} già associato ad AL ({tabAL[0].AL}), rileggere per confermare ({SelPedana})"); + LastUDC = rawData; + } + } + } + } + } + // ...e seleziono udc + if (allOk) + { + SelUDC = rawData; + tryLinkAlUdc(); + } + } } - - tryLinkAlUdc(); - break; default: @@ -332,7 +423,10 @@ namespace MP_MAG.WebUserControls private void tryLinkAlUdc() { - // verifica UDC ed al, se entrambi validi e LIBERI + // se sono qui entrambe sono LIBERE + + // FARE!!! check ordine + MagDataLayer.man.taEA2U.upsertQuery(SelUDC, SelPedana, 0); // se c'è già un associazione UDC con altro AL --> chiede rilettura @@ -348,6 +442,9 @@ namespace MP_MAG.WebUserControls if (!Page.IsPostBack) { SelPackList = 0; + SelPedana = ""; + SelUDC = ""; + LastUDC = ""; } // eventi barcode cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; diff --git a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.designer.cs index 7f4b6db..255f478 100644 --- a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.designer.cs +++ b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.designer.cs @@ -68,6 +68,15 @@ namespace MP_MAG.WebUserControls /// protected global::MP_MAG.WebUserControls.cmp_SelUdc cmp_SelUdc; + /// + /// Controllo hfLastUDC. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfLastUDC; + /// /// Controllo cmp_SelPedana. /// diff --git a/MP-MAG/WebUserControls/cmp_SelUdc.ascx b/MP-MAG/WebUserControls/cmp_SelUdc.ascx index b743591..24b4088 100644 --- a/MP-MAG/WebUserControls/cmp_SelUdc.ascx +++ b/MP-MAG/WebUserControls/cmp_SelUdc.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_SelUdc.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_SelUdc" %> +<%@ Register Src="~/WebUserControls/cmp_OrderListByUdc.ascx" TagPrefix="uc1" TagName="cmp_OrderListByUdc" %>
@@ -9,10 +10,11 @@
- dettaglio UDC? +
- \ No newline at end of file + + \ No newline at end of file diff --git a/MP-MAG/WebUserControls/cmp_SelUdc.ascx.cs b/MP-MAG/WebUserControls/cmp_SelUdc.ascx.cs index 008544e..a3ce9d5 100644 --- a/MP-MAG/WebUserControls/cmp_SelUdc.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_SelUdc.ascx.cs @@ -11,6 +11,21 @@ namespace MP_MAG.WebUserControls { #region Public Properties + public int PackListID + { + get + { + int answ = 0; + int.TryParse(hfPackListID.Value, out answ); + return answ; + } + set + { + hfPackListID.Value = $"{value}"; + cmp_OrderListByUdc.PackListID = value; + } + } + public string UDC { get @@ -21,9 +36,7 @@ namespace MP_MAG.WebUserControls { hfUDC.Value = value; lblUDC.Text = value; -#if false - cmp_OrderList.PackListID = value; -#endif + cmp_OrderListByUdc.UdcSel = value; } } @@ -35,6 +48,7 @@ namespace MP_MAG.WebUserControls { if (!Page.IsPostBack) { + PackListID = 0; UDC = ""; } } diff --git a/MP-MAG/WebUserControls/cmp_SelUdc.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_SelUdc.ascx.designer.cs index 3fc499f..93f3a15 100644 --- a/MP-MAG/WebUserControls/cmp_SelUdc.ascx.designer.cs +++ b/MP-MAG/WebUserControls/cmp_SelUdc.ascx.designer.cs @@ -32,6 +32,15 @@ namespace MP_MAG.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblUDC; + /// + /// Controllo cmp_OrderListByUdc. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_MAG.WebUserControls.cmp_OrderListByUdc cmp_OrderListByUdc; + /// /// Controllo hfUDC. /// @@ -40,5 +49,14 @@ namespace MP_MAG.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfUDC; + + /// + /// Controllo hfPackListID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfPackListID; } } diff --git a/MagData/DS_Mag.Designer.cs b/MagData/DS_Mag.Designer.cs index 272551b..6862ab1 100644 --- a/MagData/DS_Mag.Designer.cs +++ b/MagData/DS_Mag.Designer.cs @@ -38,6 +38,8 @@ namespace MagData { private AnagClientiDataTable tableAnagClienti; + private ElencoAL2UDCDataTable tableElencoAL2UDC; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -87,6 +89,9 @@ namespace MagData { if ((ds.Tables["AnagClienti"] != null)) { base.Tables.Add(new AnagClientiDataTable(ds.Tables["AnagClienti"])); } + if ((ds.Tables["ElencoAL2UDC"] != null)) { + base.Tables.Add(new ElencoAL2UDCDataTable(ds.Tables["ElencoAL2UDC"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -175,6 +180,16 @@ namespace MagData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ElencoAL2UDCDataTable ElencoAL2UDC { + get { + return this.tableElencoAL2UDC; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -263,6 +278,9 @@ namespace MagData { if ((ds.Tables["AnagClienti"] != null)) { base.Tables.Add(new AnagClientiDataTable(ds.Tables["AnagClienti"])); } + if ((ds.Tables["ElencoAL2UDC"] != null)) { + base.Tables.Add(new ElencoAL2UDCDataTable(ds.Tables["ElencoAL2UDC"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -338,6 +356,12 @@ namespace MagData { this.tableAnagClienti.InitVars(); } } + this.tableElencoAL2UDC = ((ElencoAL2UDCDataTable)(base.Tables["ElencoAL2UDC"])); + if ((initTable == true)) { + if ((this.tableElencoAL2UDC != null)) { + this.tableElencoAL2UDC.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -362,6 +386,8 @@ namespace MagData { base.Tables.Add(this.tableElencoAL); this.tableAnagClienti = new AnagClientiDataTable(); base.Tables.Add(this.tableAnagClienti); + this.tableElencoAL2UDC = new ElencoAL2UDCDataTable(); + base.Tables.Add(this.tableElencoAL2UDC); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -406,6 +432,12 @@ namespace MagData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeElencoAL2UDC() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -482,6 +514,9 @@ namespace MagData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void AnagClientiRowChangeEventHandler(object sender, AnagClientiRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ElencoAL2UDCRowChangeEventHandler(object sender, ElencoAL2UDCRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -3569,6 +3604,297 @@ namespace MagData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ElencoAL2UDCDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnAL; + + private global::System.Data.DataColumn columnUDC; + + private global::System.Data.DataColumn columnOrderListID; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCDataTable() { + this.TableName = "ElencoAL2UDC"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ElencoAL2UDCDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ElencoAL2UDCDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ALColumn { + get { + return this.columnAL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn UDCColumn { + get { + return this.columnUDC; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn OrderListIDColumn { + get { + return this.columnOrderListID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRow this[int index] { + get { + return ((ElencoAL2UDCRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoAL2UDCRowChangeEventHandler ElencoAL2UDCRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoAL2UDCRowChangeEventHandler ElencoAL2UDCRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoAL2UDCRowChangeEventHandler ElencoAL2UDCRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoAL2UDCRowChangeEventHandler ElencoAL2UDCRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddElencoAL2UDCRow(ElencoAL2UDCRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRow AddElencoAL2UDCRow(string AL, string UDC, int OrderListID) { + ElencoAL2UDCRow rowElencoAL2UDCRow = ((ElencoAL2UDCRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + AL, + UDC, + OrderListID}; + rowElencoAL2UDCRow.ItemArray = columnValuesArray; + this.Rows.Add(rowElencoAL2UDCRow); + return rowElencoAL2UDCRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRow FindByALUDC(string AL, string UDC) { + return ((ElencoAL2UDCRow)(this.Rows.Find(new object[] { + AL, + UDC}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ElencoAL2UDCDataTable cln = ((ElencoAL2UDCDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ElencoAL2UDCDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnAL = base.Columns["AL"]; + this.columnUDC = base.Columns["UDC"]; + this.columnOrderListID = base.Columns["OrderListID"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnAL = new global::System.Data.DataColumn("AL", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAL); + this.columnUDC = new global::System.Data.DataColumn("UDC", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnUDC); + this.columnOrderListID = new global::System.Data.DataColumn("OrderListID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrderListID); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnAL, + this.columnUDC}, true)); + this.columnAL.AllowDBNull = false; + this.columnAL.MaxLength = 50; + this.columnUDC.AllowDBNull = false; + this.columnUDC.MaxLength = 50; + this.columnOrderListID.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRow NewElencoAL2UDCRow() { + return ((ElencoAL2UDCRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ElencoAL2UDCRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ElencoAL2UDCRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ElencoAL2UDCRowChanged != null)) { + this.ElencoAL2UDCRowChanged(this, new ElencoAL2UDCRowChangeEvent(((ElencoAL2UDCRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ElencoAL2UDCRowChanging != null)) { + this.ElencoAL2UDCRowChanging(this, new ElencoAL2UDCRowChangeEvent(((ElencoAL2UDCRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ElencoAL2UDCRowDeleted != null)) { + this.ElencoAL2UDCRowDeleted(this, new ElencoAL2UDCRowChangeEvent(((ElencoAL2UDCRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ElencoAL2UDCRowDeleting != null)) { + this.ElencoAL2UDCRowDeleting(this, new ElencoAL2UDCRowChangeEvent(((ElencoAL2UDCRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveElencoAL2UDCRow(ElencoAL2UDCRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_Mag ds = new DS_Mag(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ElencoAL2UDCDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -5090,6 +5416,54 @@ namespace MagData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class ElencoAL2UDCRow : global::System.Data.DataRow { + + private ElencoAL2UDCDataTable tableElencoAL2UDC; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ElencoAL2UDCRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableElencoAL2UDC = ((ElencoAL2UDCDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string AL { + get { + return ((string)(this[this.tableElencoAL2UDC.ALColumn])); + } + set { + this[this.tableElencoAL2UDC.ALColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string UDC { + get { + return ((string)(this[this.tableElencoAL2UDC.UDCColumn])); + } + set { + this[this.tableElencoAL2UDC.UDCColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int OrderListID { + get { + return ((int)(this[this.tableElencoAL2UDC.OrderListIDColumn])); + } + set { + this[this.tableElencoAL2UDC.OrderListIDColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -5327,6 +5701,40 @@ namespace MagData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ElencoAL2UDCRowChangeEvent : global::System.EventArgs { + + private ElencoAL2UDCRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRowChangeEvent(ElencoAL2UDCRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace MagData.DS_MagTableAdapters { @@ -6897,7 +7305,7 @@ namespace MagData.DS_MagTableAdapters { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_ElencoAL"; @@ -6924,31 +7332,37 @@ namespace MagData.DS_MagTableAdapters { this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SearchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_EAL_insertQuery"; + this._commandCollection[4].CommandText = "dbo.stp_EAL_getByUDC"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DayRef", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_EAL_updatePList"; + this._commandCollection[5].CommandText = "dbo.stp_EAL_insertQuery"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AL", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DayRef", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_EAL_updateQuery"; + this._commandCollection[6].CommandText = "dbo.stp_EAL_updatePList"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AL", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Peso", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[7].Connection = this.Connection; + this._commandCollection[7].CommandText = "dbo.stp_EAL_updateQuery"; + this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AL", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Descr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Peso", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -7042,8 +7456,25 @@ namespace MagData.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Mag.ElencoALDataTable insertQuery(global::System.Nullable DayRef, string Flusso, string CodSoggetto, string Descr, global::System.Nullable PackListID, global::System.Nullable Tara) { + public virtual DS_Mag.ElencoALDataTable getByUdc(string UDC) { this.Adapter.SelectCommand = this.CommandCollection[4]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); + } + DS_Mag.ElencoALDataTable dataTable = new DS_Mag.ElencoALDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Mag.ElencoALDataTable insertQuery(global::System.Nullable DayRef, string Flusso, string CodSoggetto, string Descr, global::System.Nullable PackListID, global::System.Nullable Tara) { + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((DayRef.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(DayRef.Value)); } @@ -7089,7 +7520,7 @@ namespace MagData.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updatePList(string Original_AL, global::System.Nullable PackListID) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((Original_AL == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -7123,7 +7554,7 @@ namespace MagData.DS_MagTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQuery(string Original_AL, string Descr, global::System.Nullable Peso, global::System.Nullable Tara) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((Original_AL == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -7650,6 +8081,392 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ElencoAL2UDCTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoAL2UDCTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ElencoAL2UDC"; + tableMapping.ColumnMappings.Add("AL", "AL"); + tableMapping.ColumnMappings.Add("UDC", "UDC"); + tableMapping.ColumnMappings.Add("OrderListID", "OrderListID"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[ElencoAL2UDC] WHERE (([AL] = @Original_AL) AND ([UDC] = @Origi" + + "nal_UDC) AND ([OrderListID] = @Original_OrderListID))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AL", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderListID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderListID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ElencoAL2UDC] ([AL], [UDC], [OrderListID]) VALUES (@AL, @UDC, " + + "@OrderListID);\r\nSELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) A" + + "ND (UDC = @UDC)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderListID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderListID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ElencoAL2UDC] SET [AL] = @AL, [UDC] = @UDC, [OrderListID] = @OrderListID WHERE (([AL] = @Original_AL) AND ([UDC] = @Original_UDC) AND ([OrderListID] = @Original_OrderListID)); +SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderListID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderListID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AL", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UDC", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderListID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderListID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MagData.Properties.Settings.Default.MoonPro_MAGConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT * FROM dbo.ElencoAL2UDC"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_EA2U_upsertQuery"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_Mag.ElencoAL2UDCDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_Mag.ElencoAL2UDCDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_Mag.ElencoAL2UDCDataTable dataTable = new DS_Mag.ElencoAL2UDCDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Mag.ElencoAL2UDCDataTable upsertQuery(string UDC, string AL, global::System.Nullable OrderListID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); + } + if ((AL == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(AL)); + } + if ((OrderListID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(OrderListID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + DS_Mag.ElencoAL2UDCDataTable dataTable = new DS_Mag.ElencoAL2UDCDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_Mag.ElencoAL2UDCDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_Mag dataSet) { + return this.Adapter.Update(dataSet, "ElencoAL2UDC"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(string Original_AL, string Original_UDC, int Original_OrderListID) { + if ((Original_AL == null)) { + throw new global::System.ArgumentNullException("Original_AL"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_AL)); + } + if ((Original_UDC == null)) { + throw new global::System.ArgumentNullException("Original_UDC"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_UDC)); + } + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_OrderListID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string AL, string UDC, int OrderListID) { + if ((AL == null)) { + throw new global::System.ArgumentNullException("AL"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(AL)); + } + if ((UDC == null)) { + throw new global::System.ArgumentNullException("UDC"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(UDC)); + } + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(OrderListID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string AL, string UDC, int OrderListID, string Original_AL, string Original_UDC, int Original_OrderListID) { + if ((AL == null)) { + throw new global::System.ArgumentNullException("AL"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(AL)); + } + if ((UDC == null)) { + throw new global::System.ArgumentNullException("UDC"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(UDC)); + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(OrderListID)); + if ((Original_AL == null)) { + throw new global::System.ArgumentNullException("Original_AL"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_AL)); + } + if ((Original_UDC == null)) { + throw new global::System.ArgumentNullException("Original_UDC"); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_UDC)); + } + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_OrderListID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int OrderListID, string Original_AL, string Original_UDC, int Original_OrderListID) { + return this.Update(Original_AL, Original_UDC, OrderListID, Original_AL, Original_UDC, Original_OrderListID); + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -7664,6 +8481,8 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM private AnagClientiTableAdapter _anagClientiTableAdapter; + private ElencoAL2UDCTableAdapter _elencoAL2UDCTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -7693,6 +8512,20 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ElencoAL2UDCTableAdapter ElencoAL2UDCTableAdapter { + get { + return this._elencoAL2UDCTableAdapter; + } + set { + this._elencoAL2UDCTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -7716,6 +8549,10 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM && (this._anagClientiTableAdapter.Connection != null))) { return this._anagClientiTableAdapter.Connection; } + if (((this._elencoAL2UDCTableAdapter != null) + && (this._elencoAL2UDCTableAdapter.Connection != null))) { + return this._elencoAL2UDCTableAdapter.Connection; + } return null; } set { @@ -7732,6 +8569,9 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM if ((this._anagClientiTableAdapter != null)) { count = (count + 1); } + if ((this._elencoAL2UDCTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -7752,6 +8592,15 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM allChangedRows.AddRange(updatedRows); } } + if ((this._elencoAL2UDCTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ElencoAL2UDC.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._elencoAL2UDCTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -7770,6 +8619,14 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM allAddedRows.AddRange(addedRows); } } + if ((this._elencoAL2UDCTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ElencoAL2UDC.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._elencoAL2UDCTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -7780,6 +8637,14 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateDeletedRows(DS_Mag dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._elencoAL2UDCTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ElencoAL2UDC.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._elencoAL2UDCTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._anagClientiTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AnagClienti.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -7832,6 +8697,11 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } + if (((this._elencoAL2UDCTableAdapter != null) + && (this.MatchTableAdapterConnection(this._elencoAL2UDCTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + + "a stessa stringa di connessione."); + } global::System.Data.IDbConnection workConnection = this.Connection; if ((workConnection == null)) { throw new global::System.ApplicationException("TableAdapterManager non contiene informazioni di connessione. Impostare la propri" + @@ -7874,6 +8744,15 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM adaptersWithAcceptChangesDuringUpdate.Add(this._anagClientiTableAdapter.Adapter); } } + if ((this._elencoAL2UDCTableAdapter != null)) { + revertConnections.Add(this._elencoAL2UDCTableAdapter, this._elencoAL2UDCTableAdapter.Connection); + this._elencoAL2UDCTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._elencoAL2UDCTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._elencoAL2UDCTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._elencoAL2UDCTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._elencoAL2UDCTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -7936,6 +8815,10 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM this._anagClientiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._anagClientiTableAdapter])); this._anagClientiTableAdapter.Transaction = null; } + if ((this._elencoAL2UDCTableAdapter != null)) { + this._elencoAL2UDCTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._elencoAL2UDCTableAdapter])); + this._elencoAL2UDCTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/MagData/DS_Mag.xsd b/MagData/DS_Mag.xsd index c44614c..f81717c 100644 --- a/MagData/DS_Mag.xsd +++ b/MagData/DS_Mag.xsd @@ -412,6 +412,17 @@ FROM dbo.ElencoPost2Queue + + + + dbo.stp_EAL_getByUDC + + + + + + + @@ -529,6 +540,73 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + + + + + DELETE FROM [dbo].[ElencoAL2UDC] WHERE (([AL] = @Original_AL) AND ([UDC] = @Original_UDC) AND ([OrderListID] = @Original_OrderListID)) + + + + + + + + + + INSERT INTO [dbo].[ElencoAL2UDC] ([AL], [UDC], [OrderListID]) VALUES (@AL, @UDC, @OrderListID); +SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC) + + + + + + + + + + SELECT * FROM dbo.ElencoAL2UDC + + + + + + UPDATE [dbo].[ElencoAL2UDC] SET [AL] = @AL, [UDC] = @UDC, [OrderListID] = @OrderListID WHERE (([AL] = @Original_AL) AND ([UDC] = @Original_UDC) AND ([OrderListID] = @Original_OrderListID)); +SELECT AL, UDC, OrderListID FROM ElencoAL2UDC WHERE (AL = @AL) AND (UDC = @UDC) + + + + + + + + + + + + + + + + + + + + + + dbo.stp_EA2U_upsertQuery + + + + + + + + + + + @@ -972,6 +1050,27 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + + + + + + + + + + + + + + + + + + + + @@ -1002,5 +1101,10 @@ SELECT CodCliente, RagSociale, Indirizzo, Localita, Cap, Provincia, Nazione FROM + + + + + \ No newline at end of file diff --git a/MagData/DS_Mag.xss b/MagData/DS_Mag.xss index ac5002f..da964cc 100644 --- a/MagData/DS_Mag.xss +++ b/MagData/DS_Mag.xss @@ -11,7 +11,7 @@ - + diff --git a/MagData/DS_PackList.Designer.cs b/MagData/DS_PackList.Designer.cs index d3d4f42..426c7bf 100644 --- a/MagData/DS_PackList.Designer.cs +++ b/MagData/DS_PackList.Designer.cs @@ -2647,7 +2647,7 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_OrdersList"; @@ -2660,28 +2660,35 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_OrdList_getByPLID"; + this._commandCollection[2].CommandText = "dbo.stp_OrdList_getByPL_UDC"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_OrdList_insertQuery"; + this._commandCollection[3].CommandText = "dbo.stp_OrdList_getByPLID"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExtOrdCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_OrdList_updateQuery"; + this._commandCollection[4].CommandText = "dbo.stp_OrdList_insertQuery"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExtOrdCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "dbo.stp_OrdList_updateQuery"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qty", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrdDescr", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -2712,7 +2719,7 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_PackList.OrdersListDataTable getByPLID(global::System.Nullable PackListID) { + public virtual DS_PackList.OrdersListDataTable getByPL_UDC(global::System.Nullable PackListID, string UDC) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((PackListID.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(PackListID.Value)); @@ -2720,6 +2727,29 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(UDC)); + } + DS_PackList.OrdersListDataTable dataTable = new DS_PackList.OrdersListDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_PackList.OrdersListDataTable getByPLID(global::System.Nullable PackListID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((PackListID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(PackListID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } DS_PackList.OrdersListDataTable dataTable = new DS_PackList.OrdersListDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -2925,7 +2955,7 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(global::System.Nullable PackListID, string ExtOrdCod, string CodArt, string OrdDescr, global::System.Nullable Qty) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; if ((PackListID.HasValue == true)) { command.Parameters[1].Value = ((int)(PackListID.Value)); } @@ -2977,7 +3007,7 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQuery(global::System.Nullable Original_OrderListID, global::System.Nullable Qty, string OrdDescr) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((Original_OrderListID.HasValue == true)) { command.Parameters[1].Value = ((int)(Original_OrderListID.Value)); } diff --git a/MagData/DS_PackList.xsd b/MagData/DS_PackList.xsd index 2d057a8..5504498 100644 --- a/MagData/DS_PackList.xsd +++ b/MagData/DS_PackList.xsd @@ -179,6 +179,18 @@ SELECT OrderListID, ExtOrdCod, DueDate, CodArt, PackListID, Qty, OrdDescr FROM O + + + + dbo.stp_OrdList_getByPL_UDC + + + + + + + + diff --git a/MagData/DS_PackList.xss b/MagData/DS_PackList.xss index 27a1eb8..0f0fa3e 100644 --- a/MagData/DS_PackList.xss +++ b/MagData/DS_PackList.xss @@ -6,8 +6,8 @@ --> - - + + diff --git a/MagData/MagDataLayer.cs b/MagData/MagDataLayer.cs index 9bd90e7..1b5c776 100644 --- a/MagData/MagDataLayer.cs +++ b/MagData/MagDataLayer.cs @@ -30,6 +30,7 @@ namespace MagData public DS_ReportTableAdapters.stp_prt_CartellinoFinitiOdetteTableAdapter taCFOdette; public DS_ReportTableAdapters.stp_prt_CartellinoPedaneTableAdapter taCPed; public DS_ReportTableAdapters.stp_prt_CartellinoSemilavoratiTableAdapter taCSemil; + public DS_MagTableAdapters.ElencoAL2UDCTableAdapter taEA2U; public DS_MagTableAdapters.ElencoALTableAdapter taEAL; public DS_MagTableAdapters.ElencoLottiTableAdapter taEL; public DS_PackListTableAdapters.ExtOrdersListTableAdapter taEOL; @@ -180,6 +181,7 @@ namespace MagData taCSemil = new DS_ReportTableAdapters.stp_prt_CartellinoSemilavoratiTableAdapter(); taAA = new DS_MagTableAdapters.AnagArtTableAdapter(); + taEA2U = new DS_MagTableAdapters.ElencoAL2UDCTableAdapter(); taEAL = new DS_MagTableAdapters.ElencoALTableAdapter(); taEL = new DS_MagTableAdapters.ElencoLottiTableAdapter(); taEP2Q = new DS_MagTableAdapters.Elencopost2QueueTableAdapter(); @@ -201,6 +203,7 @@ namespace MagData taCSemil.Connection.ConnectionString = connString; taAA.Connection.ConnectionString = connString; + taEA2U.Connection.ConnectionString = connString; taEAL.Connection.ConnectionString = connString; taEL.Connection.ConnectionString = connString; taEP2Q.Connection.ConnectionString = connString;