From 8a6856fc26b2f86e340f22da23ebf48134552311 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 9 Dec 2020 14:20:26 +0100 Subject: [PATCH 1/5] Aggiunta nuovo DS x MAG --- MapoDb/DS_MAG.Designer.cs | 2014 +++++++++++++++++++++++++++++++++++++ MapoDb/DS_MAG.xsc | 9 + MapoDb/DS_MAG.xsd | 208 ++++ MapoDb/DS_MAG.xss | 1 + MapoDb/DataLayer.cs | 4 + MapoDb/MapoDb.csproj | 20 +- MapoDb/app.config | 30 +- 7 files changed, 2274 insertions(+), 12 deletions(-) create mode 100644 MapoDb/DS_MAG.Designer.cs create mode 100644 MapoDb/DS_MAG.xsc create mode 100644 MapoDb/DS_MAG.xsd create mode 100644 MapoDb/DS_MAG.xss diff --git a/MapoDb/DS_MAG.Designer.cs b/MapoDb/DS_MAG.Designer.cs new file mode 100644 index 00000000..b37ba1f5 --- /dev/null +++ b/MapoDb/DS_MAG.Designer.cs @@ -0,0 +1,2014 @@ +//------------------------------------------------------------------------------ +// +// Il codice è stato generato da uno strumento. +// Versione runtime:4.0.30319.42000 +// +// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace MapoDb { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("DS_MAG")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class DS_MAG : global::System.Data.DataSet { + + private ElencoLottiDataTable tableElencoLotti; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public DS_MAG() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected DS_MAG(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["ElencoLotti"] != null)) { + base.Tables.Add(new ElencoLottiDataTable(ds.Tables["ElencoLotti"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [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 ElencoLottiDataTable ElencoLotti { + get { + return this.tableElencoLotti; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataSet Clone() { + DS_MAG cln = ((DS_MAG)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["ElencoLotti"] != null)) { + base.Tables.Add(new ElencoLottiDataTable(ds.Tables["ElencoLotti"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars(bool initTable) { + this.tableElencoLotti = ((ElencoLottiDataTable)(base.Tables["ElencoLotti"])); + if ((initTable == true)) { + if ((this.tableElencoLotti != null)) { + this.tableElencoLotti.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.DataSetName = "DS_MAG"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/DS_MAG.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableElencoLotti = new ElencoLottiDataTable(); + base.Tables.Add(this.tableElencoLotti); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeElencoLotti() { + 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) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + DS_MAG ds = new DS_MAG(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + 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; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ElencoLottiRowChangeEventHandler(object sender, ElencoLottiRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ElencoLottiDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnLotto; + + private global::System.Data.DataColumn columnIdxODL; + + private global::System.Data.DataColumn columnRifExt; + + private global::System.Data.DataColumn columnTipoLotto; + + private global::System.Data.DataColumn columnCodArt; + + private global::System.Data.DataColumn columnCodStato; + + private global::System.Data.DataColumn columnOrigine; + + private global::System.Data.DataColumn columnDtCrea; + + private global::System.Data.DataColumn columnNote; + + private global::System.Data.DataColumn columnQtaOrig; + + private global::System.Data.DataColumn columnNumUdc; + + private global::System.Data.DataColumn columnQtaCurr; + + private global::System.Data.DataColumn columnDtMod; + + private global::System.Data.DataColumn columnAttivo; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoLottiDataTable() { + this.TableName = "ElencoLotti"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ElencoLottiDataTable(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 ElencoLottiDataTable(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 LottoColumn { + get { + return this.columnLotto; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn IdxODLColumn { + get { + return this.columnIdxODL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn RifExtColumn { + get { + return this.columnRifExt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TipoLottoColumn { + get { + return this.columnTipoLotto; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.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", "16.0.0.0")] + public global::System.Data.DataColumn CodStatoColumn { + get { + return this.columnCodStato; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn OrigineColumn { + get { + return this.columnOrigine; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DtCreaColumn { + get { + return this.columnDtCrea; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn NoteColumn { + get { + return this.columnNote; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn QtaOrigColumn { + get { + return this.columnQtaOrig; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn NumUdcColumn { + get { + return this.columnNumUdc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn QtaCurrColumn { + get { + return this.columnQtaCurr; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DtModColumn { + get { + return this.columnDtMod; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn AttivoColumn { + get { + return this.columnAttivo; + } + } + + [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 ElencoLottiRow this[int index] { + get { + return ((ElencoLottiRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoLottiRowChangeEventHandler ElencoLottiRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoLottiRowChangeEventHandler ElencoLottiRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoLottiRowChangeEventHandler ElencoLottiRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ElencoLottiRowChangeEventHandler ElencoLottiRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddElencoLottiRow(ElencoLottiRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoLottiRow AddElencoLottiRow(string Lotto, int IdxODL, string RifExt, string TipoLotto, string CodArt, string CodStato, string Origine, System.DateTime DtCrea, string Note, decimal QtaOrig, int NumUdc, decimal QtaCurr, System.DateTime DtMod, bool Attivo) { + ElencoLottiRow rowElencoLottiRow = ((ElencoLottiRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Lotto, + IdxODL, + RifExt, + TipoLotto, + CodArt, + CodStato, + Origine, + DtCrea, + Note, + QtaOrig, + NumUdc, + QtaCurr, + DtMod, + Attivo}; + rowElencoLottiRow.ItemArray = columnValuesArray; + this.Rows.Add(rowElencoLottiRow); + return rowElencoLottiRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoLottiRow FindByLotto(string Lotto) { + return ((ElencoLottiRow)(this.Rows.Find(new object[] { + Lotto}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ElencoLottiDataTable cln = ((ElencoLottiDataTable)(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 ElencoLottiDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnLotto = base.Columns["Lotto"]; + this.columnIdxODL = base.Columns["IdxODL"]; + this.columnRifExt = base.Columns["RifExt"]; + this.columnTipoLotto = base.Columns["TipoLotto"]; + this.columnCodArt = base.Columns["CodArt"]; + this.columnCodStato = base.Columns["CodStato"]; + this.columnOrigine = base.Columns["Origine"]; + this.columnDtCrea = base.Columns["DtCrea"]; + this.columnNote = base.Columns["Note"]; + this.columnQtaOrig = base.Columns["QtaOrig"]; + this.columnNumUdc = base.Columns["NumUdc"]; + this.columnQtaCurr = base.Columns["QtaCurr"]; + this.columnDtMod = base.Columns["DtMod"]; + this.columnAttivo = base.Columns["Attivo"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnLotto = new global::System.Data.DataColumn("Lotto", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnLotto); + this.columnIdxODL = new global::System.Data.DataColumn("IdxODL", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxODL); + this.columnRifExt = new global::System.Data.DataColumn("RifExt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnRifExt); + this.columnTipoLotto = new global::System.Data.DataColumn("TipoLotto", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTipoLotto); + this.columnCodArt = new global::System.Data.DataColumn("CodArt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodArt); + this.columnCodStato = new global::System.Data.DataColumn("CodStato", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodStato); + this.columnOrigine = new global::System.Data.DataColumn("Origine", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrigine); + this.columnDtCrea = new global::System.Data.DataColumn("DtCrea", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDtCrea); + this.columnNote = new global::System.Data.DataColumn("Note", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNote); + this.columnQtaOrig = new global::System.Data.DataColumn("QtaOrig", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQtaOrig); + this.columnNumUdc = new global::System.Data.DataColumn("NumUdc", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNumUdc); + this.columnQtaCurr = new global::System.Data.DataColumn("QtaCurr", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnQtaCurr); + this.columnDtMod = new global::System.Data.DataColumn("DtMod", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDtMod); + this.columnAttivo = new global::System.Data.DataColumn("Attivo", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAttivo); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnLotto}, true)); + this.columnLotto.AllowDBNull = false; + this.columnLotto.Unique = true; + this.columnLotto.MaxLength = 50; + this.columnIdxODL.AllowDBNull = false; + this.columnRifExt.AllowDBNull = false; + this.columnRifExt.MaxLength = 50; + this.columnTipoLotto.AllowDBNull = false; + this.columnTipoLotto.MaxLength = 50; + this.columnCodArt.AllowDBNull = false; + this.columnCodArt.MaxLength = 50; + this.columnCodStato.AllowDBNull = false; + this.columnCodStato.MaxLength = 50; + this.columnOrigine.AllowDBNull = false; + this.columnOrigine.MaxLength = 50; + this.columnDtCrea.AllowDBNull = false; + this.columnNote.AllowDBNull = false; + this.columnNote.MaxLength = 250; + this.columnQtaOrig.AllowDBNull = false; + this.columnNumUdc.AllowDBNull = false; + this.columnQtaCurr.AllowDBNull = false; + this.columnDtMod.AllowDBNull = false; + this.columnAttivo.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ElencoLottiRow NewElencoLottiRow() { + return ((ElencoLottiRow)(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 ElencoLottiRow(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(ElencoLottiRow); + } + + [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.ElencoLottiRowChanged != null)) { + this.ElencoLottiRowChanged(this, new ElencoLottiRowChangeEvent(((ElencoLottiRow)(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.ElencoLottiRowChanging != null)) { + this.ElencoLottiRowChanging(this, new ElencoLottiRowChangeEvent(((ElencoLottiRow)(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.ElencoLottiRowDeleted != null)) { + this.ElencoLottiRowDeleted(this, new ElencoLottiRowChangeEvent(((ElencoLottiRow)(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.ElencoLottiRowDeleting != null)) { + this.ElencoLottiRowDeleting(this, new ElencoLottiRowChangeEvent(((ElencoLottiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveElencoLottiRow(ElencoLottiRow 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 = "ElencoLottiDataTable"; + 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. + /// + public partial class ElencoLottiRow : global::System.Data.DataRow { + + private ElencoLottiDataTable tableElencoLotti; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ElencoLottiRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableElencoLotti = ((ElencoLottiDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Lotto { + get { + return ((string)(this[this.tableElencoLotti.LottoColumn])); + } + set { + this[this.tableElencoLotti.LottoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int IdxODL { + get { + return ((int)(this[this.tableElencoLotti.IdxODLColumn])); + } + set { + this[this.tableElencoLotti.IdxODLColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string RifExt { + get { + return ((string)(this[this.tableElencoLotti.RifExtColumn])); + } + set { + this[this.tableElencoLotti.RifExtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string TipoLotto { + get { + return ((string)(this[this.tableElencoLotti.TipoLottoColumn])); + } + set { + this[this.tableElencoLotti.TipoLottoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string CodArt { + get { + return ((string)(this[this.tableElencoLotti.CodArtColumn])); + } + set { + this[this.tableElencoLotti.CodArtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string CodStato { + get { + return ((string)(this[this.tableElencoLotti.CodStatoColumn])); + } + set { + this[this.tableElencoLotti.CodStatoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Origine { + get { + return ((string)(this[this.tableElencoLotti.OrigineColumn])); + } + set { + this[this.tableElencoLotti.OrigineColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DtCrea { + get { + return ((global::System.DateTime)(this[this.tableElencoLotti.DtCreaColumn])); + } + set { + this[this.tableElencoLotti.DtCreaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Note { + get { + return ((string)(this[this.tableElencoLotti.NoteColumn])); + } + set { + this[this.tableElencoLotti.NoteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal QtaOrig { + get { + return ((decimal)(this[this.tableElencoLotti.QtaOrigColumn])); + } + set { + this[this.tableElencoLotti.QtaOrigColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int NumUdc { + get { + return ((int)(this[this.tableElencoLotti.NumUdcColumn])); + } + set { + this[this.tableElencoLotti.NumUdcColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal QtaCurr { + get { + return ((decimal)(this[this.tableElencoLotti.QtaCurrColumn])); + } + set { + this[this.tableElencoLotti.QtaCurrColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DtMod { + get { + return ((global::System.DateTime)(this[this.tableElencoLotti.DtModColumn])); + } + set { + this[this.tableElencoLotti.DtModColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool Attivo { + get { + return ((bool)(this[this.tableElencoLotti.AttivoColumn])); + } + set { + this[this.tableElencoLotti.AttivoColumn] = value; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ElencoLottiRowChangeEvent : global::System.EventArgs { + + private ElencoLottiRow 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 ElencoLottiRowChangeEvent(ElencoLottiRow 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 ElencoLottiRow 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 MapoDb.DS_MAGTableAdapters { + + + /// + ///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 ElencoLottiTableAdapter : 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 ElencoLottiTableAdapter() { + 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 = "ElencoLotti"; + tableMapping.ColumnMappings.Add("Lotto", "Lotto"); + tableMapping.ColumnMappings.Add("IdxODL", "IdxODL"); + tableMapping.ColumnMappings.Add("RifExt", "RifExt"); + tableMapping.ColumnMappings.Add("TipoLotto", "TipoLotto"); + tableMapping.ColumnMappings.Add("CodArt", "CodArt"); + tableMapping.ColumnMappings.Add("CodStato", "CodStato"); + tableMapping.ColumnMappings.Add("Origine", "Origine"); + tableMapping.ColumnMappings.Add("DtCrea", "DtCrea"); + tableMapping.ColumnMappings.Add("Note", "Note"); + tableMapping.ColumnMappings.Add("QtaOrig", "QtaOrig"); + tableMapping.ColumnMappings.Add("NumUdc", "NumUdc"); + tableMapping.ColumnMappings.Add("QtaCurr", "QtaCurr"); + tableMapping.ColumnMappings.Add("DtMod", "DtMod"); + tableMapping.ColumnMappings.Add("Attivo", "Attivo"); + 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].[ElencoLotti] WHERE (([Lotto] = @Original_Lotto) AND ([IdxODL] = @Original_IdxODL) AND ([RifExt] = @Original_RifExt) AND ([TipoLotto] = @Original_TipoLotto) AND ([CodArt] = @Original_CodArt) AND ([CodStato] = @Original_CodStato) AND ([Origine] = @Original_Origine) AND ([DtCrea] = @Original_DtCrea) AND ([Note] = @Original_Note) AND ([QtaOrig] = @Original_QtaOrig) AND ([NumUdc] = @Original_NumUdc) AND ([QtaCurr] = @Original_QtaCurr) AND ([DtMod] = @Original_DtMod) AND ([Attivo] = @Original_Attivo))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Lotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lotto", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxODL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RifExt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RifExt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TipoLotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TipoLotto", 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_CodStato", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodStato", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Origine", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Origine", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtCrea", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtCrea", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtaOrig", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaOrig", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumUdc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumUdc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtaCurr", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaCurr", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtMod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Attivo", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivo", 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].[ElencoLotti] ([Lotto], [IdxODL], [RifExt], [TipoLotto], [CodArt], [CodStato], [Origine], [DtCrea], [Note], [QtaOrig], [NumUdc], [QtaCurr], [DtMod], [Attivo]) VALUES (@Lotto, @IdxODL, @RifExt, @TipoLotto, @CodArt, @CodStato, @Origine, @DtCrea, @Note, @QtaOrig, @NumUdc, @QtaCurr, @DtMod, @Attivo); +SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM ElencoLotti WHERE (Lotto = @Lotto)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Lotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lotto", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxODL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RifExt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RifExt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TipoLotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TipoLotto", 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("@CodStato", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodStato", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Origine", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Origine", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtCrea", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtCrea", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaOrig", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumUdc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumUdc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaCurr", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaCurr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtMod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivo", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivo", 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].[ElencoLotti] SET [Lotto] = @Lotto, [IdxODL] = @IdxODL, [RifExt] = @RifExt, [TipoLotto] = @TipoLotto, [CodArt] = @CodArt, [CodStato] = @CodStato, [Origine] = @Origine, [DtCrea] = @DtCrea, [Note] = @Note, [QtaOrig] = @QtaOrig, [NumUdc] = @NumUdc, [QtaCurr] = @QtaCurr, [DtMod] = @DtMod, [Attivo] = @Attivo WHERE (([Lotto] = @Original_Lotto) AND ([IdxODL] = @Original_IdxODL) AND ([RifExt] = @Original_RifExt) AND ([TipoLotto] = @Original_TipoLotto) AND ([CodArt] = @Original_CodArt) AND ([CodStato] = @Original_CodStato) AND ([Origine] = @Original_Origine) AND ([DtCrea] = @Original_DtCrea) AND ([Note] = @Original_Note) AND ([QtaOrig] = @Original_QtaOrig) AND ([NumUdc] = @Original_NumUdc) AND ([QtaCurr] = @Original_QtaCurr) AND ([DtMod] = @Original_DtMod) AND ([Attivo] = @Original_Attivo)); +SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM ElencoLotti WHERE (Lotto = @Lotto)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Lotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lotto", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxODL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxODL", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RifExt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RifExt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TipoLotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TipoLotto", 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("@CodStato", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodStato", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Origine", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Origine", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtCrea", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtCrea", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaOrig", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaOrig", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumUdc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumUdc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaCurr", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaCurr", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtMod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivo", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Lotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lotto", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxODL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RifExt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RifExt", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TipoLotto", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TipoLotto", 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_CodStato", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodStato", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Origine", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Origine", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtCrea", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtCrea", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Note", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Note", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtaOrig", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaOrig", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumUdc", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumUdc", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_QtaCurr", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 9, "QtaCurr", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtMod", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtMod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Attivo", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivo", 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::MapoDb.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 Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note," + + " QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM dbo.ElencoLotti"; + 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_EL_UpsertByOdl"; + 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("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@flgStorico", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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.ElencoLottiDataTable 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.ElencoLottiDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_MAG.ElencoLottiDataTable dataTable = new DS_MAG.ElencoLottiDataTable(); + 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.ElencoLottiDataTable 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, "ElencoLotti"); + } + + [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_Lotto, int Original_IdxODL, string Original_RifExt, string Original_TipoLotto, string Original_CodArt, string Original_CodStato, string Original_Origine, System.DateTime Original_DtCrea, string Original_Note, decimal Original_QtaOrig, int Original_NumUdc, decimal Original_QtaCurr, System.DateTime Original_DtMod, bool Original_Attivo) { + if ((Original_Lotto == null)) { + throw new global::System.ArgumentNullException("Original_Lotto"); + } + else { + this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Lotto)); + } + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_IdxODL)); + if ((Original_RifExt == null)) { + throw new global::System.ArgumentNullException("Original_RifExt"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_RifExt)); + } + if ((Original_TipoLotto == null)) { + throw new global::System.ArgumentNullException("Original_TipoLotto"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_TipoLotto)); + } + if ((Original_CodArt == null)) { + throw new global::System.ArgumentNullException("Original_CodArt"); + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_CodArt)); + } + if ((Original_CodStato == null)) { + throw new global::System.ArgumentNullException("Original_CodStato"); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_CodStato)); + } + if ((Original_Origine == null)) { + throw new global::System.ArgumentNullException("Original_Origine"); + } + else { + this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Origine)); + } + this.Adapter.DeleteCommand.Parameters[7].Value = ((System.DateTime)(Original_DtCrea)); + if ((Original_Note == null)) { + throw new global::System.ArgumentNullException("Original_Note"); + } + else { + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Note)); + } + this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_QtaOrig)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_NumUdc)); + this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_QtaCurr)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((System.DateTime)(Original_DtMod)); + this.Adapter.DeleteCommand.Parameters[13].Value = ((bool)(Original_Attivo)); + 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 Lotto, int IdxODL, string RifExt, string TipoLotto, string CodArt, string CodStato, string Origine, System.DateTime DtCrea, string Note, decimal QtaOrig, int NumUdc, decimal QtaCurr, System.DateTime DtMod, bool Attivo) { + if ((Lotto == null)) { + throw new global::System.ArgumentNullException("Lotto"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Lotto)); + } + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(IdxODL)); + if ((RifExt == null)) { + throw new global::System.ArgumentNullException("RifExt"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(RifExt)); + } + if ((TipoLotto == null)) { + throw new global::System.ArgumentNullException("TipoLotto"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(TipoLotto)); + } + if ((CodArt == null)) { + throw new global::System.ArgumentNullException("CodArt"); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(CodArt)); + } + if ((CodStato == null)) { + throw new global::System.ArgumentNullException("CodStato"); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(CodStato)); + } + if ((Origine == null)) { + throw new global::System.ArgumentNullException("Origine"); + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Origine)); + } + this.Adapter.InsertCommand.Parameters[7].Value = ((System.DateTime)(DtCrea)); + if ((Note == null)) { + throw new global::System.ArgumentNullException("Note"); + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Note)); + } + this.Adapter.InsertCommand.Parameters[9].Value = ((decimal)(QtaOrig)); + this.Adapter.InsertCommand.Parameters[10].Value = ((int)(NumUdc)); + this.Adapter.InsertCommand.Parameters[11].Value = ((decimal)(QtaCurr)); + this.Adapter.InsertCommand.Parameters[12].Value = ((System.DateTime)(DtMod)); + this.Adapter.InsertCommand.Parameters[13].Value = ((bool)(Attivo)); + 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 Lotto, + int IdxODL, + string RifExt, + string TipoLotto, + string CodArt, + string CodStato, + string Origine, + System.DateTime DtCrea, + string Note, + decimal QtaOrig, + int NumUdc, + decimal QtaCurr, + System.DateTime DtMod, + bool Attivo, + string Original_Lotto, + int Original_IdxODL, + string Original_RifExt, + string Original_TipoLotto, + string Original_CodArt, + string Original_CodStato, + string Original_Origine, + System.DateTime Original_DtCrea, + string Original_Note, + decimal Original_QtaOrig, + int Original_NumUdc, + decimal Original_QtaCurr, + System.DateTime Original_DtMod, + bool Original_Attivo) { + if ((Lotto == null)) { + throw new global::System.ArgumentNullException("Lotto"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Lotto)); + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(IdxODL)); + if ((RifExt == null)) { + throw new global::System.ArgumentNullException("RifExt"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(RifExt)); + } + if ((TipoLotto == null)) { + throw new global::System.ArgumentNullException("TipoLotto"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(TipoLotto)); + } + if ((CodArt == null)) { + throw new global::System.ArgumentNullException("CodArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(CodArt)); + } + if ((CodStato == null)) { + throw new global::System.ArgumentNullException("CodStato"); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(CodStato)); + } + if ((Origine == null)) { + throw new global::System.ArgumentNullException("Origine"); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Origine)); + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(DtCrea)); + if ((Note == null)) { + throw new global::System.ArgumentNullException("Note"); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Note)); + } + this.Adapter.UpdateCommand.Parameters[9].Value = ((decimal)(QtaOrig)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(NumUdc)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((decimal)(QtaCurr)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((System.DateTime)(DtMod)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((bool)(Attivo)); + if ((Original_Lotto == null)) { + throw new global::System.ArgumentNullException("Original_Lotto"); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Lotto)); + } + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_IdxODL)); + if ((Original_RifExt == null)) { + throw new global::System.ArgumentNullException("Original_RifExt"); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_RifExt)); + } + if ((Original_TipoLotto == null)) { + throw new global::System.ArgumentNullException("Original_TipoLotto"); + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_TipoLotto)); + } + if ((Original_CodArt == null)) { + throw new global::System.ArgumentNullException("Original_CodArt"); + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_CodArt)); + } + if ((Original_CodStato == null)) { + throw new global::System.ArgumentNullException("Original_CodStato"); + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_CodStato)); + } + if ((Original_Origine == null)) { + throw new global::System.ArgumentNullException("Original_Origine"); + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Origine)); + } + this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_DtCrea)); + if ((Original_Note == null)) { + throw new global::System.ArgumentNullException("Original_Note"); + } + else { + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Note)); + } + this.Adapter.UpdateCommand.Parameters[23].Value = ((decimal)(Original_QtaOrig)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_NumUdc)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((decimal)(Original_QtaCurr)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((System.DateTime)(Original_DtMod)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((bool)(Original_Attivo)); + 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 IdxODL, + string RifExt, + string TipoLotto, + string CodArt, + string CodStato, + string Origine, + System.DateTime DtCrea, + string Note, + decimal QtaOrig, + int NumUdc, + decimal QtaCurr, + System.DateTime DtMod, + bool Attivo, + string Original_Lotto, + int Original_IdxODL, + string Original_RifExt, + string Original_TipoLotto, + string Original_CodArt, + string Original_CodStato, + string Original_Origine, + System.DateTime Original_DtCrea, + string Original_Note, + decimal Original_QtaOrig, + int Original_NumUdc, + decimal Original_QtaCurr, + System.DateTime Original_DtMod, + bool Original_Attivo) { + return this.Update(Original_Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo, Original_Lotto, Original_IdxODL, Original_RifExt, Original_TipoLotto, Original_CodArt, Original_CodStato, Original_Origine, Original_DtCrea, Original_Note, Original_QtaOrig, Original_NumUdc, Original_QtaCurr, Original_DtMod, Original_Attivo); + } + + [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 UpsertByOdl(global::System.Nullable IdxODL, global::System.Nullable flgStorico) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((IdxODL.HasValue == true)) { + command.Parameters[1].Value = ((int)(IdxODL.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((flgStorico.HasValue == true)) { + command.Parameters[2].Value = ((bool)(flgStorico.Value)); + } + else { + command.Parameters[2].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 + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + + "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] + public partial class TableAdapterManager : global::System.ComponentModel.Component { + + private UpdateOrderOption _updateOrder; + + private ElencoLottiTableAdapter _elencoLottiTableAdapter; + + private bool _backupDataSetBeforeUpdate; + + private global::System.Data.IDbConnection _connection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UpdateOrderOption UpdateOrder { + get { + return this._updateOrder; + } + set { + this._updateOrder = value; + } + } + + [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 ElencoLottiTableAdapter ElencoLottiTableAdapter { + get { + return this._elencoLottiTableAdapter; + } + set { + this._elencoLottiTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool BackupDataSetBeforeUpdate { + get { + return this._backupDataSetBeforeUpdate; + } + set { + this._backupDataSetBeforeUpdate = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public global::System.Data.IDbConnection Connection { + get { + if ((this._connection != null)) { + return this._connection; + } + if (((this._elencoLottiTableAdapter != null) + && (this._elencoLottiTableAdapter.Connection != null))) { + return this._elencoLottiTableAdapter.Connection; + } + return null; + } + set { + this._connection = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int TableAdapterInstanceCount { + get { + int count = 0; + if ((this._elencoLottiTableAdapter != null)) { + count = (count + 1); + } + return count; + } + } + + /// + ///Update rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateUpdatedRows(DS_MAG dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._elencoLottiTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ElencoLotti.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._elencoLottiTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + return result; + } + + /// + ///Insert rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateInsertedRows(DS_MAG dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._elencoLottiTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ElencoLotti.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._elencoLottiTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + return result; + } + + /// + ///Delete rows in bottom-up order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [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._elencoLottiTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ElencoLotti.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._elencoLottiTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + return result; + } + + /// + ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { + if (((updatedRows == null) + || (updatedRows.Length < 1))) { + return updatedRows; + } + if (((allAddedRows == null) + || (allAddedRows.Count < 1))) { + return updatedRows; + } + global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); + for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { + global::System.Data.DataRow row = updatedRows[i]; + if ((allAddedRows.Contains(row) == false)) { + realUpdatedRows.Add(row); + } + } + return realUpdatedRows.ToArray(); + } + + /// + ///Update all changes to the dataset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public virtual int UpdateAll(DS_MAG dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._elencoLottiTableAdapter != null) + && (this.MatchTableAdapterConnection(this._elencoLottiTableAdapter.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" + + "età TableAdapter di ciascun oggetto TableAdapterManager su un\'istanza TableAdapt" + + "er valida."); + } + bool workConnOpened = false; + if (((workConnection.State & global::System.Data.ConnectionState.Broken) + == global::System.Data.ConnectionState.Broken)) { + workConnection.Close(); + } + if ((workConnection.State == global::System.Data.ConnectionState.Closed)) { + workConnection.Open(); + workConnOpened = true; + } + global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); + if ((workTransaction == null)) { + throw new global::System.ApplicationException("Impossibile avviare la transazione. La connessione dati corrente non supporta le " + + "transazioni oppure lo stato corrente non consente l\'avvio della transazione."); + } + global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); + int result = 0; + global::System.Data.DataSet backupDataSet = null; + if (this.BackupDataSetBeforeUpdate) { + backupDataSet = new global::System.Data.DataSet(); + backupDataSet.Merge(dataSet); + } + try { + // ---- Prepare for update ----------- + // + if ((this._elencoLottiTableAdapter != null)) { + revertConnections.Add(this._elencoLottiTableAdapter, this._elencoLottiTableAdapter.Connection); + this._elencoLottiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._elencoLottiTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._elencoLottiTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._elencoLottiTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._elencoLottiTableAdapter.Adapter); + } + } + // + //---- Perform updates ----------- + // + if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + } + else { + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + } + result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); + // + //---- Commit updates ----------- + // + workTransaction.Commit(); + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + if ((0 < allChangedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; + allChangedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + } + catch (global::System.Exception ex) { + workTransaction.Rollback(); + // ---- Restore the dataset ----------- + if (this.BackupDataSetBeforeUpdate) { + global::System.Diagnostics.Debug.Assert((backupDataSet != null)); + dataSet.Clear(); + dataSet.Merge(backupDataSet); + } + else { + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + row.SetAdded(); + } + } + } + throw ex; + } + finally { + if (workConnOpened) { + workConnection.Close(); + } + if ((this._elencoLottiTableAdapter != null)) { + this._elencoLottiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._elencoLottiTableAdapter])); + this._elencoLottiTableAdapter.Transaction = null; + } + if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { + global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); + for (int i = 0; (i < adapters.Length); i = (i + 1)) { + global::System.Data.Common.DataAdapter adapter = adapters[i]; + adapter.AcceptChangesDuringUpdate = true; + } + } + } + return result; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { + global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { + if ((this._connection != null)) { + return true; + } + if (((this.Connection == null) + || (inputConnection == null))) { + return true; + } + if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { + return true; + } + return false; + } + + /// + ///Update Order Option + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public enum UpdateOrderOption { + + InsertUpdateDelete = 0, + + UpdateInsertDelete = 1, + } + + /// + ///Used to sort self-referenced table's rows + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { + + private global::System.Data.DataRelation _relation; + + private int _childFirst; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { + this._relation = relation; + if (childFirst) { + this._childFirst = -1; + } + else { + this._childFirst = 1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) { + global::System.Diagnostics.Debug.Assert((row != null)); + global::System.Data.DataRow root = row; + distance = 0; + + global::System.Collections.Generic.IDictionary traversedRows = new global::System.Collections.Generic.Dictionary(); + traversedRows[row] = row; + + global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + } + + if ((distance == 0)) { + traversedRows.Clear(); + traversedRows[row] = row; + parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + } + } + + return root; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { + if (object.ReferenceEquals(row1, row2)) { + return 0; + } + if ((row1 == null)) { + return -1; + } + if ((row2 == null)) { + return 1; + } + + int distance1 = 0; + global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1); + + int distance2 = 0; + global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2); + + if (object.ReferenceEquals(root1, root2)) { + return (this._childFirst * distance1.CompareTo(distance2)); + } + else { + global::System.Diagnostics.Debug.Assert(((root1.Table != null) + && (root2.Table != null))); + if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) { + return -1; + } + else { + return 1; + } + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/MapoDb/DS_MAG.xsc b/MapoDb/DS_MAG.xsc new file mode 100644 index 00000000..05b01991 --- /dev/null +++ b/MapoDb/DS_MAG.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/MapoDb/DS_MAG.xsd b/MapoDb/DS_MAG.xsd new file mode 100644 index 00000000..d1553c09 --- /dev/null +++ b/MapoDb/DS_MAG.xsd @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + DELETE FROM [dbo].[ElencoLotti] WHERE (([Lotto] = @Original_Lotto) AND ([IdxODL] = @Original_IdxODL) AND ([RifExt] = @Original_RifExt) AND ([TipoLotto] = @Original_TipoLotto) AND ([CodArt] = @Original_CodArt) AND ([CodStato] = @Original_CodStato) AND ([Origine] = @Original_Origine) AND ([DtCrea] = @Original_DtCrea) AND ([Note] = @Original_Note) AND ([QtaOrig] = @Original_QtaOrig) AND ([NumUdc] = @Original_NumUdc) AND ([QtaCurr] = @Original_QtaCurr) AND ([DtMod] = @Original_DtMod) AND ([Attivo] = @Original_Attivo)) + + + + + + + + + + + + + + + + + + + + + INSERT INTO [dbo].[ElencoLotti] ([Lotto], [IdxODL], [RifExt], [TipoLotto], [CodArt], [CodStato], [Origine], [DtCrea], [Note], [QtaOrig], [NumUdc], [QtaCurr], [DtMod], [Attivo]) VALUES (@Lotto, @IdxODL, @RifExt, @TipoLotto, @CodArt, @CodStato, @Origine, @DtCrea, @Note, @QtaOrig, @NumUdc, @QtaCurr, @DtMod, @Attivo); +SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM ElencoLotti WHERE (Lotto = @Lotto) + + + + + + + + + + + + + + + + + + + + + SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM dbo.ElencoLotti + + + + + + UPDATE [dbo].[ElencoLotti] SET [Lotto] = @Lotto, [IdxODL] = @IdxODL, [RifExt] = @RifExt, [TipoLotto] = @TipoLotto, [CodArt] = @CodArt, [CodStato] = @CodStato, [Origine] = @Origine, [DtCrea] = @DtCrea, [Note] = @Note, [QtaOrig] = @QtaOrig, [NumUdc] = @NumUdc, [QtaCurr] = @QtaCurr, [DtMod] = @DtMod, [Attivo] = @Attivo WHERE (([Lotto] = @Original_Lotto) AND ([IdxODL] = @Original_IdxODL) AND ([RifExt] = @Original_RifExt) AND ([TipoLotto] = @Original_TipoLotto) AND ([CodArt] = @Original_CodArt) AND ([CodStato] = @Original_CodStato) AND ([Origine] = @Original_Origine) AND ([DtCrea] = @Original_DtCrea) AND ([Note] = @Original_Note) AND ([QtaOrig] = @Original_QtaOrig) AND ([NumUdc] = @Original_NumUdc) AND ([QtaCurr] = @Original_QtaCurr) AND ([DtMod] = @Original_DtMod) AND ([Attivo] = @Original_Attivo)); +SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM ElencoLotti WHERE (Lotto = @Lotto) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbo.stp_EL_UpsertByOdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MapoDb/DS_MAG.xss b/MapoDb/DS_MAG.xss new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/MapoDb/DS_MAG.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 8152f4aa..5474e885 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -56,6 +56,7 @@ namespace MapoDb public DS_ProdTempiTableAdapters.Macchine2SlaveTableAdapter taM2S; public DS_applicazioneTableAdapters.MacchineTableAdapter taMacchine; public DS_PlanTableAdapters.MachineParamsTableAdapter taMacParams; + public DS_MAGTableAdapters.ElencoLottiTableAdapter taMagELotti; public DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter taMSE; public DS_ProdTempiTableAdapters.ODLTableAdapter taODL; public DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter taOp; @@ -506,6 +507,7 @@ namespace MapoDb taM2S = new DS_ProdTempiTableAdapters.Macchine2SlaveTableAdapter(); taMacchine = new DS_applicazioneTableAdapters.MacchineTableAdapter(); taMacParams = new DS_PlanTableAdapters.MachineParamsTableAdapter(); + taMagELotti = new DS_MAGTableAdapters.ElencoLottiTableAdapter(); taMSE = new DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter(); taODL = new DS_ProdTempiTableAdapters.ODLTableAdapter(); taOp = new DS_applicazioneTableAdapters.AnagraficaOperatoriTableAdapter(); @@ -546,6 +548,7 @@ namespace MapoDb string connectionStringIS = memLayer.ML.confReadString("MoonProConnectionStringIS"); string connectionStringArca = memLayer.ML.confReadString("MoonProConnectionStringArca"); string connectionStringES3 = memLayer.ML.confReadString("MoonProConnectionStringES3"); + string connectionStringMAG = memLayer.ML.confReadString("MoonProConnectionStringMAG"); // connections del db taAG.Connection.ConnectionString = connectionString; taAnagArt.Connection.ConnectionString = connectionString; @@ -569,6 +572,7 @@ namespace MapoDb taM2S.Connection.ConnectionString = connectionString; taMacchine.Connection.ConnectionString = connectionString; taMacParams.Connection.ConnectionString = connectionStringES3; + taMagELotti.Connection.ConnectionString = connectionStringMAG; taMSE.Connection.ConnectionString = connectionString; taODL.Connection.ConnectionString = connectionString; taOp.Connection.ConnectionString = connectionString; diff --git a/MapoDb/MapoDb.csproj b/MapoDb/MapoDb.csproj index 80f36f00..21bb1fbb 100644 --- a/MapoDb/MapoDb.csproj +++ b/MapoDb/MapoDb.csproj @@ -222,6 +222,11 @@ True DS_IntServ.xsd + + True + True + DS_MAG.xsd + True True @@ -301,6 +306,17 @@ DS_IntServ.xsd + + DS_MAG.xsd + + + Designer + MSDataSetGenerator + DS_MAG.Designer.cs + + + DS_MAG.xsd + DS_Plan.xsd @@ -397,10 +413,6 @@ - - - - diff --git a/MapoDb/app.config b/MapoDb/app.config index 37984522..839fd88c 100644 --- a/MapoDb/app.config +++ b/MapoDb/app.config @@ -1,16 +1,30 @@  - -
+ +
- - - - - - + + + + + + + From 65437bf191aec188abb03cc4d9865a217ec96cdb Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 9 Dec 2020 14:20:42 +0100 Subject: [PATCH 2/5] update x gestione metodi opzionali da DB --- MP-ADM/BaseUserControl.cs | 49 +++++++++++++++ .../WebUserControls/mod_gestioneODL.ascx.cs | 2 +- MP-SITE/BasePage.cs | 61 +++++++++++++++---- MP-TAB/BasePage.cs | 60 ++++++++++++++---- MP-TAB/DettaglioMacchina.aspx.cs | 44 +++++-------- MP-TAB/SheetTech.aspx.cs | 1 - MP-TAB/Web.config | 1 + MP-TAB/WebUserControls/BaseUserControl.cs | 49 +++++++++++++++ MP-TAB/WebUserControls/mod_ODL.ascx.cs | 18 +----- MP-TAB/WebUserControls/mod_confProd.ascx.cs | 1 - .../WebUserControls/mod_dettMacchina.ascx.cs | 2 +- MapoDb/Properties/Settings.Designer.cs | 13 +++- MapoDb/Properties/Settings.settings | 8 +++ 13 files changed, 238 insertions(+), 71 deletions(-) diff --git a/MP-ADM/BaseUserControl.cs b/MP-ADM/BaseUserControl.cs index 14c8bc5c..192963ad 100644 --- a/MP-ADM/BaseUserControl.cs +++ b/MP-ADM/BaseUserControl.cs @@ -15,6 +15,55 @@ namespace MP_ADM #endregion Internal Fields + #region Public Fields + + /// + /// Abilitazione gestione Controlli periodici + /// + public bool enableControlli = memLayer.ML.cdvb("enableControlli"); + + /// + /// Abilitazione gestione Disegno articolo + /// + public bool enableDisegno = memLayer.ML.cdvb("enableDisegno"); + + /// + /// Abilitazione gestione grafici JScript + /// + public bool enableGraphJS = memLayer.ML.cdvb("enableGraphJS"); + + /// + /// Abilitazione gestione Pezzi LAsciati in macchina + /// + public bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); + + /// + /// Abilitazione gestione Richieste - Promesse - ODL + /// + public bool enableRPO = memLayer.ML.cdvb("enableRPO"); + + /// + /// Abilitazione gestione scarti + /// + public bool enableScarti = memLayer.ML.cdvb("enableScarti"); + + /// + /// Abilitazione scheda Tecnica + /// + public bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); + + /// + /// Abilitazione gestione SplitODL + /// + public bool enableSplitODL = memLayer.ML.cdvb("enableSplitODL"); + + /// + /// Abilitazione gestione Set PZ Pallet su tablet + /// + public bool enableTabSetPzPallet = memLayer.ML.cdvb("enableTabSetPzPallet"); + + #endregion Public Fields + #region Public Events public event EventHandler eh_nuovoValore; diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs index dea14363..6886b806 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs @@ -190,7 +190,7 @@ namespace MP_ADM.WebUserControls { get { - return !memLayer.ML.CRB("enableRPO"); + return !enableRPO; } } diff --git a/MP-SITE/BasePage.cs b/MP-SITE/BasePage.cs index f124430c..3c5902ea 100644 --- a/MP-SITE/BasePage.cs +++ b/MP-SITE/BasePage.cs @@ -14,6 +14,55 @@ namespace MP_SITE #endregion Internal Fields + #region Public Fields + + /// + /// Abilitazione gestione Controlli periodici + /// + public bool enableControlli = memLayer.ML.cdvb("enableControlli"); + + /// + /// Abilitazione gestione Disegno articolo + /// + public bool enableDisegno = memLayer.ML.cdvb("enableDisegno"); + + /// + /// Abilitazione gestione grafici JScript + /// + public bool enableGraphJS = memLayer.ML.cdvb("enableGraphJS"); + + /// + /// Abilitazione gestione Pezzi LAsciati in macchina + /// + public bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); + + /// + /// Abilitazione gestione Richieste - Promesse - ODL + /// + public bool enableRPO = memLayer.ML.cdvb("enableRPO"); + + /// + /// Abilitazione gestione scarti + /// + public bool enableScarti = memLayer.ML.cdvb("enableScarti"); + + /// + /// Abilitazione scheda Tecnica + /// + public bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); + + /// + /// Abilitazione gestione SplitODL + /// + public bool enableSplitODL = memLayer.ML.cdvb("enableSplitODL"); + + /// + /// Abilitazione gestione Set PZ Pallet su tablet + /// + public bool enableTabSetPzPallet = memLayer.ML.cdvb("enableTabSetPzPallet"); + + #endregion Public Fields + #region Protected Properties /// @@ -34,18 +83,6 @@ namespace MP_SITE #endregion Protected Properties - #region Public Properties - - public bool enableGraphJS - { - get - { - return memLayer.ML.CRB("enableGraphJS"); - } - } - - #endregion Public Properties - #region Public Methods /// diff --git a/MP-TAB/BasePage.cs b/MP-TAB/BasePage.cs index bc62a3a1..9158c1fa 100644 --- a/MP-TAB/BasePage.cs +++ b/MP-TAB/BasePage.cs @@ -18,6 +18,55 @@ namespace MoonProTablet #endregion Internal Fields + #region Public Fields + + /// + /// Abilitazione gestione Controlli periodici + /// + public bool enableControlli = memLayer.ML.cdvb("enableControlli"); + + /// + /// Abilitazione gestione Disegno articolo + /// + public bool enableDisegno = memLayer.ML.cdvb("enableDisegno"); + + /// + /// Abilitazione gestione grafici JScript + /// + public bool enableGraphJS = memLayer.ML.cdvb("enableGraphJS"); + + /// + /// Abilitazione gestione Pezzi LAsciati in macchina + /// + public bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); + + /// + /// Abilitazione gestione Richieste - Promesse - ODL + /// + public bool enableRPO = memLayer.ML.cdvb("enableRPO"); + + /// + /// Abilitazione gestione scarti + /// + public bool enableScarti = memLayer.ML.cdvb("enableScarti"); + + /// + /// Abilitazione scheda Tecnica + /// + public bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); + + /// + /// Abilitazione gestione SplitODL + /// + public bool enableSplitODL = memLayer.ML.cdvb("enableSplitODL"); + + /// + /// Abilitazione gestione Set PZ Pallet su tablet + /// + public bool enableTabSetPzPallet = memLayer.ML.cdvb("enableTabSetPzPallet"); + + #endregion Public Fields + #region Protected Properties /// @@ -36,17 +85,6 @@ namespace MoonProTablet } } - /// - /// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL) - /// - protected bool enableRPO - { - get - { - return memLayer.ML.cdvb("enableRPO"); - } - } - /// /// Verifica se la macchina MAIN sia MASTER /// diff --git a/MP-TAB/DettaglioMacchina.aspx.cs b/MP-TAB/DettaglioMacchina.aspx.cs index 941cb8fb..be4148cf 100644 --- a/MP-TAB/DettaglioMacchina.aspx.cs +++ b/MP-TAB/DettaglioMacchina.aspx.cs @@ -6,6 +6,20 @@ namespace MoonProTablet { public partial class DettaglioMacchina : BasePage { + #region Private Methods + + private void mod_confProd1_eh_newVal(object sender, EventArgs e) + { + } + + private void mod_confProd1_eh_reset(object sender, EventArgs e) + { + } + + #endregion Private Methods + + #region Protected Methods + protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -18,14 +32,6 @@ namespace MoonProTablet mod_confProd1.eh_reset += mod_confProd1_eh_reset; } - void mod_confProd1_eh_reset(object sender, EventArgs e) - { - } - - void mod_confProd1_eh_newVal(object sender, EventArgs e) - { - } - /// /// evento timer /// @@ -35,25 +41,7 @@ namespace MoonProTablet { mod_dettMacchina1.doUpdate(); } - /// - /// Verifica abilitazione gestione scarti - /// - public bool enableScarti - { - get - { - return memLayer.ML.cdvb("enableScarti"); - } - } - /// - /// Verifica abilitazione gestione scarti - /// - public bool enableControlli - { - get - { - return memLayer.ML.cdvb("enableControlli"); - } - } + + #endregion Protected Methods } } \ No newline at end of file diff --git a/MP-TAB/SheetTech.aspx.cs b/MP-TAB/SheetTech.aspx.cs index a253255c..642354c0 100644 --- a/MP-TAB/SheetTech.aspx.cs +++ b/MP-TAB/SheetTech.aspx.cs @@ -15,7 +15,6 @@ namespace MoonProTablet private void checkModuleEnabled() { - bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); cmp_sheetTech.Visible = enableSchedaTecnica; cmp_disabled.Visible = !enableSchedaTecnica; } diff --git a/MP-TAB/Web.config b/MP-TAB/Web.config index e4bef946..f2f78741 100644 --- a/MP-TAB/Web.config +++ b/MP-TAB/Web.config @@ -60,6 +60,7 @@ + diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index 57f5193c..aeb722da 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -32,6 +32,55 @@ namespace MoonProTablet.WebUserControls #endregion Internal Fields + #region Public Fields + + /// + /// Abilitazione gestione Controlli periodici + /// + public bool enableControlli = memLayer.ML.cdvb("enableControlli"); + + /// + /// Abilitazione gestione Disegno articolo + /// + public bool enableDisegno = memLayer.ML.cdvb("enableDisegno"); + + /// + /// Abilitazione gestione grafici JScript + /// + public bool enableGraphJS = memLayer.ML.cdvb("enableGraphJS"); + + /// + /// Abilitazione gestione Pezzi LAsciati in macchina + /// + public bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); + + /// + /// Abilitazione gestione Richieste - Promesse - ODL + /// + public bool enableRPO = memLayer.ML.cdvb("enableRPO"); + + /// + /// Abilitazione gestione scarti + /// + public bool enableScarti = memLayer.ML.cdvb("enableScarti"); + + /// + /// Abilitazione scheda Tecnica + /// + public bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); + + /// + /// Abilitazione gestione SplitODL + /// + public bool enableSplitODL = memLayer.ML.cdvb("enableSplitODL"); + + /// + /// Abilitazione gestione Set PZ Pallet su tablet + /// + public bool enableTabSetPzPallet = memLayer.ML.cdvb("enableTabSetPzPallet"); + + #endregion Public Fields + #region Public Events /// diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index 9101532c..7ec41887 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -46,17 +46,6 @@ namespace MoonProTablet.WebUserControls } } - /// - /// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL) - /// - protected bool enableRPO - { - get - { - return memLayer.ML.cdvb("enableRPO"); - } - } - /// /// Restituisce il codice IdxMacchina dell'altra tavola (se multi) altrimenti la stessa macchina... /// @@ -488,7 +477,6 @@ namespace MoonProTablet.WebUserControls } // deve controllare abbia ODL o PROMESSE odl... bool hasNewOdl = DataLayerObj.taSelOdlFree.getUnused(idxMacchinaFix, chkTutti.Checked).Rows.Count > 1; - bool enableSchedaTecnica = memLayer.ML.CRB("enableSchedaTecnica"); // sistemo buttons! lbtStartAttr.Enabled = (isEnabled && (!inAttr && hasNewOdl)); lbtEndProd.Enabled = (isEnabled && (!inAttr && currHasOdl)); @@ -677,7 +665,7 @@ namespace MoonProTablet.WebUserControls cmp_dettPODL.idxODLSel = idxODLSel; divDettPOdl.Visible = show && idxODLSel > 0; // se abilitato da config su DB mostro selezione del numPzPallet... - cmp_selPzPallet.enableSet = memLayer.ML.CRB("enableTabSetPzPallet"); + cmp_selPzPallet.enableSet = enableTabSetPzPallet; } /// @@ -1049,7 +1037,7 @@ namespace MoonProTablet.WebUserControls TCRichAttr = TCAssegnato(idxODLSel); } int idxODL = 0; - if (memLayer.ML.CRB("enableSplitODL")) + if (enableSplitODL) { // splitto VECCHIO ODL (se è rimasto qualcosa da produrre e se ce ne è rimasto uno.......) try @@ -1220,7 +1208,7 @@ namespace MoonProTablet.WebUserControls { DataLayerObj.taODL.fixMachineSlave(idxMacchina, 30, 1); } - // se c'è gesitone SchedaTecnica --> chiamo procedura update x lotti + // se c'è gestione SchedaTecnica --> chiamo procedura update x lotti // FixMe-ToDo diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index 2e678258..eb6881ef 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -239,7 +239,6 @@ namespace MoonProTablet.WebUserControls private void checkConfig() { // verifico SE sia permesso gestire i "Pezzi lasciati" in macchina... - bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); lblNumLasciati.Visible = enablePzProdLasciati; txtNumLasciati.Visible = enablePzProdLasciati; lblEmptyNumLasciati.Visible = !enablePzProdLasciati; diff --git a/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs b/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs index 31c2ea22..3d02c507 100644 --- a/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs @@ -91,7 +91,7 @@ namespace MoonProTablet.WebUserControls // default è ND... bool answ = false; // SE abilitata gestione controlli... - if (memLayer.ML.cdvb("enableDisegno")) + if (enableDisegno) { // recupero da anagrafica articoli... try diff --git a/MapoDb/Properties/Settings.Designer.cs b/MapoDb/Properties/Settings.Designer.cs index 88ea7d19..03df29e4 100644 --- a/MapoDb/Properties/Settings.Designer.cs +++ b/MapoDb/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace MapoDb.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -77,5 +77,16 @@ namespace MapoDb.Properties { return ((string)(this["MoonPro_IS_ArcaConnectionString"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL2016DEV;Initial Catalog=MoonPro_MAG;Persist Security Info=True;Use" + + "r ID=sa;Password=keyhammer16")] + public string MoonPro_MAGConnectionString { + get { + return ((string)(this["MoonPro_MAGConnectionString"])); + } + } } } diff --git a/MapoDb/Properties/Settings.settings b/MapoDb/Properties/Settings.settings index aa8b519d..e9ea1536 100644 --- a/MapoDb/Properties/Settings.settings +++ b/MapoDb/Properties/Settings.settings @@ -42,5 +42,13 @@ </SerializableConnectionString> Data Source=SQL2016DEV;Initial Catalog=MoonPro_IS_EdilChim;Persist Security Info=True;User ID=sa;Password=keyhammer16 + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Data Source=SQL2016DEV;Initial Catalog=MoonPro_MAG;Persist Security Info=True;User ID=sa;Password=keyhammer16</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=SQL2016DEV;Initial Catalog=MoonPro_MAG;Persist Security Info=True;User ID=sa;Password=keyhammer16 + \ No newline at end of file From 6817de4e5a5323231c0d9407266cec9e9c1499df Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 9 Dec 2020 14:20:55 +0100 Subject: [PATCH 3/5] start rel 1341 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7809db2b..68c18c8e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1340']) { + withEnv(['NEXT_BUILD_NUMBER=1341']) { // env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' From 7db6b6f9a1aba362cb1cb7ad7c486e7f9b7fbc61 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 9 Dec 2020 15:08:17 +0100 Subject: [PATCH 4/5] Fix check controllo LOTTI x ODL --- MP-TAB/WebUserControls/BaseUserControl.cs | 5 + MP-TAB/WebUserControls/mod_ODL.ascx.cs | 6 +- .../WebUserControls/mod_dettaglioProd.ascx.cs | 21 +++ MapoDb/DS_MAG.Designer.cs | 157 +++++++++++++++++- MapoDb/DS_MAG.xsd | 40 ++++- MapoDb/DS_MAG.xss | 13 +- 6 files changed, 229 insertions(+), 13 deletions(-) diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index aeb722da..9b4595a2 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -49,6 +49,11 @@ namespace MoonProTablet.WebUserControls /// public bool enableGraphJS = memLayer.ML.cdvb("enableGraphJS"); + /// + /// Abilitazione gestione LOTTI in DB MAG + /// + public bool enableMagLotti = memLayer.ML.cdvb("enableMagLotti"); + /// /// Abilitazione gestione Pezzi LAsciati in macchina /// diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index 7ec41887..d91eac61 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -1209,8 +1209,10 @@ namespace MoonProTablet.WebUserControls DataLayerObj.taODL.fixMachineSlave(idxMacchina, 30, 1); } // se c'è gestione SchedaTecnica --> chiamo procedura update x lotti - - // FixMe-ToDo + if (enableSchedaTecnica) + { + DataLayerObj.taMagELotti.UpsertByOdl(idxODL, true); + } // riporto stringa lblOut.Text = sb.ToString().Replace("---", "
"); diff --git a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs index 01a38373..228b9ec8 100644 --- a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs @@ -8,6 +8,20 @@ namespace MoonProTablet.WebUserControls { #region Private Methods + private void checkLottiOdl() + { + // controlla se abilitato check LOTTI MAG + if (enableMagLotti) + { + // controlla se ci sia lotto x ODL + if (DataLayerObj.taMagELotti.getByODL(idxOdl).Rows.Count == 0) + { + // se non c'è chiama stored x rigenerare + DataLayerObj.taMagELotti.UpsertByOdl(idxOdl, true); + } + } + } + /// /// popola le labels /// @@ -120,6 +134,13 @@ namespace MoonProTablet.WebUserControls /// protected void Page_Load(object sender, EventArgs e) { + if (!Page.IsPostBack) + { + if (enableSchedaTecnica) + { + checkLottiOdl(); + } + } try { popolaLabels(); diff --git a/MapoDb/DS_MAG.Designer.cs b/MapoDb/DS_MAG.Designer.cs index b37ba1f5..f4913c0a 100644 --- a/MapoDb/DS_MAG.Designer.cs +++ b/MapoDb/DS_MAG.Designer.cs @@ -307,6 +307,12 @@ namespace MapoDb { private global::System.Data.DataColumn columnAttivo; + private global::System.Data.DataColumn columnDescrArt; + + private global::System.Data.DataColumn columnCodArtExt; + + private global::System.Data.DataColumn columnDescStato; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public ElencoLottiDataTable() { @@ -452,6 +458,30 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DescrArtColumn { + get { + return this.columnDescrArt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn CodArtExtColumn { + get { + return this.columnCodArtExt; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DescStatoColumn { + get { + return this.columnDescStato; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -489,7 +519,24 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public ElencoLottiRow AddElencoLottiRow(string Lotto, int IdxODL, string RifExt, string TipoLotto, string CodArt, string CodStato, string Origine, System.DateTime DtCrea, string Note, decimal QtaOrig, int NumUdc, decimal QtaCurr, System.DateTime DtMod, bool Attivo) { + public ElencoLottiRow AddElencoLottiRow( + string Lotto, + int IdxODL, + string RifExt, + string TipoLotto, + string CodArt, + string CodStato, + string Origine, + System.DateTime DtCrea, + string Note, + decimal QtaOrig, + int NumUdc, + decimal QtaCurr, + System.DateTime DtMod, + bool Attivo, + string DescrArt, + string CodArtExt, + string DescStato) { ElencoLottiRow rowElencoLottiRow = ((ElencoLottiRow)(this.NewRow())); object[] columnValuesArray = new object[] { Lotto, @@ -505,7 +552,10 @@ namespace MapoDb { NumUdc, QtaCurr, DtMod, - Attivo}; + Attivo, + DescrArt, + CodArtExt, + DescStato}; rowElencoLottiRow.ItemArray = columnValuesArray; this.Rows.Add(rowElencoLottiRow); return rowElencoLottiRow; @@ -549,6 +599,9 @@ namespace MapoDb { this.columnQtaCurr = base.Columns["QtaCurr"]; this.columnDtMod = base.Columns["DtMod"]; this.columnAttivo = base.Columns["Attivo"]; + this.columnDescrArt = base.Columns["DescrArt"]; + this.columnCodArtExt = base.Columns["CodArtExt"]; + this.columnDescStato = base.Columns["DescStato"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -582,6 +635,12 @@ namespace MapoDb { base.Columns.Add(this.columnDtMod); this.columnAttivo = new global::System.Data.DataColumn("Attivo", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAttivo); + this.columnDescrArt = new global::System.Data.DataColumn("DescrArt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescrArt); + this.columnCodArtExt = new global::System.Data.DataColumn("CodArtExt", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodArtExt); + this.columnDescStato = new global::System.Data.DataColumn("DescStato", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescStato); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnLotto}, true)); this.columnLotto.AllowDBNull = false; @@ -606,6 +665,11 @@ namespace MapoDb { this.columnQtaCurr.AllowDBNull = false; this.columnDtMod.AllowDBNull = false; this.columnAttivo.AllowDBNull = false; + this.columnDescrArt.AllowDBNull = false; + this.columnDescrArt.MaxLength = 250; + this.columnCodArtExt.AllowDBNull = false; + this.columnCodArtExt.MaxLength = 50; + this.columnDescStato.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -899,6 +963,56 @@ namespace MapoDb { this[this.tableElencoLotti.AttivoColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string DescrArt { + get { + return ((string)(this[this.tableElencoLotti.DescrArtColumn])); + } + set { + this[this.tableElencoLotti.DescrArtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string CodArtExt { + get { + return ((string)(this[this.tableElencoLotti.CodArtExtColumn])); + } + set { + this[this.tableElencoLotti.CodArtExtColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string DescStato { + get { + try { + return ((string)(this[this.tableElencoLotti.DescStatoColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'DescStato\' nella tabella \'ElencoLotti\' è DBNull.", e); + } + } + set { + this[this.tableElencoLotti.DescStatoColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDescStatoNull() { + return this.IsNull(this.tableElencoLotti.DescStatoColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDescStatoNull() { + this[this.tableElencoLotti.DescStatoColumn] = global::System.Convert.DBNull; + } } /// @@ -1074,6 +1188,9 @@ namespace MapoDb.DS_MAGTableAdapters { tableMapping.ColumnMappings.Add("QtaCurr", "QtaCurr"); tableMapping.ColumnMappings.Add("DtMod", "DtMod"); tableMapping.ColumnMappings.Add("Attivo", "Attivo"); + tableMapping.ColumnMappings.Add("DescrArt", "DescrArt"); + tableMapping.ColumnMappings.Add("CodArtExt", "CodArtExt"); + tableMapping.ColumnMappings.Add("DescStato", "DescStato"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; @@ -1157,19 +1274,26 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note [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 = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note," + - " QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM dbo.ElencoLotti"; + this._commandCollection[0].CommandText = "SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea" + + ", Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo, DescrArt, CodArtExt, DescStato\r" + + "\nFROM v_ElencoLotti"; 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_EL_UpsertByOdl"; + this._commandCollection[1].CommandText = "dbo.stp_EL_getByODL"; 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("@IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@flgStorico", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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_EL_UpsertByOdl"; + 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("@IdxODL", 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("@flgStorico", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1196,6 +1320,23 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note 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.ElencoLottiDataTable getByODL(global::System.Nullable IdxODL) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((IdxODL.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxODL.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_MAG.ElencoLottiDataTable dataTable = new DS_MAG.ElencoLottiDataTable(); + 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")] @@ -1551,7 +1692,7 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int UpsertByOdl(global::System.Nullable IdxODL, global::System.Nullable flgStorico) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((IdxODL.HasValue == true)) { command.Parameters[1].Value = ((int)(IdxODL.Value)); } diff --git a/MapoDb/DS_MAG.xsd b/MapoDb/DS_MAG.xsd index d1553c09..daf057da 100644 --- a/MapoDb/DS_MAG.xsd +++ b/MapoDb/DS_MAG.xsd @@ -9,7 +9,7 @@ - + DELETE FROM [dbo].[ElencoLotti] WHERE (([Lotto] = @Original_Lotto) AND ([IdxODL] = @Original_IdxODL) AND ([RifExt] = @Original_RifExt) AND ([TipoLotto] = @Original_TipoLotto) AND ([CodArt] = @Original_CodArt) AND ([CodStato] = @Original_CodStato) AND ([Origine] = @Original_Origine) AND ([DtCrea] = @Original_DtCrea) AND ([Note] = @Original_Note) AND ([QtaOrig] = @Original_QtaOrig) AND ([NumUdc] = @Original_NumUdc) AND ([QtaCurr] = @Original_QtaCurr) AND ([DtMod] = @Original_DtMod) AND ([Attivo] = @Original_Attivo)) @@ -55,7 +55,8 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note - SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo FROM dbo.ElencoLotti + SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note, QtaOrig, NumUdc, QtaCurr, DtMod, Attivo, DescrArt, CodArtExt, DescStato +FROM v_ElencoLotti @@ -112,8 +113,22 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note + + + + + + + dbo.stp_EL_getByODL + + + + + + + @@ -195,6 +210,27 @@ SELECT Lotto, IdxODL, RifExt, TipoLotto, CodArt, CodStato, Origine, DtCrea, Note + + + + + + + + + + + + + + + + + + + + + diff --git a/MapoDb/DS_MAG.xss b/MapoDb/DS_MAG.xss index 5f282702..cf581665 100644 --- a/MapoDb/DS_MAG.xss +++ b/MapoDb/DS_MAG.xss @@ -1 +1,12 @@ - \ No newline at end of file + + + + + + + + \ No newline at end of file From 049efb1b0159d05ca837b45142778ad289df0366 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 9 Dec 2020 17:48:55 +0100 Subject: [PATCH 5/5] Fix vari x SchedaTecnica --- MP-TAB/SheetTech.aspx.cs | 11 +++++-- MP-TAB/WebUserControls/cmp_sheetTech.ascx | 1 - .../cmp_sheetTech.ascx.designer.cs | 9 ------ MP-TAB/WebUserControls/mod_ODL.ascx.cs | 32 +++++++++++-------- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/MP-TAB/SheetTech.aspx.cs b/MP-TAB/SheetTech.aspx.cs index 642354c0..7a5c2547 100644 --- a/MP-TAB/SheetTech.aspx.cs +++ b/MP-TAB/SheetTech.aspx.cs @@ -25,8 +25,15 @@ namespace MoonProTablet private void setArticolo() { // leggo riga... - DS_ProdTempi.MappaStatoExplRow rigaDati = DataLayerObj.taMSE.getByIdxMacchina(idxMacchina)[0]; - cmp_sheetTech.CodArticolo = rigaDati.CodArticolo; + if (idxODL > 0) + { + var rigaDati = DataLayerObj.taODL.getByIdx(idxODL, false)[0]; + cmp_sheetTech.CodArticolo = rigaDati.CodArticolo; + } + else + { + cmp_sheetTech.CodArticolo = ""; + } } #endregion Private Methods diff --git a/MP-TAB/WebUserControls/cmp_sheetTech.ascx b/MP-TAB/WebUserControls/cmp_sheetTech.ascx index 465bb9b1..b87430dc 100644 --- a/MP-TAB/WebUserControls/cmp_sheetTech.ascx +++ b/MP-TAB/WebUserControls/cmp_sheetTech.ascx @@ -36,6 +36,5 @@ - \ No newline at end of file diff --git a/MP-TAB/WebUserControls/cmp_sheetTech.ascx.designer.cs b/MP-TAB/WebUserControls/cmp_sheetTech.ascx.designer.cs index 16564bd2..ad7901be 100644 --- a/MP-TAB/WebUserControls/cmp_sheetTech.ascx.designer.cs +++ b/MP-TAB/WebUserControls/cmp_sheetTech.ascx.designer.cs @@ -58,14 +58,5 @@ namespace MoonProTablet.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfCodArticolo; - - /// - /// Controllo hfIdxOdl. - /// - /// - /// 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 hfIdxOdl; } } diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index d91eac61..85a0631b 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -776,7 +776,7 @@ namespace MoonProTablet.WebUserControls protected void lbtEndProd_Click(object sender, EventArgs e) { // leggo idxOdl da ultimo odl attivo x macchina - int idxODL = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; + int idxODLCurr = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; int idxEvento = 7; // !!!HARD CODED // confermo prod vecchio ODL @@ -789,11 +789,11 @@ namespace MoonProTablet.WebUserControls try { // processo x macchina selezionata - DataLayerObj.taODL.fineProd(idxODL, idxMacchinaFix); + DataLayerObj.taODL.fineProd(idxODLCurr, idxMacchinaFix); string evText = "Registrata fine produzione per ODL {0}"; StringBuilder sb = new StringBuilder(); - sb.AppendLine(String.Format(evText, idxODL)); - processaEvento(idxMacchinaFix, idxEvento, sb.ToString(), idxODL); + sb.AppendLine(String.Format(evText, idxODLCurr)); + processaEvento(idxMacchinaFix, idxEvento, sb.ToString(), idxODLCurr); // se è multi processo ANCHE x altra tavola... if (isMulti) { @@ -825,9 +825,9 @@ namespace MoonProTablet.WebUserControls try { // effettuo split su nuovo ODL - DataLayerObj.taODL.splitODL(idxODL, DataLayerObj.MatrOpr, idxMacchinaFix, TCAssegnato(idxODL), PzPallet, string.Format("Fine Produzione, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODL, TCAssegnato(idxODL)), false, 0); + DataLayerObj.taODL.splitODL(idxODLCurr, DataLayerObj.MatrOpr, idxMacchinaFix, TCAssegnato(idxODLCurr), PzPallet, string.Format("Fine Produzione, Sospensione ODL {0}, generato residuo con pari TCiclo: {1}", idxODLCurr, TCAssegnato(idxODLCurr)), false, 0); // processo chiusura setup - processaEvento(idxMacchinaFix, idxEvento, String.Format("Registrata fine produzione per ODL {0}, nuovo ODL per quantità residua", idxODL), idxODL); + processaEvento(idxMacchinaFix, idxEvento, String.Format("Registrata fine produzione per ODL {0}, nuovo ODL per quantità residua", idxODLCurr), idxODLCurr); // se è multi processo ANCHE x altra tavola... if (isMulti) @@ -857,6 +857,8 @@ namespace MoonProTablet.WebUserControls } // resetto ODL su redis... DataLayerObj.emptyCurrODL(idxMacchinaFix); + // imposto odl a zero... + idxOdl = 0; // aggiorno visualizzazione checkAll(); // sollevo evento! @@ -1149,6 +1151,8 @@ namespace MoonProTablet.WebUserControls DataLayerObj.saveCounter(idxMacchinaFix, "0"); // imposto ODL su redis... DataLayerObj.saveCurrODL(idxMacchinaFix, idxODL_curr.ToString()); + // salvo odl selezionato + idxODL = idxODL_curr; } else { @@ -1175,12 +1179,12 @@ namespace MoonProTablet.WebUserControls TCRichAttr = TCAssegnato(idxODLSel); } // leggo idxOdl da ultimo odl attivo x macchina - int idxODL = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; + int idxODLStart = DataLayerObj.taODL.getByMacchina(idxMacchinaFix)[0].IdxODL; int idxEvento = 1; // !!!HARD CODED // aggiorno (se necessario) note e tempo setup - DataLayerObj.taODL.updateSetup(idxODL, DataLayerObj.MatrOpr, TCRichAttr, PzPallet, txtNote.Text); + DataLayerObj.taODL.updateSetup(idxODLStart, DataLayerObj.MatrOpr, TCRichAttr, PzPallet, txtNote.Text); // controllo se TC Assegnato != TCRichiesto allora invio email x verifiche... - DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxODL, false)[0]; + DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxODLStart, false)[0]; if (rigaOdl.TCAssegnato != TCRichAttr) { // invio email! @@ -1189,12 +1193,12 @@ namespace MoonProTablet.WebUserControls // processo chiusura setup string evText = "Registrata inizio produzione per ODL {0}"; StringBuilder sb = new StringBuilder(); - sb.AppendLine(String.Format(evText, idxODL)); - processaEvento(idxMacchinaFix, idxEvento, sb.ToString(), idxODL); + sb.AppendLine(String.Format(evText, idxODLStart)); + processaEvento(idxMacchinaFix, idxEvento, sb.ToString(), idxODLStart); // indico INIZIO SETUP su REDIS come EXE della macchina... string ts = string.Format("{0:yyMMdd}T{0:HHmmss.fff}Z", DateTime.Now); //DataLayerObj.addTask4Machine(idxMacchina, "stopSetup", $"TS:{ts}|MATR:{DataLayerObj.MatrOpr}|ODL:{idxODL}"); - DataLayerObj.addTask4Machine(idxMacchinaFix, taskType.stopSetup, $"TS:{ts}|MATR:{DataLayerObj.MatrOpr}|ODL:{idxODL}"); + DataLayerObj.addTask4Machine(idxMacchinaFix, taskType.stopSetup, $"TS:{ts}|MATR:{DataLayerObj.MatrOpr}|ODL:{idxODLStart}"); // se è multi processo chiusura setup x altra tavola... if (isMulti) { @@ -1211,7 +1215,7 @@ namespace MoonProTablet.WebUserControls // se c'è gestione SchedaTecnica --> chiamo procedura update x lotti if (enableSchedaTecnica) { - DataLayerObj.taMagELotti.UpsertByOdl(idxODL, true); + DataLayerObj.taMagELotti.UpsertByOdl(idxODLStart, true); } // riporto stringa @@ -1220,6 +1224,8 @@ namespace MoonProTablet.WebUserControls showNoteTC(false); // update buttons... checkAll(); + // imposto odl... + idxOdl = idxODLStart; // sollevo evento! if (eh_reqUpdate != null) {