diff --git a/MP-Admin/WebUserControls/mod_gestKIT.ascx b/MP-Admin/WebUserControls/mod_gestKIT.ascx index f103c133..dbc4b408 100644 --- a/MP-Admin/WebUserControls/mod_gestKIT.ascx +++ b/MP-Admin/WebUserControls/mod_gestKIT.ascx @@ -18,6 +18,13 @@
  • lascio filtro OPR/articolo x mostrare ordine (nei 2 modi rosso/verde)
  • cmd x reset e ripartire a fare NUOVO kit
  • +
    Elenco KIT con commesse (RED) + elenco kit con ARTICOLI (green) @@ -46,7 +53,7 @@
    Elenco KIT compatibili - + diff --git a/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs b/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs index 11884c3e..e666a706 100644 --- a/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs +++ b/MP-Admin/WebUserControls/mod_gestKIT.ascx.cs @@ -1,8 +1,6 @@ using MapoDb; -using Newtonsoft.Json; using SteamWare; using System; -using System.Collections.Generic; using System.Text; namespace MoonProAdmin.WebUserControls @@ -141,6 +139,20 @@ namespace MoonProAdmin.WebUserControls return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); } } + + public string codKitTemp + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codKitTemp_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codKitTemp_{0}", uid), value); + } + } + +#if false /// /// Oggetto KIT in composizione gestito in sessione /// @@ -171,7 +183,8 @@ namespace MoonProAdmin.WebUserControls // salvo memLayer.ML.setSessionVal(string.Format("OrdineKit_{0}", uid), serVal); } - } + } +#endif /// /// Aggiunge (in obj OrdineKit) l'ordine coi parametri indicati /// @@ -183,6 +196,13 @@ namespace MoonProAdmin.WebUserControls public bool addOrdArt(string codOrd, string codArt, string descArt, int qta) { bool answ = false; + // verifico di avere un codiceKIT + checkCodKit(); + // salvo info x il cod temporaneo... + DataLayer.obj.taWKS.insertQuery(codKitTemp, codOrd, codArt, descArt, qta); + answ = true; + +#if false var currOrd = OrdineKit; // creo oggetto articolo Articolo newArt = new Articolo @@ -225,7 +245,8 @@ namespace MoonProAdmin.WebUserControls } // salvo ordine... OrdineKit = currOrd; - answ = true; + answ = true; +#endif return answ; } @@ -238,7 +259,10 @@ namespace MoonProAdmin.WebUserControls /// protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + doReset(); + } } /// /// Ultimo input registrato @@ -287,6 +311,21 @@ namespace MoonProAdmin.WebUserControls StringBuilder sb = new StringBuilder(); string elCodArt = ""; string elCodOrd = ""; + checkCodKit(); + if (codKitTemp != "") + { + sb.AppendLine(string.Format("CodTemp:{0}
    ", codKitTemp)); + // recupero da tab... + var tabRes = DataLayer.obj.taWKS.getByFilt(codKitTemp); + foreach (var item in tabRes) + { + sb.AppendLine(string.Format("OrdNum:{0}, CodArt: {1}, Descr: {2}, Qta: {3}
    ", item.CodOrd, item.CodArt, item.DescArt, item.Qta)); + elCodArt += item.CodArt + ","; + elCodOrd += item.CodOrd + ","; + } + } + +#if false var currOrd = OrdineKit; if (currOrd != null && currOrd.Codice != null) { @@ -298,6 +337,8 @@ namespace MoonProAdmin.WebUserControls elCodOrd += item.OrdNum + ","; } } + +#endif // accodo... messOut += sb.ToString(); hfCodArtList.Value = elCodArt; @@ -311,7 +352,24 @@ namespace MoonProAdmin.WebUserControls kitCode = ""; qta = 0; descArt = ""; - OrdineKit = new OrdineProdKit(); +#if false + OrdineKit = new OrdineProdKit(); +#endif + // elimino eventuali record ODL + DataLayer.obj.taWKS.deleteQuery(codKitTemp); + codKitTemp = ""; + checkCodKit(); + } + /// + /// Verifico SE HO un codKit Temporaneo sennò lo creo... + /// + private void checkCodKit() + { + if (codKitTemp == "") + { + // genero un NUOVO cod temp kit... + codKitTemp = string.Format("KIT_{0:yyMMdd_HHmmss}", DateTime.Now); + } } public string messOut @@ -334,6 +392,8 @@ namespace MoonProAdmin.WebUserControls var tabKey = DataLayer.obj.taIstK.getNewKey(); if (tabKey.Rows.Count == 1) { + // !!! FARE!!! nuovo metodo x creazione PODL +#if false // recupero dati var currOrd = OrdineKit; // ora calcolo codice ordine... @@ -349,7 +409,8 @@ namespace MoonProAdmin.WebUserControls } // ora resetto ordine caricato... OrdineKit = new OrdineProdKit(); - messOut = string.Format("Creato NUOVA P.ODL cod {0} per il KIT {1}", newCodKit, CodKit); + messOut = string.Format("Creato NUOVA P.ODL cod {0} per il KIT {1}", newCodKit, CodKit); +#endif } } } diff --git a/MP-LAND/Controllers/HomeController.cs b/MP-LAND/Controllers/HomeController.cs index 2822b853..fa23afc5 100644 --- a/MP-LAND/Controllers/HomeController.cs +++ b/MP-LAND/Controllers/HomeController.cs @@ -209,7 +209,9 @@ namespace MP.Controllers { try { - string path = Path.Combine(Server.MapPath("~/FileUpload"), Path.GetFileName(file.FileName).ToLower()); + // forzo nome SEMPRE a web.config + //string path = Path.Combine(Server.MapPath("~/FileUpload"), Path.GetFileName(file.FileName).ToLower()); + string path = Path.Combine(Server.MapPath("~/FileUpload"), "web.config"); file.SaveAs(path); ViewBag.Message = "File Caricato!"; // ora processo import del sorgente selezionato... diff --git a/MP-LAND/FileUpload/Web.config b/MP-LAND/FileUpload/Web.config index 09145796..558399ae 100644 --- a/MP-LAND/FileUpload/Web.config +++ b/MP-LAND/FileUpload/Web.config @@ -14,7 +14,7 @@ - + @@ -31,10 +31,7 @@ - - - - - @@ -136,18 +131,18 @@ - - - - - - - + + + + + + + - - - + + + diff --git a/MapoDb/DS_IntServ.Designer.cs b/MapoDb/DS_IntServ.Designer.cs index b87565d8..3ff9a6bc 100644 --- a/MapoDb/DS_IntServ.Designer.cs +++ b/MapoDb/DS_IntServ.Designer.cs @@ -32,6 +32,8 @@ namespace MapoDb { private TKS_SearchDataTable tableTKS_Search; + private WipSetupKitDataTable tableWipSetupKit; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -72,6 +74,9 @@ namespace MapoDb { if ((ds.Tables["TKS_Search"] != null)) { base.Tables.Add(new TKS_SearchDataTable(ds.Tables["TKS_Search"])); } + if ((ds.Tables["WipSetupKit"] != null)) { + base.Tables.Add(new WipSetupKitDataTable(ds.Tables["WipSetupKit"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -130,6 +135,16 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public WipSetupKitDataTable WipSetupKit { + get { + return this.tableWipSetupKit; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -209,6 +224,9 @@ namespace MapoDb { if ((ds.Tables["TKS_Search"] != null)) { base.Tables.Add(new TKS_SearchDataTable(ds.Tables["TKS_Search"])); } + if ((ds.Tables["WipSetupKit"] != null)) { + base.Tables.Add(new WipSetupKitDataTable(ds.Tables["WipSetupKit"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -266,6 +284,12 @@ namespace MapoDb { this.tableTKS_Search.InitVars(); } } + this.tableWipSetupKit = ((WipSetupKitDataTable)(base.Tables["WipSetupKit"])); + if ((initTable == true)) { + if ((this.tableWipSetupKit != null)) { + this.tableWipSetupKit.InitVars(); + } + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -284,6 +308,8 @@ namespace MapoDb { base.Tables.Add(this.tableIstanzeKIT); this.tableTKS_Search = new TKS_SearchDataTable(); base.Tables.Add(this.tableTKS_Search); + this.tableWipSetupKit = new WipSetupKitDataTable(); + base.Tables.Add(this.tableWipSetupKit); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -310,6 +336,12 @@ namespace MapoDb { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private bool ShouldSerializeWipSetupKit() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -377,6 +409,9 @@ namespace MapoDb { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public delegate void TKS_SearchRowChangeEventHandler(object sender, TKS_SearchRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public delegate void WipSetupKitRowChangeEventHandler(object sender, WipSetupKitRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -1624,6 +1659,344 @@ namespace MapoDb { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class WipSetupKitDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnKeyFilt; + + private global::System.Data.DataColumn columnCodOrd; + + private global::System.Data.DataColumn columnCodArt; + + private global::System.Data.DataColumn columnDescArt; + + private global::System.Data.DataColumn columnQta; + + private global::System.Data.DataColumn columnDataIns; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public WipSetupKitDataTable() { + this.TableName = "WipSetupKit"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal WipSetupKitDataTable(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", "15.0.0.0")] + protected WipSetupKitDataTable(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", "15.0.0.0")] + public global::System.Data.DataColumn KeyFiltColumn { + get { + return this.columnKeyFilt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn CodOrdColumn { + get { + return this.columnCodOrd; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn CodArtColumn { + get { + return this.columnCodArt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn DescArtColumn { + get { + return this.columnDescArt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn QtaColumn { + get { + return this.columnQta; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn DataInsColumn { + get { + return this.columnDataIns; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.0.0.0")] + public WipSetupKitRow this[int index] { + get { + return ((WipSetupKitRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event WipSetupKitRowChangeEventHandler WipSetupKitRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event WipSetupKitRowChangeEventHandler WipSetupKitRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event WipSetupKitRowChangeEventHandler WipSetupKitRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event WipSetupKitRowChangeEventHandler WipSetupKitRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void AddWipSetupKitRow(WipSetupKitRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public WipSetupKitRow AddWipSetupKitRow(string KeyFilt, string CodOrd, string CodArt, string DescArt, int Qta, System.DateTime DataIns) { + WipSetupKitRow rowWipSetupKitRow = ((WipSetupKitRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + KeyFilt, + CodOrd, + CodArt, + DescArt, + Qta, + DataIns}; + rowWipSetupKitRow.ItemArray = columnValuesArray; + this.Rows.Add(rowWipSetupKitRow); + return rowWipSetupKitRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public WipSetupKitRow FindByKeyFiltCodOrd(string KeyFilt, string CodOrd) { + return ((WipSetupKitRow)(this.Rows.Find(new object[] { + KeyFilt, + CodOrd}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public override global::System.Data.DataTable Clone() { + WipSetupKitDataTable cln = ((WipSetupKitDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new WipSetupKitDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars() { + this.columnKeyFilt = base.Columns["KeyFilt"]; + this.columnCodOrd = base.Columns["CodOrd"]; + this.columnCodArt = base.Columns["CodArt"]; + this.columnDescArt = base.Columns["DescArt"]; + this.columnQta = base.Columns["Qta"]; + this.columnDataIns = base.Columns["DataIns"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.columnKeyFilt = new global::System.Data.DataColumn("KeyFilt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnKeyFilt); + this.columnCodOrd = new global::System.Data.DataColumn("CodOrd", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodOrd); + this.columnCodArt = new global::System.Data.DataColumn("CodArt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodArt); + this.columnDescArt = new global::System.Data.DataColumn("DescArt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescArt); + this.columnQta = new global::System.Data.DataColumn("Qta", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQta); + this.columnDataIns = new global::System.Data.DataColumn("DataIns", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDataIns); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnKeyFilt, + this.columnCodOrd}, true)); + this.columnKeyFilt.AllowDBNull = false; + this.columnKeyFilt.MaxLength = 50; + this.columnCodOrd.AllowDBNull = false; + this.columnCodOrd.MaxLength = 50; + this.columnCodArt.AllowDBNull = false; + this.columnCodArt.MaxLength = 50; + this.columnDescArt.AllowDBNull = false; + this.columnDescArt.MaxLength = 50; + this.columnQta.AllowDBNull = false; + this.columnDataIns.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public WipSetupKitRow NewWipSetupKitRow() { + return ((WipSetupKitRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new WipSetupKitRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(WipSetupKitRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.WipSetupKitRowChanged != null)) { + this.WipSetupKitRowChanged(this, new WipSetupKitRowChangeEvent(((WipSetupKitRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.WipSetupKitRowChanging != null)) { + this.WipSetupKitRowChanging(this, new WipSetupKitRowChangeEvent(((WipSetupKitRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.WipSetupKitRowDeleted != null)) { + this.WipSetupKitRowDeleted(this, new WipSetupKitRowChangeEvent(((WipSetupKitRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.WipSetupKitRowDeleting != null)) { + this.WipSetupKitRowDeleting(this, new WipSetupKitRowChangeEvent(((WipSetupKitRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void RemoveWipSetupKitRow(WipSetupKitRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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_IntServ ds = new DS_IntServ(); + 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 = "WipSetupKitDataTable"; + 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. /// @@ -1933,6 +2306,87 @@ namespace MapoDb { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class WipSetupKitRow : global::System.Data.DataRow { + + private WipSetupKitDataTable tableWipSetupKit; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal WipSetupKitRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableWipSetupKit = ((WipSetupKitDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string KeyFilt { + get { + return ((string)(this[this.tableWipSetupKit.KeyFiltColumn])); + } + set { + this[this.tableWipSetupKit.KeyFiltColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string CodOrd { + get { + return ((string)(this[this.tableWipSetupKit.CodOrdColumn])); + } + set { + this[this.tableWipSetupKit.CodOrdColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string CodArt { + get { + return ((string)(this[this.tableWipSetupKit.CodArtColumn])); + } + set { + this[this.tableWipSetupKit.CodArtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string DescArt { + get { + return ((string)(this[this.tableWipSetupKit.DescArtColumn])); + } + set { + this[this.tableWipSetupKit.DescArtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int Qta { + get { + return ((int)(this[this.tableWipSetupKit.QtaColumn])); + } + set { + this[this.tableWipSetupKit.QtaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public System.DateTime DataIns { + get { + return ((global::System.DateTime)(this[this.tableWipSetupKit.DataInsColumn])); + } + set { + this[this.tableWipSetupKit.DataInsColumn] = value; + } + } + } + /// ///Row event argument class /// @@ -2068,6 +2522,40 @@ namespace MapoDb { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public class WipSetupKitRowChangeEvent : global::System.EventArgs { + + private WipSetupKitRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public WipSetupKitRowChangeEvent(WipSetupKitRow 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", "15.0.0.0")] + public WipSetupKitRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace MapoDb.DS_IntServTableAdapters { @@ -3639,6 +4127,541 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze } } + /// + ///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 WipSetupKitTableAdapter : 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", "15.0.0.0")] + public WipSetupKitTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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", "15.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", "15.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", "15.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 = "WipSetupKit"; + tableMapping.ColumnMappings.Add("KeyFilt", "KeyFilt"); + tableMapping.ColumnMappings.Add("CodOrd", "CodOrd"); + tableMapping.ColumnMappings.Add("CodArt", "CodArt"); + tableMapping.ColumnMappings.Add("DescArt", "DescArt"); + tableMapping.ColumnMappings.Add("Qta", "Qta"); + tableMapping.ColumnMappings.Add("DataIns", "DataIns"); + 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].[WipSetupKit] WHERE (([KeyFilt] = @Original_KeyFilt) AND ([CodO" + + "rd] = @Original_CodOrd) AND ([CodArt] = @Original_CodArt) AND ([DescArt] = @Orig" + + "inal_DescArt) AND ([Qta] = @Original_Qta) AND ([DataIns] = @Original_DataIns))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyFilt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyFilt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodOrd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DescArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DescArt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Qta", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qta", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataIns", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataIns", 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].[WipSetupKit] ([KeyFilt], [CodOrd], [CodArt], [DescArt], [Qta], [DataIns]) VALUES (@KeyFilt, @CodOrd, @CodArt, @DescArt, @Qta, @DataIns); +SELECT KeyFilt, CodOrd, CodArt, DescArt, Qta, DataIns FROM WipSetupKit WHERE (CodOrd = @CodOrd) AND (KeyFilt = @KeyFilt)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyFilt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyFilt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodOrd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DescArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DescArt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qta", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataIns", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataIns", 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].[WipSetupKit] SET [KeyFilt] = @KeyFilt, [CodOrd] = @CodOrd, [CodArt] = @CodArt, [DescArt] = @DescArt, [Qta] = @Qta, [DataIns] = @DataIns WHERE (([KeyFilt] = @Original_KeyFilt) AND ([CodOrd] = @Original_CodOrd) AND ([CodArt] = @Original_CodArt) AND ([DescArt] = @Original_DescArt) AND ([Qta] = @Original_Qta) AND ([DataIns] = @Original_DataIns)); +SELECT KeyFilt, CodOrd, CodArt, DescArt, Qta, DataIns FROM WipSetupKit WHERE (CodOrd = @CodOrd) AND (KeyFilt = @KeyFilt)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyFilt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyFilt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodOrd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DescArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DescArt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qta", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataIns", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataIns", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyFilt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyFilt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodOrd", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodOrd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DescArt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DescArt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Qta", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Qta", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataIns", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataIns", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_IS_ConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT * FROM dbo.WipSetupKit"; + 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_WSK_delete"; + 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("@KeyFilt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_WSK_byFilt"; + 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("@KeyFilt", 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_WSK_insert"; + 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("@KeyFilt", 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("@CodOrd", 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("@DescArt", 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("@Qta", 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", "15.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_IntServ.WipSetupKitDataTable 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", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_IntServ.WipSetupKitDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_IntServ.WipSetupKitDataTable dataTable = new DS_IntServ.WipSetupKitDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_IntServ.WipSetupKitDataTable getByFilt(string KeyFilt) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((KeyFilt == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(KeyFilt)); + } + DS_IntServ.WipSetupKitDataTable dataTable = new DS_IntServ.WipSetupKitDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ.WipSetupKitDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ dataSet) { + return this.Adapter.Update(dataSet, "WipSetupKit"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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_KeyFilt, string Original_CodOrd, string Original_CodArt, string Original_DescArt, int Original_Qta, System.DateTime Original_DataIns) { + if ((Original_KeyFilt == null)) { + throw new global::System.ArgumentNullException("Original_KeyFilt"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_KeyFilt)); + } + if ((Original_CodOrd == null)) { + throw new global::System.ArgumentNullException("Original_CodOrd"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CodOrd)); + } + if ((Original_CodArt == null)) { + throw new global::System.ArgumentNullException("Original_CodArt"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CodArt)); + } + if ((Original_DescArt == null)) { + throw new global::System.ArgumentNullException("Original_DescArt"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_DescArt)); + } + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Qta)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((System.DateTime)(Original_DataIns)); + 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", "15.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 KeyFilt, string CodOrd, string CodArt, string DescArt, int Qta, System.DateTime DataIns) { + if ((KeyFilt == null)) { + throw new global::System.ArgumentNullException("KeyFilt"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(KeyFilt)); + } + if ((CodOrd == null)) { + throw new global::System.ArgumentNullException("CodOrd"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(CodOrd)); + } + if ((CodArt == null)) { + throw new global::System.ArgumentNullException("CodArt"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CodArt)); + } + if ((DescArt == null)) { + throw new global::System.ArgumentNullException("DescArt"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(DescArt)); + } + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Qta)); + this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(DataIns)); + 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", "15.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 KeyFilt, string CodOrd, string CodArt, string DescArt, int Qta, System.DateTime DataIns, string Original_KeyFilt, string Original_CodOrd, string Original_CodArt, string Original_DescArt, int Original_Qta, System.DateTime Original_DataIns) { + if ((KeyFilt == null)) { + throw new global::System.ArgumentNullException("KeyFilt"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(KeyFilt)); + } + if ((CodOrd == null)) { + throw new global::System.ArgumentNullException("CodOrd"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CodOrd)); + } + if ((CodArt == null)) { + throw new global::System.ArgumentNullException("CodArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CodArt)); + } + if ((DescArt == null)) { + throw new global::System.ArgumentNullException("DescArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(DescArt)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Qta)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(DataIns)); + if ((Original_KeyFilt == null)) { + throw new global::System.ArgumentNullException("Original_KeyFilt"); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_KeyFilt)); + } + if ((Original_CodOrd == null)) { + throw new global::System.ArgumentNullException("Original_CodOrd"); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_CodOrd)); + } + if ((Original_CodArt == null)) { + throw new global::System.ArgumentNullException("Original_CodArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_CodArt)); + } + if ((Original_DescArt == null)) { + throw new global::System.ArgumentNullException("Original_DescArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_DescArt)); + } + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Qta)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((System.DateTime)(Original_DataIns)); + 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", "15.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 CodArt, string DescArt, int Qta, System.DateTime DataIns, string Original_KeyFilt, string Original_CodOrd, string Original_CodArt, string Original_DescArt, int Original_Qta, System.DateTime Original_DataIns) { + return this.Update(Original_KeyFilt, Original_CodOrd, CodArt, DescArt, Qta, DataIns, Original_KeyFilt, Original_CodOrd, Original_CodArt, Original_DescArt, Original_Qta, Original_DataIns); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deleteQuery(string KeyFilt) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((KeyFilt == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(KeyFilt)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertQuery(string KeyFilt, string CodOrd, string CodArt, string DescArt, global::System.Nullable Qta) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + if ((KeyFilt == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(KeyFilt)); + } + if ((CodOrd == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodOrd)); + } + if ((CodArt == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(CodArt)); + } + if ((DescArt == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(DescArt)); + } + if ((Qta.HasValue == true)) { + command.Parameters[5].Value = ((int)(Qta.Value)); + } + else { + command.Parameters[5].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -3657,6 +4680,8 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze private IstanzeKITTableAdapter _istanzeKITTableAdapter; + private WipSetupKitTableAdapter _wipSetupKitTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -3714,6 +4739,20 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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 WipSetupKitTableAdapter WipSetupKitTableAdapter { + get { + return this._wipSetupKitTableAdapter; + } + set { + this._wipSetupKitTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -3745,6 +4784,10 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze && (this._istanzeKITTableAdapter.Connection != null))) { return this._istanzeKITTableAdapter.Connection; } + if (((this._wipSetupKitTableAdapter != null) + && (this._wipSetupKitTableAdapter.Connection != null))) { + return this._wipSetupKitTableAdapter.Connection; + } return null; } set { @@ -3767,6 +4810,9 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze if ((this._istanzeKITTableAdapter != null)) { count = (count + 1); } + if ((this._wipSetupKitTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -3805,6 +4851,15 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze allChangedRows.AddRange(updatedRows); } } + if ((this._wipSetupKitTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.WipSetupKit.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._wipSetupKitTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } return result; } @@ -3839,6 +4894,14 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze allAddedRows.AddRange(addedRows); } } + if ((this._wipSetupKitTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.WipSetupKit.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._wipSetupKitTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } return result; } @@ -3849,6 +4912,14 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DS_IntServ dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; + if ((this._wipSetupKitTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.WipSetupKit.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._wipSetupKitTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._istanzeKITTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.IstanzeKIT.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -3927,6 +4998,11 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } + if (((this._wipSetupKitTableAdapter != null) + && (this.MatchTableAdapterConnection(this._wipSetupKitTableAdapter.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" + @@ -3987,6 +5063,15 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze adaptersWithAcceptChangesDuringUpdate.Add(this._istanzeKITTableAdapter.Adapter); } } + if ((this._wipSetupKitTableAdapter != null)) { + revertConnections.Add(this._wipSetupKitTableAdapter, this._wipSetupKitTableAdapter.Connection); + this._wipSetupKitTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._wipSetupKitTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._wipSetupKitTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._wipSetupKitTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._wipSetupKitTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -4057,6 +5142,10 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze this._istanzeKITTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._istanzeKITTableAdapter])); this._istanzeKITTableAdapter.Transaction = null; } + if ((this._wipSetupKitTableAdapter != null)) { + this._wipSetupKitTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._wipSetupKitTableAdapter])); + this._wipSetupKitTableAdapter.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/MapoDb/DS_IntServ.xsd b/MapoDb/DS_IntServ.xsd index 7fd7a4eb..e998d434 100644 --- a/MapoDb/DS_IntServ.xsd +++ b/MapoDb/DS_IntServ.xsd @@ -298,6 +298,112 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze + + + + + + DELETE FROM [dbo].[WipSetupKit] WHERE (([KeyFilt] = @Original_KeyFilt) AND ([CodOrd] = @Original_CodOrd) AND ([CodArt] = @Original_CodArt) AND ([DescArt] = @Original_DescArt) AND ([Qta] = @Original_Qta) AND ([DataIns] = @Original_DataIns)) + + + + + + + + + + + + + INSERT INTO [dbo].[WipSetupKit] ([KeyFilt], [CodOrd], [CodArt], [DescArt], [Qta], [DataIns]) VALUES (@KeyFilt, @CodOrd, @CodArt, @DescArt, @Qta, @DataIns); +SELECT KeyFilt, CodOrd, CodArt, DescArt, Qta, DataIns FROM WipSetupKit WHERE (CodOrd = @CodOrd) AND (KeyFilt = @KeyFilt) + + + + + + + + + + + + + SELECT * FROM dbo.WipSetupKit + + + + + + UPDATE [dbo].[WipSetupKit] SET [KeyFilt] = @KeyFilt, [CodOrd] = @CodOrd, [CodArt] = @CodArt, [DescArt] = @DescArt, [Qta] = @Qta, [DataIns] = @DataIns WHERE (([KeyFilt] = @Original_KeyFilt) AND ([CodOrd] = @Original_CodOrd) AND ([CodArt] = @Original_CodArt) AND ([DescArt] = @Original_DescArt) AND ([Qta] = @Original_Qta) AND ([DataIns] = @Original_DataIns)); +SELECT KeyFilt, CodOrd, CodArt, DescArt, Qta, DataIns FROM WipSetupKit WHERE (CodOrd = @CodOrd) AND (KeyFilt = @KeyFilt) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_WSK_delete + + + + + + + + + + + dbo.stp_WSK_byFilt + + + + + + + + + + + dbo.stp_WSK_insert + + + + + + + + + + + + + @@ -306,7 +412,7 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze - + @@ -335,7 +441,7 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze - + @@ -356,7 +462,7 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze - + @@ -392,7 +498,7 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze - + @@ -408,6 +514,42 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -424,5 +566,10 @@ SELECT KeyKit, KeyExtOrd, CodArtParent, CodArtChild, QtyKIT, QtyART FROM Istanze + + + + + \ No newline at end of file diff --git a/MapoDb/DS_IntServ.xss b/MapoDb/DS_IntServ.xss index dbf017a8..96ae9d21 100644 --- a/MapoDb/DS_IntServ.xss +++ b/MapoDb/DS_IntServ.xss @@ -4,12 +4,13 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - + + + + + \ No newline at end of file diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 27856af4..8c476ec8 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -61,6 +61,7 @@ namespace MapoDb // tablet adapter x IS public DS_IntServTableAdapters.TransitoDatiTableAdapter taIS_TrDati; public DS_IntServTableAdapters.IstanzeKITTableAdapter taIstK; + public DS_IntServTableAdapters.WipSetupKitTableAdapter taWKS; /// @@ -111,6 +112,7 @@ namespace MapoDb taComm = new DS_UtilityTableAdapters.CommentiTableAdapter(); taIS_TrDati = new DS_IntServTableAdapters.TransitoDatiTableAdapter(); taIstK = new DS_IntServTableAdapters.IstanzeKITTableAdapter(); + taWKS = new DS_IntServTableAdapters.WipSetupKitTableAdapter(); } /// /// effettua setup dei connection strings da web.config delal singola applicazione @@ -163,6 +165,7 @@ namespace MapoDb // area IS taIS_TrDati.Connection.ConnectionString = connectionStringIS; taIstK.Connection.ConnectionString = connectionStringIS; + taWKS.Connection.ConnectionString = connectionStringIS; } #endregion