diff --git a/Jenkinsfile b/Jenkinsfile index 2f4a9a15..c3671476 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=814']) { + withEnv(['NEXT_BUILD_NUMBER=815']) { // env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx b/MP-Admin/WebUserControls/mod_gestPromODL.ascx index 8ba509c2..9022402c 100644 --- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx +++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx @@ -1,12 +1,12 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestPromODL.ascx.cs" Inherits="MoonProAdmin.WebUserControls.mod_gestPromODL" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestPromODL.ascx.cs" Inherits="MoonProAdmin.WebUserControls.mod_gestPromODL" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <%@ Register Src="mod_newOdl.ascx" TagName="mod_newOdl" TagPrefix="uc1" %>
- - + +
@@ -48,21 +48,18 @@ - <%-- - - --%> + ToolTip="Modifica num pz" ImageUrl="~/images/edit_s.png" Visible='<%# Eval("IdxOdl").ToString()=="" || Eval("IdxOdl").ToString()=="0" %>' /> - <%-- - - --%> + + + + + @@ -75,7 +72,7 @@
- +
@@ -108,17 +105,16 @@ - <%----%> - + - + - + - + @@ -126,8 +122,8 @@ - + @@ -136,27 +132,18 @@    - + - + - + + - - - - - -
diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs index 24a79746..a0764f48 100644 --- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs +++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs @@ -303,38 +303,6 @@ namespace MoonProAdmin.WebUserControls { grView.PageSize = pageSize; } - /// - /// verifica se ODL sia current = aperto (iniziato, NON concluso) - /// - /// - /// - /// - public bool OdlIsCurrent(object DataInizio, object DataFine) - { - bool answ = false; - try - { - if ((DataInizio.ToString() == "") && (DataFine.ToString() == "")) - { - answ = true; - } - } - catch - { } - if (!answ) - { - try - { - if ((Convert.ToDateTime(DataInizio) <= DateTime.Now) && (DataFine.ToString() == "")) - { - answ = true; - } - } - catch - { } - } - return answ; - } #endregion diff --git a/MapoDb/DS_IntServ.Designer.cs b/MapoDb/DS_IntServ.Designer.cs new file mode 100644 index 00000000..46df6f24 --- /dev/null +++ b/MapoDb/DS_IntServ.Designer.cs @@ -0,0 +1,1533 @@ +//------------------------------------------------------------------------------ +// +// 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_IntServ")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class DS_IntServ : global::System.Data.DataSet { + + private TransitoDatiDataTable tableTransitoDati; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public DS_IntServ() { + 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", "15.0.0.0")] + protected DS_IntServ(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["TransitoDati"] != null)) { + base.Tables.Add(new TransitoDatiDataTable(ds.Tables["TransitoDati"])); + } + 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", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public TransitoDatiDataTable TransitoDati { + get { + return this.tableTransitoDati; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.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", "15.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", "15.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", "15.0.0.0")] + public override global::System.Data.DataSet Clone() { + DS_IntServ cln = ((DS_IntServ)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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["TransitoDati"] != null)) { + base.Tables.Add(new TransitoDatiDataTable(ds.Tables["TransitoDati"])); + } + 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", "15.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", "15.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars(bool initTable) { + this.tableTransitoDati = ((TransitoDatiDataTable)(base.Tables["TransitoDati"])); + if ((initTable == true)) { + if ((this.tableTransitoDati != null)) { + this.tableTransitoDati.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.DataSetName = "DS_IntServ"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/DS_IntServ.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableTransitoDati = new TransitoDatiDataTable(); + base.Tables.Add(this.tableTransitoDati); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private bool ShouldSerializeTransitoDati() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + DS_IntServ ds = new DS_IntServ(); + 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", "15.0.0.0")] + public delegate void TransitoDatiRowChangeEventHandler(object sender, TransitoDatiRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class TransitoDatiDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnIdxRequest; + + private global::System.Data.DataColumn columnDtRequest; + + private global::System.Data.DataColumn columnDataType; + + private global::System.Data.DataColumn columnValueIN; + + private global::System.Data.DataColumn columnValueOUT; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiDataTable() { + this.TableName = "TransitoDati"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal TransitoDatiDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected TransitoDatiDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn IdxRequestColumn { + get { + return this.columnIdxRequest; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn DtRequestColumn { + get { + return this.columnDtRequest; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn DataTypeColumn { + get { + return this.columnDataType; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn ValueINColumn { + get { + return this.columnValueIN; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn ValueOUTColumn { + get { + return this.columnValueOUT; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRow this[int index] { + get { + return ((TransitoDatiRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event TransitoDatiRowChangeEventHandler TransitoDatiRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event TransitoDatiRowChangeEventHandler TransitoDatiRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event TransitoDatiRowChangeEventHandler TransitoDatiRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public event TransitoDatiRowChangeEventHandler TransitoDatiRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void AddTransitoDatiRow(TransitoDatiRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRow AddTransitoDatiRow(System.DateTime DtRequest, string DataType, string ValueIN, string ValueOUT) { + TransitoDatiRow rowTransitoDatiRow = ((TransitoDatiRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + DtRequest, + DataType, + ValueIN, + ValueOUT}; + rowTransitoDatiRow.ItemArray = columnValuesArray; + this.Rows.Add(rowTransitoDatiRow); + return rowTransitoDatiRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRow FindByIdxRequest(int IdxRequest) { + return ((TransitoDatiRow)(this.Rows.Find(new object[] { + IdxRequest}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public override global::System.Data.DataTable Clone() { + TransitoDatiDataTable cln = ((TransitoDatiDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new TransitoDatiDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal void InitVars() { + this.columnIdxRequest = base.Columns["IdxRequest"]; + this.columnDtRequest = base.Columns["DtRequest"]; + this.columnDataType = base.Columns["DataType"]; + this.columnValueIN = base.Columns["ValueIN"]; + this.columnValueOUT = base.Columns["ValueOUT"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitClass() { + this.columnIdxRequest = new global::System.Data.DataColumn("IdxRequest", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxRequest); + this.columnDtRequest = new global::System.Data.DataColumn("DtRequest", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDtRequest); + this.columnDataType = new global::System.Data.DataColumn("DataType", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDataType); + this.columnValueIN = new global::System.Data.DataColumn("ValueIN", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnValueIN); + this.columnValueOUT = new global::System.Data.DataColumn("ValueOUT", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnValueOUT); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnIdxRequest}, true)); + this.columnIdxRequest.AutoIncrement = true; + this.columnIdxRequest.AutoIncrementSeed = -1; + this.columnIdxRequest.AutoIncrementStep = -1; + this.columnIdxRequest.AllowDBNull = false; + this.columnIdxRequest.ReadOnly = true; + this.columnIdxRequest.Unique = true; + this.columnDtRequest.AllowDBNull = false; + this.columnDataType.AllowDBNull = false; + this.columnDataType.MaxLength = 50; + this.columnValueIN.AllowDBNull = false; + this.columnValueIN.MaxLength = 50; + this.columnValueOUT.AllowDBNull = false; + this.columnValueOUT.MaxLength = 2147483647; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRow NewTransitoDatiRow() { + return ((TransitoDatiRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new TransitoDatiRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(TransitoDatiRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.TransitoDatiRowChanged != null)) { + this.TransitoDatiRowChanged(this, new TransitoDatiRowChangeEvent(((TransitoDatiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.TransitoDatiRowChanging != null)) { + this.TransitoDatiRowChanging(this, new TransitoDatiRowChangeEvent(((TransitoDatiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.TransitoDatiRowDeleted != null)) { + this.TransitoDatiRowDeleted(this, new TransitoDatiRowChangeEvent(((TransitoDatiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.TransitoDatiRowDeleting != null)) { + this.TransitoDatiRowDeleting(this, new TransitoDatiRowChangeEvent(((TransitoDatiRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void RemoveTransitoDatiRow(TransitoDatiRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_IntServ ds = new DS_IntServ(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "TransitoDatiDataTable"; + 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 TransitoDatiRow : global::System.Data.DataRow { + + private TransitoDatiDataTable tableTransitoDati; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal TransitoDatiRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableTransitoDati = ((TransitoDatiDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int IdxRequest { + get { + return ((int)(this[this.tableTransitoDati.IdxRequestColumn])); + } + set { + this[this.tableTransitoDati.IdxRequestColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public System.DateTime DtRequest { + get { + return ((global::System.DateTime)(this[this.tableTransitoDati.DtRequestColumn])); + } + set { + this[this.tableTransitoDati.DtRequestColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string DataType { + get { + return ((string)(this[this.tableTransitoDati.DataTypeColumn])); + } + set { + this[this.tableTransitoDati.DataTypeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string ValueIN { + get { + return ((string)(this[this.tableTransitoDati.ValueINColumn])); + } + set { + this[this.tableTransitoDati.ValueINColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string ValueOUT { + get { + return ((string)(this[this.tableTransitoDati.ValueOUTColumn])); + } + set { + this[this.tableTransitoDati.ValueOUTColumn] = value; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public class TransitoDatiRowChangeEvent : global::System.EventArgs { + + private TransitoDatiRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRowChangeEvent(TransitoDatiRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} +namespace MapoDb.DS_IntServTableAdapters { + + + /// + ///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 TransitoDatiTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public TransitoDatiTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "TransitoDati"; + tableMapping.ColumnMappings.Add("IdxRequest", "IdxRequest"); + tableMapping.ColumnMappings.Add("DtRequest", "DtRequest"); + tableMapping.ColumnMappings.Add("DataType", "DataType"); + tableMapping.ColumnMappings.Add("ValueIN", "ValueIN"); + tableMapping.ColumnMappings.Add("ValueOUT", "ValueOUT"); + 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].[TransitoDati] WHERE (([IdxRequest] = @Original_IdxRequest) AND" + + " ([DtRequest] = @Original_DtRequest) AND ([DataType] = @Original_DataType) AND (" + + "[ValueIN] = @Original_ValueIN))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxRequest", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxRequest", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtRequest", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtRequest", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataType", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValueIN", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueIN", 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].[TransitoDati] ([DtRequest], [DataType], [ValueIN], [ValueOUT])" + + " VALUES (@DtRequest, @DataType, @ValueIN, @ValueOUT);\r\nSELECT IdxRequest, DtRequ" + + "est, DataType, ValueIN, ValueOUT FROM TransitoDati WHERE (IdxRequest = SCOPE_IDE" + + "NTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRequest", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtRequest", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataType", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValueIN", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueIN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValueOUT", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueOUT", 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].[TransitoDati] SET [DtRequest] = @DtRequest, [DataType] = @DataType, [ValueIN] = @ValueIN, [ValueOUT] = @ValueOUT WHERE (([IdxRequest] = @Original_IdxRequest) AND ([DtRequest] = @Original_DtRequest) AND ([DataType] = @Original_DataType) AND ([ValueIN] = @Original_ValueIN)); +SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHERE (IdxRequest = @IdxRequest)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRequest", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtRequest", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataType", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValueIN", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueIN", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValueOUT", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueOUT", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxRequest", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxRequest", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DtRequest", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtRequest", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataType", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataType", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ValueIN", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ValueIN", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxRequest", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxRequest", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonPro_IS_ConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM dbo.TransitoDati"; + 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_OrdiniByKey"; + 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("@OrderKey", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_IntServ.TransitoDatiDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_IntServ.TransitoDatiDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_IntServ.TransitoDatiDataTable dataTable = new DS_IntServ.TransitoDatiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_IntServ.TransitoDatiDataTable getOrdini(string OrderKey) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((OrderKey == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(OrderKey)); + } + DS_IntServ.TransitoDatiDataTable dataTable = new DS_IntServ.TransitoDatiDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ.TransitoDatiDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_IntServ dataSet) { + return this.Adapter.Update(dataSet, "TransitoDati"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_IdxRequest, System.DateTime Original_DtRequest, string Original_DataType, string Original_ValueIN) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_IdxRequest)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_DtRequest)); + if ((Original_DataType == null)) { + throw new global::System.ArgumentNullException("Original_DataType"); + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_DataType)); + } + if ((Original_ValueIN == null)) { + throw new global::System.ArgumentNullException("Original_ValueIN"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ValueIN)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(System.DateTime DtRequest, string DataType, string ValueIN, string ValueOUT) { + this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(DtRequest)); + if ((DataType == null)) { + throw new global::System.ArgumentNullException("DataType"); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(DataType)); + } + if ((ValueIN == null)) { + throw new global::System.ArgumentNullException("ValueIN"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ValueIN)); + } + if ((ValueOUT == null)) { + throw new global::System.ArgumentNullException("ValueOUT"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(ValueOUT)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime DtRequest, string DataType, string ValueIN, string ValueOUT, int Original_IdxRequest, System.DateTime Original_DtRequest, string Original_DataType, string Original_ValueIN, int IdxRequest) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(DtRequest)); + if ((DataType == null)) { + throw new global::System.ArgumentNullException("DataType"); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(DataType)); + } + if ((ValueIN == null)) { + throw new global::System.ArgumentNullException("ValueIN"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ValueIN)); + } + if ((ValueOUT == null)) { + throw new global::System.ArgumentNullException("ValueOUT"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(ValueOUT)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_IdxRequest)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(Original_DtRequest)); + if ((Original_DataType == null)) { + throw new global::System.ArgumentNullException("Original_DataType"); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_DataType)); + } + if ((Original_ValueIN == null)) { + throw new global::System.ArgumentNullException("Original_ValueIN"); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_ValueIN)); + } + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(IdxRequest)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime DtRequest, string DataType, string ValueIN, string ValueOUT, int Original_IdxRequest, System.DateTime Original_DtRequest, string Original_DataType, string Original_ValueIN) { + return this.Update(DtRequest, DataType, ValueIN, ValueOUT, Original_IdxRequest, Original_DtRequest, Original_DataType, Original_ValueIN, Original_IdxRequest); + } + } + + /// + ///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 TransitoDatiTableAdapter _transitoDatiTableAdapter; + + private bool _backupDataSetBeforeUpdate; + + private global::System.Data.IDbConnection _connection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public TransitoDatiTableAdapter TransitoDatiTableAdapter { + get { + return this._transitoDatiTableAdapter; + } + set { + this._transitoDatiTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public global::System.Data.IDbConnection Connection { + get { + if ((this._connection != null)) { + return this._connection; + } + if (((this._transitoDatiTableAdapter != null) + && (this._transitoDatiTableAdapter.Connection != null))) { + return this._transitoDatiTableAdapter.Connection; + } + return null; + } + set { + this._connection = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int TableAdapterInstanceCount { + get { + int count = 0; + if ((this._transitoDatiTableAdapter != 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", "15.0.0.0")] + private int UpdateUpdatedRows(DS_IntServ dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._transitoDatiTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.TransitoDati.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._transitoDatiTableAdapter.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", "15.0.0.0")] + private int UpdateInsertedRows(DS_IntServ dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._transitoDatiTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.TransitoDati.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._transitoDatiTableAdapter.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", "15.0.0.0")] + private int UpdateDeletedRows(DS_IntServ dataSet, global::System.Collections.Generic.List allChangedRows) { + int result = 0; + if ((this._transitoDatiTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.TransitoDati.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._transitoDatiTableAdapter.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", "15.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", "15.0.0.0")] + public virtual int UpdateAll(DS_IntServ dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._transitoDatiTableAdapter != null) + && (this.MatchTableAdapterConnection(this._transitoDatiTableAdapter.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._transitoDatiTableAdapter != null)) { + revertConnections.Add(this._transitoDatiTableAdapter, this._transitoDatiTableAdapter.Connection); + this._transitoDatiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._transitoDatiTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._transitoDatiTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._transitoDatiTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._transitoDatiTableAdapter.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._transitoDatiTableAdapter != null)) { + this._transitoDatiTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._transitoDatiTableAdapter])); + this._transitoDatiTableAdapter.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", "15.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", "15.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", "15.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", "15.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", "15.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", "15.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", "15.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_IntServ.xsd b/MapoDb/DS_IntServ.xsd index 174c3395..22e95d4c 100644 --- a/MapoDb/DS_IntServ.xsd +++ b/MapoDb/DS_IntServ.xsd @@ -4,7 +4,7 @@ - + @@ -66,7 +66,7 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER - + dbo.stp_OrdiniByKey @@ -87,7 +87,7 @@ SELECT IdxRequest, DtRequest, DataType, ValueIN, ValueOUT FROM TransitoDati WHER - + diff --git a/MapoDb/DS_ProdTempi.Designer.cs b/MapoDb/DS_ProdTempi.Designer.cs index 6258abbc..045fcd5d 100644 --- a/MapoDb/DS_ProdTempi.Designer.cs +++ b/MapoDb/DS_ProdTempi.Designer.cs @@ -9441,16 +9441,24 @@ namespace MapoDb { private global::System.Data.DataColumn columnKeyRichiesta; + private global::System.Data.DataColumn columnKeyBCode; + private global::System.Data.DataColumn columnAttivabile; private global::System.Data.DataColumn columnIdxODL; private global::System.Data.DataColumn columnCodArticolo; + private global::System.Data.DataColumn columnDescArticolo; + private global::System.Data.DataColumn columnCodGruppo; private global::System.Data.DataColumn columnIdxMacchina; + private global::System.Data.DataColumn columnCodMacchina; + + private global::System.Data.DataColumn columnNome; + private global::System.Data.DataColumn columnNumPezzi; private global::System.Data.DataColumn columnTCAssegnato; @@ -9459,6 +9467,8 @@ namespace MapoDb { private global::System.Data.DataColumn columnPriorita; + private global::System.Data.DataColumn columnPzPallet; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public PromesseODLDataTable() { @@ -9508,6 +9518,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn KeyBCodeColumn { + get { + return this.columnKeyBCode; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataColumn AttivabileColumn { @@ -9532,6 +9550,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn DescArticoloColumn { + get { + return this.columnDescArticolo; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataColumn CodGruppoColumn { @@ -9548,6 +9574,22 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn CodMacchinaColumn { + get { + return this.columnCodMacchina; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn NomeColumn { + get { + return this.columnNome; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public global::System.Data.DataColumn NumPezziColumn { @@ -9580,6 +9622,14 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn PzPalletColumn { + get { + return this.columnPzPallet; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -9617,20 +9667,25 @@ namespace MapoDb { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public PromesseODLRow AddPromesseODLRow(string KeyRichiesta, bool Attivabile, int IdxODL, string CodArticolo, string CodGruppo, string IdxMacchina, int NumPezzi, decimal TCAssegnato, System.DateTime DueDate, int Priorita) { + public PromesseODLRow AddPromesseODLRow(string KeyRichiesta, string KeyBCode, bool Attivabile, int IdxODL, string CodArticolo, string DescArticolo, string CodGruppo, string IdxMacchina, string CodMacchina, string Nome, int NumPezzi, decimal TCAssegnato, System.DateTime DueDate, int Priorita, int PzPallet) { PromesseODLRow rowPromesseODLRow = ((PromesseODLRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, KeyRichiesta, + KeyBCode, Attivabile, IdxODL, CodArticolo, + DescArticolo, CodGruppo, IdxMacchina, + CodMacchina, + Nome, NumPezzi, TCAssegnato, DueDate, - Priorita}; + Priorita, + PzPallet}; rowPromesseODLRow.ItemArray = columnValuesArray; this.Rows.Add(rowPromesseODLRow); return rowPromesseODLRow; @@ -9662,15 +9717,20 @@ namespace MapoDb { internal void InitVars() { this.columnidxPromessa = base.Columns["idxPromessa"]; this.columnKeyRichiesta = base.Columns["KeyRichiesta"]; + this.columnKeyBCode = base.Columns["KeyBCode"]; this.columnAttivabile = base.Columns["Attivabile"]; this.columnIdxODL = base.Columns["IdxODL"]; this.columnCodArticolo = base.Columns["CodArticolo"]; + this.columnDescArticolo = base.Columns["DescArticolo"]; this.columnCodGruppo = base.Columns["CodGruppo"]; this.columnIdxMacchina = base.Columns["IdxMacchina"]; + this.columnCodMacchina = base.Columns["CodMacchina"]; + this.columnNome = base.Columns["Nome"]; this.columnNumPezzi = base.Columns["NumPezzi"]; this.columnTCAssegnato = base.Columns["TCAssegnato"]; this.columnDueDate = base.Columns["DueDate"]; this.columnPriorita = base.Columns["Priorita"]; + this.columnPzPallet = base.Columns["PzPallet"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -9680,16 +9740,24 @@ namespace MapoDb { base.Columns.Add(this.columnidxPromessa); this.columnKeyRichiesta = new global::System.Data.DataColumn("KeyRichiesta", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnKeyRichiesta); + this.columnKeyBCode = new global::System.Data.DataColumn("KeyBCode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnKeyBCode); this.columnAttivabile = new global::System.Data.DataColumn("Attivabile", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAttivabile); this.columnIdxODL = new global::System.Data.DataColumn("IdxODL", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnIdxODL); this.columnCodArticolo = new global::System.Data.DataColumn("CodArticolo", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodArticolo); + this.columnDescArticolo = new global::System.Data.DataColumn("DescArticolo", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescArticolo); this.columnCodGruppo = new global::System.Data.DataColumn("CodGruppo", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnCodGruppo); this.columnIdxMacchina = new global::System.Data.DataColumn("IdxMacchina", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnIdxMacchina); + this.columnCodMacchina = new global::System.Data.DataColumn("CodMacchina", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCodMacchina); + this.columnNome = new global::System.Data.DataColumn("Nome", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnNome); this.columnNumPezzi = new global::System.Data.DataColumn("NumPezzi", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumPezzi); this.columnTCAssegnato = new global::System.Data.DataColumn("TCAssegnato", typeof(decimal), null, global::System.Data.MappingType.Element); @@ -9698,6 +9766,8 @@ namespace MapoDb { base.Columns.Add(this.columnDueDate); this.columnPriorita = new global::System.Data.DataColumn("Priorita", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnPriorita); + this.columnPzPallet = new global::System.Data.DataColumn("PzPallet", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPzPallet); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidxPromessa}, true)); this.columnidxPromessa.AutoIncrement = true; @@ -9708,18 +9778,26 @@ namespace MapoDb { this.columnidxPromessa.Unique = true; this.columnKeyRichiesta.AllowDBNull = false; this.columnKeyRichiesta.MaxLength = 50; + this.columnKeyBCode.AllowDBNull = false; + this.columnKeyBCode.MaxLength = 50; this.columnAttivabile.AllowDBNull = false; this.columnIdxODL.AllowDBNull = false; this.columnCodArticolo.AllowDBNull = false; this.columnCodArticolo.MaxLength = 50; + this.columnDescArticolo.ReadOnly = true; + this.columnDescArticolo.MaxLength = 250; this.columnCodGruppo.AllowDBNull = false; this.columnCodGruppo.MaxLength = 50; this.columnIdxMacchina.AllowDBNull = false; this.columnIdxMacchina.MaxLength = 50; + this.columnCodMacchina.ReadOnly = true; + this.columnCodMacchina.MaxLength = 50; + this.columnNome.MaxLength = 50; this.columnNumPezzi.AllowDBNull = false; this.columnTCAssegnato.AllowDBNull = false; this.columnDueDate.AllowDBNull = false; this.columnPriorita.AllowDBNull = false; + this.columnPzPallet.AllowDBNull = false; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -14795,6 +14873,17 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string KeyBCode { + get { + return ((string)(this[this.tablePromesseODL.KeyBCodeColumn])); + } + set { + this[this.tablePromesseODL.KeyBCodeColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool Attivabile { @@ -14828,6 +14917,22 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string DescArticolo { + get { + try { + return ((string)(this[this.tablePromesseODL.DescArticoloColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'DescArticolo\' nella tabella \'PromesseODL\' è DBNull.", e); + } + } + set { + this[this.tablePromesseODL.DescArticoloColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public string CodGruppo { @@ -14850,6 +14955,38 @@ namespace MapoDb { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string CodMacchina { + get { + try { + return ((string)(this[this.tablePromesseODL.CodMacchinaColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'CodMacchina\' nella tabella \'PromesseODL\' è DBNull.", e); + } + } + set { + this[this.tablePromesseODL.CodMacchinaColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string Nome { + get { + try { + return ((string)(this[this.tablePromesseODL.NomeColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Nome\' nella tabella \'PromesseODL\' è DBNull.", e); + } + } + set { + this[this.tablePromesseODL.NomeColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public int NumPezzi { @@ -14893,6 +15030,53 @@ namespace MapoDb { this[this.tablePromesseODL.PrioritaColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public int PzPallet { + get { + return ((int)(this[this.tablePromesseODL.PzPalletColumn])); + } + set { + this[this.tablePromesseODL.PzPalletColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsDescArticoloNull() { + return this.IsNull(this.tablePromesseODL.DescArticoloColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetDescArticoloNull() { + this[this.tablePromesseODL.DescArticoloColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsCodMacchinaNull() { + return this.IsNull(this.tablePromesseODL.CodMacchinaColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetCodMacchinaNull() { + this[this.tablePromesseODL.CodMacchinaColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsNomeNull() { + return this.IsNull(this.tablePromesseODL.NomeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetNomeNull() { + this[this.tablePromesseODL.NomeColumn] = global::System.Convert.DBNull; + } } /// @@ -16448,9 +16632,10 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Approvato", 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 = "DELETE FROM [dbo].[ODL] WHERE ([IdxODL] = @Original_IdxODL)"; - this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IdxODL", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._commandCollection[2].CommandText = "dbo.stp_ODL_deleteQuery"; + 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("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; this._commandCollection[3].CommandText = "dbo.stp_ODL_fineProd"; @@ -16847,9 +17032,14 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] - public virtual int DeleteQuery(int Original_IdxODL) { + public virtual int DeleteQuery(global::System.Nullable Original_IdxODL) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; - command.Parameters[0].Value = ((int)(Original_IdxODL)); + if ((Original_IdxODL.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_IdxODL.Value)); + } + else { + command.Parameters[1].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)) { @@ -26705,73 +26895,21 @@ FROM MappaStatoExpl"; tableMapping.DataSetTable = "PromesseODL"; tableMapping.ColumnMappings.Add("idxPromessa", "idxPromessa"); tableMapping.ColumnMappings.Add("KeyRichiesta", "KeyRichiesta"); + tableMapping.ColumnMappings.Add("KeyBCode", "KeyBCode"); tableMapping.ColumnMappings.Add("Attivabile", "Attivabile"); tableMapping.ColumnMappings.Add("IdxODL", "IdxODL"); tableMapping.ColumnMappings.Add("CodArticolo", "CodArticolo"); + tableMapping.ColumnMappings.Add("DescArticolo", "DescArticolo"); tableMapping.ColumnMappings.Add("CodGruppo", "CodGruppo"); tableMapping.ColumnMappings.Add("IdxMacchina", "IdxMacchina"); + tableMapping.ColumnMappings.Add("CodMacchina", "CodMacchina"); + tableMapping.ColumnMappings.Add("Nome", "Nome"); tableMapping.ColumnMappings.Add("NumPezzi", "NumPezzi"); tableMapping.ColumnMappings.Add("TCAssegnato", "TCAssegnato"); tableMapping.ColumnMappings.Add("DueDate", "DueDate"); tableMapping.ColumnMappings.Add("Priorita", "Priorita"); + tableMapping.ColumnMappings.Add("PzPallet", "PzPallet"); 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].[PromesseODL] WHERE (([idxPromessa] = @Original_idxPromessa) AND ([KeyRichiesta] = @Original_KeyRichiesta) AND ([Attivabile] = @Original_Attivabile) AND ([IdxODL] = @Original_IdxODL) AND ([CodArticolo] = @Original_CodArticolo) AND ([CodGruppo] = @Original_CodGruppo) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([NumPezzi] = @Original_NumPezzi) AND ([TCAssegnato] = @Original_TCAssegnato) AND ([DueDate] = @Original_DueDate) AND ([Priorita] = @Original_Priorita))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPromessa", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyRichiesta", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Attivabile", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivabile", 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_CodArticolo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodGruppo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodGruppo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumPezzi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPezzi", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TCAssegnato", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 8, "TCAssegnato", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priorita", 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].[PromesseODL] ([KeyRichiesta], [Attivabile], [IdxODL], [CodArticolo], [CodGruppo], [IdxMacchina], [NumPezzi], [TCAssegnato], [DueDate], [Priorita]) VALUES (@KeyRichiesta, @Attivabile, @IdxODL, @CodArticolo, @CodGruppo, @IdxMacchina, @NumPezzi, @TCAssegnato, @DueDate, @Priorita); -SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM PromesseODL WHERE (idxPromessa = SCOPE_IDENTITY())"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyRichiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivabile", 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("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodGruppo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPezzi", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 8, "TCAssegnato", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priorita", 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].[PromesseODL] SET [KeyRichiesta] = @KeyRichiesta, [Attivabile] = @Attivabile, [IdxODL] = @IdxODL, [CodArticolo] = @CodArticolo, [CodGruppo] = @CodGruppo, [IdxMacchina] = @IdxMacchina, [NumPezzi] = @NumPezzi, [TCAssegnato] = @TCAssegnato, [DueDate] = @DueDate, [Priorita] = @Priorita WHERE (([idxPromessa] = @Original_idxPromessa) AND ([KeyRichiesta] = @Original_KeyRichiesta) AND ([Attivabile] = @Original_Attivabile) AND ([IdxODL] = @Original_IdxODL) AND ([CodArticolo] = @Original_CodArticolo) AND ([CodGruppo] = @Original_CodGruppo) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([NumPezzi] = @Original_NumPezzi) AND ([TCAssegnato] = @Original_TCAssegnato) AND ([DueDate] = @Original_DueDate) AND ([Priorita] = @Original_Priorita)); -SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM PromesseODL WHERE (idxPromessa = @idxPromessa)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyRichiesta", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivabile", 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("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodGruppo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPezzi", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 8, "TCAssegnato", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priorita", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idxPromessa", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KeyRichiesta", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Attivabile", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Attivabile", 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_CodArticolo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodArticolo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodGruppo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodGruppo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_NumPezzi", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPezzi", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TCAssegnato", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 18, 8, "TCAssegnato", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DueDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DueDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priorita", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priorita", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idxPromessa", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -26784,18 +26922,47 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Idx" + - "Macchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM dbo.PromesseODL"; + this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_PODL_exp"; 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_PODL_getByIdx"; + this._commandCollection[1].CommandText = "dbo.stp_PODL_deleteQuery"; 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("@IdxPromessa", 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("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_PODL_getByIdx"; + 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("@IdxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_PODL_insertQuery"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyBCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priorita", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "dbo.stp_PODL_updateQta"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -26827,7 +26994,7 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_ProdTempi.PromesseODLDataTable getByKey(global::System.Nullable IdxPromessa) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((IdxPromessa.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(IdxPromessa.Value)); } @@ -26842,267 +27009,157 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_ProdTempi.PromesseODLDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(DS_ProdTempi dataSet) { - return this.Adapter.Update(dataSet, "PromesseODL"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_idxPromessa, string Original_KeyRichiesta, bool Original_Attivabile, int Original_IdxODL, string Original_CodArticolo, string Original_CodGruppo, string Original_IdxMacchina, int Original_NumPezzi, decimal Original_TCAssegnato, System.DateTime Original_DueDate, int Original_Priorita) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idxPromessa)); - if ((Original_KeyRichiesta == null)) { - throw new global::System.ArgumentNullException("Original_KeyRichiesta"); + public virtual int deleteQuery(global::System.Nullable Original_idxPromessa) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_idxPromessa.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxPromessa.Value)); } else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_KeyRichiesta)); + command.Parameters[1].Value = global::System.DBNull.Value; } - this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_Attivabile)); - this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_IdxODL)); - if ((Original_CodArticolo == null)) { - throw new global::System.ArgumentNullException("Original_CodArticolo"); - } - else { - this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_CodArticolo)); - } - if ((Original_CodGruppo == null)) { - throw new global::System.ArgumentNullException("Original_CodGruppo"); - } - else { - this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_CodGruppo)); - } - if ((Original_IdxMacchina == null)) { - throw new global::System.ArgumentNullException("Original_IdxMacchina"); - } - else { - this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_IdxMacchina)); - } - this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(Original_NumPezzi)); - this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_TCAssegnato)); - this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_DueDate)); - this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_Priorita)); - 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 previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); + command.Connection.Open(); } + int returnValue; try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; + returnValue = command.ExecuteNonQuery(); } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); + command.Connection.Close(); } } + return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string KeyRichiesta, bool Attivabile, int IdxODL, string CodArticolo, string CodGruppo, string IdxMacchina, int NumPezzi, decimal TCAssegnato, System.DateTime DueDate, int Priorita) { + public virtual int insertQuery(string KeyRichiesta, string KeyBCode, global::System.Nullable Attivabile, string CodArticolo, string CodGruppo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, global::System.Nullable DueDate, global::System.Nullable Priorita, global::System.Nullable PzPallet) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((KeyRichiesta == null)) { - throw new global::System.ArgumentNullException("KeyRichiesta"); + command.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(KeyRichiesta)); + command.Parameters[1].Value = ((string)(KeyRichiesta)); + } + if ((KeyBCode == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(KeyBCode)); + } + if ((Attivabile.HasValue == true)) { + command.Parameters[3].Value = ((bool)(Attivabile.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; } - this.Adapter.InsertCommand.Parameters[1].Value = ((bool)(Attivabile)); - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(IdxODL)); if ((CodArticolo == null)) { - throw new global::System.ArgumentNullException("CodArticolo"); + command.Parameters[4].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[3].Value = ((string)(CodArticolo)); + command.Parameters[4].Value = ((string)(CodArticolo)); } if ((CodGruppo == null)) { - throw new global::System.ArgumentNullException("CodGruppo"); + command.Parameters[5].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[4].Value = ((string)(CodGruppo)); + command.Parameters[5].Value = ((string)(CodGruppo)); } if ((IdxMacchina == null)) { - throw new global::System.ArgumentNullException("IdxMacchina"); + command.Parameters[6].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[5].Value = ((string)(IdxMacchina)); + command.Parameters[6].Value = ((string)(IdxMacchina)); } - this.Adapter.InsertCommand.Parameters[6].Value = ((int)(NumPezzi)); - this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(TCAssegnato)); - this.Adapter.InsertCommand.Parameters[8].Value = ((System.DateTime)(DueDate)); - this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Priorita)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + if ((NumPezzi.HasValue == true)) { + command.Parameters[7].Value = ((int)(NumPezzi.Value)); + } + else { + command.Parameters[7].Value = global::System.DBNull.Value; + } + if ((TCAssegnato.HasValue == true)) { + command.Parameters[8].Value = ((decimal)(TCAssegnato.Value)); + } + else { + command.Parameters[8].Value = global::System.DBNull.Value; + } + if ((DueDate.HasValue == true)) { + command.Parameters[9].Value = ((System.DateTime)(DueDate.Value)); + } + else { + command.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Priorita.HasValue == true)) { + command.Parameters[10].Value = ((int)(Priorita.Value)); + } + else { + command.Parameters[10].Value = global::System.DBNull.Value; + } + if ((PzPallet.HasValue == true)) { + command.Parameters[11].Value = ((int)(PzPallet.Value)); + } + else { + command.Parameters[11].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)) { - this.Adapter.InsertCommand.Connection.Open(); + command.Connection.Open(); } + int returnValue; try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; + returnValue = command.ExecuteNonQuery(); } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); + command.Connection.Close(); } } + return returnValue; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update( - string KeyRichiesta, - bool Attivabile, - int IdxODL, - string CodArticolo, - string CodGruppo, - string IdxMacchina, - int NumPezzi, - decimal TCAssegnato, - System.DateTime DueDate, - int Priorita, - int Original_idxPromessa, - string Original_KeyRichiesta, - bool Original_Attivabile, - int Original_IdxODL, - string Original_CodArticolo, - string Original_CodGruppo, - string Original_IdxMacchina, - int Original_NumPezzi, - decimal Original_TCAssegnato, - System.DateTime Original_DueDate, - int Original_Priorita, - int idxPromessa) { - if ((KeyRichiesta == null)) { - throw new global::System.ArgumentNullException("KeyRichiesta"); + public virtual int updateQta(global::System.Nullable NumPezzi, global::System.Nullable PzPallet, global::System.Nullable Original_idxPromessa) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + if ((NumPezzi.HasValue == true)) { + command.Parameters[1].Value = ((int)(NumPezzi.Value)); } else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(KeyRichiesta)); + command.Parameters[1].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[1].Value = ((bool)(Attivabile)); - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(IdxODL)); - if ((CodArticolo == null)) { - throw new global::System.ArgumentNullException("CodArticolo"); + if ((PzPallet.HasValue == true)) { + command.Parameters[2].Value = ((int)(PzPallet.Value)); } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(CodArticolo)); + command.Parameters[2].Value = global::System.DBNull.Value; } - if ((CodGruppo == null)) { - throw new global::System.ArgumentNullException("CodGruppo"); + if ((Original_idxPromessa.HasValue == true)) { + command.Parameters[3].Value = ((int)(Original_idxPromessa.Value)); } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(CodGruppo)); + command.Parameters[3].Value = global::System.DBNull.Value; } - if ((IdxMacchina == null)) { - throw new global::System.ArgumentNullException("IdxMacchina"); - } - else { - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(IdxMacchina)); - } - this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(NumPezzi)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(TCAssegnato)); - this.Adapter.UpdateCommand.Parameters[8].Value = ((System.DateTime)(DueDate)); - this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Priorita)); - this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_idxPromessa)); - if ((Original_KeyRichiesta == null)) { - throw new global::System.ArgumentNullException("Original_KeyRichiesta"); - } - else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_KeyRichiesta)); - } - this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_Attivabile)); - this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_IdxODL)); - if ((Original_CodArticolo == null)) { - throw new global::System.ArgumentNullException("Original_CodArticolo"); - } - else { - this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_CodArticolo)); - } - if ((Original_CodGruppo == null)) { - throw new global::System.ArgumentNullException("Original_CodGruppo"); - } - else { - this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_CodGruppo)); - } - if ((Original_IdxMacchina == null)) { - throw new global::System.ArgumentNullException("Original_IdxMacchina"); - } - else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_IdxMacchina)); - } - this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_NumPezzi)); - this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_TCAssegnato)); - this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_DueDate)); - this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(Original_Priorita)); - this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(idxPromessa)); - 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 previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); + command.Connection.Open(); } + int returnValue; try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; + returnValue = command.ExecuteNonQuery(); } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); + command.Connection.Close(); } } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update( - string KeyRichiesta, - bool Attivabile, - int IdxODL, - string CodArticolo, - string CodGruppo, - string IdxMacchina, - int NumPezzi, - decimal TCAssegnato, - System.DateTime DueDate, - int Priorita, - int Original_idxPromessa, - string Original_KeyRichiesta, - bool Original_Attivabile, - int Original_IdxODL, - string Original_CodArticolo, - string Original_CodGruppo, - string Original_IdxMacchina, - int Original_NumPezzi, - decimal Original_TCAssegnato, - System.DateTime Original_DueDate, - int Original_Priorita) { - return this.Update(KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita, Original_idxPromessa, Original_KeyRichiesta, Original_Attivabile, Original_IdxODL, Original_CodArticolo, Original_CodGruppo, Original_IdxMacchina, Original_NumPezzi, Original_TCAssegnato, Original_DueDate, Original_Priorita, Original_idxPromessa); + return returnValue; } } @@ -27134,8 +27191,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id private MappaStatoExplTableAdapter _mappaStatoExplTableAdapter; - private PromesseODLTableAdapter _promesseODLTableAdapter; - private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -27263,20 +27318,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public PromesseODLTableAdapter PromesseODLTableAdapter { - get { - return this._promesseODLTableAdapter; - } - set { - this._promesseODLTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -27328,10 +27369,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id && (this._mappaStatoExplTableAdapter.Connection != null))) { return this._mappaStatoExplTableAdapter.Connection; } - if (((this._promesseODLTableAdapter != null) - && (this._promesseODLTableAdapter.Connection != null))) { - return this._promesseODLTableAdapter.Connection; - } return null; } set { @@ -27369,9 +27406,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id if ((this._mappaStatoExplTableAdapter != null)) { count = (count + 1); } - if ((this._promesseODLTableAdapter != null)) { - count = (count + 1); - } return count; } } @@ -27455,15 +27489,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id allChangedRows.AddRange(updatedRows); } } - if ((this._promesseODLTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.PromesseODL.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._promesseODLTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } return result; } @@ -27538,14 +27563,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id allAddedRows.AddRange(addedRows); } } - if ((this._promesseODLTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.PromesseODL.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._promesseODLTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } return result; } @@ -27556,14 +27573,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private int UpdateDeletedRows(DS_ProdTempi dataSet, global::System.Collections.Generic.List allChangedRows) { int result = 0; - if ((this._promesseODLTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.PromesseODL.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._promesseODLTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._anagArticoliTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.AnagArticoli.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -27707,11 +27716,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id throw new global::System.ArgumentException("Tutti gli oggetti TableAdapter gestiti da TableAdapterManager devono utilizzare l" + "a stessa stringa di connessione."); } - if (((this._promesseODLTableAdapter != null) - && (this.MatchTableAdapterConnection(this._promesseODLTableAdapter.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" + @@ -27817,15 +27821,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id adaptersWithAcceptChangesDuringUpdate.Add(this._mappaStatoExplTableAdapter.Adapter); } } - if ((this._promesseODLTableAdapter != null)) { - revertConnections.Add(this._promesseODLTableAdapter, this._promesseODLTableAdapter.Connection); - this._promesseODLTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._promesseODLTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._promesseODLTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._promesseODLTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._promesseODLTableAdapter.Adapter); - } - } // //---- Perform updates ----------- // @@ -27916,10 +27911,6 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id this._mappaStatoExplTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._mappaStatoExplTableAdapter])); this._mappaStatoExplTableAdapter.Transaction = null; } - if ((this._promesseODLTableAdapter != null)) { - this._promesseODLTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._promesseODLTableAdapter])); - this._promesseODLTableAdapter.Transaction = null; - } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 30bbb9b1..e9e73229 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -200,10 +200,11 @@ ORDER BY idxODL DESC - - DELETE FROM [dbo].[ODL] WHERE ([IdxODL] = @Original_IdxODL) + + dbo.stp_ODL_deleteQuery - + + @@ -2057,95 +2058,46 @@ FROM dbo.v_RegistroScarti - - - - DELETE FROM [dbo].[PromesseODL] WHERE (([idxPromessa] = @Original_idxPromessa) AND ([KeyRichiesta] = @Original_KeyRichiesta) AND ([Attivabile] = @Original_Attivabile) AND ([IdxODL] = @Original_IdxODL) AND ([CodArticolo] = @Original_CodArticolo) AND ([CodGruppo] = @Original_CodGruppo) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([NumPezzi] = @Original_NumPezzi) AND ([TCAssegnato] = @Original_TCAssegnato) AND ([DueDate] = @Original_DueDate) AND ([Priorita] = @Original_Priorita)) - - - - - - - - - - - - - - - - - - INSERT INTO [dbo].[PromesseODL] ([KeyRichiesta], [Attivabile], [IdxODL], [CodArticolo], [CodGruppo], [IdxMacchina], [NumPezzi], [TCAssegnato], [DueDate], [Priorita]) VALUES (@KeyRichiesta, @Attivabile, @IdxODL, @CodArticolo, @CodGruppo, @IdxMacchina, @NumPezzi, @TCAssegnato, @DueDate, @Priorita); -SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM PromesseODL WHERE (idxPromessa = SCOPE_IDENTITY()) - - - - - - - - - - - - - - + - - SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM dbo.PromesseODL + + SELECT * +FROM v_PODL_exp - - - UPDATE [dbo].[PromesseODL] SET [KeyRichiesta] = @KeyRichiesta, [Attivabile] = @Attivabile, [IdxODL] = @IdxODL, [CodArticolo] = @CodArticolo, [CodGruppo] = @CodGruppo, [IdxMacchina] = @IdxMacchina, [NumPezzi] = @NumPezzi, [TCAssegnato] = @TCAssegnato, [DueDate] = @DueDate, [Priorita] = @Priorita WHERE (([idxPromessa] = @Original_idxPromessa) AND ([KeyRichiesta] = @Original_KeyRichiesta) AND ([Attivabile] = @Original_Attivabile) AND ([IdxODL] = @Original_IdxODL) AND ([CodArticolo] = @Original_CodArticolo) AND ([CodGruppo] = @Original_CodGruppo) AND ([IdxMacchina] = @Original_IdxMacchina) AND ([NumPezzi] = @Original_NumPezzi) AND ([TCAssegnato] = @Original_TCAssegnato) AND ([DueDate] = @Original_DueDate) AND ([Priorita] = @Original_Priorita)); -SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, IdxMacchina, NumPezzi, TCAssegnato, DueDate, Priorita FROM PromesseODL WHERE (idxPromessa = @idxPromessa) - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + dbo.stp_PODL_deleteQuery + + + + + + + @@ -2157,6 +2109,40 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id + + + + dbo.stp_PODL_insertQuery + + + + + + + + + + + + + + + + + + + + + dbo.stp_PODL_updateQta + + + + + + + + + @@ -2896,6 +2882,13 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id + + + + + + + @@ -2905,6 +2898,13 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id + + + + + + + @@ -2919,10 +2919,25 @@ SELECT idxPromessa, KeyRichiesta, Attivabile, IdxODL, CodArticolo, CodGruppo, Id + + + + + + + + + + + + + + + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index f9565de2..e6aaab0b 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -4,23 +4,23 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + - + @@ -28,7 +28,7 @@ - + \ No newline at end of file diff --git a/MapoDb/MapoDb.csproj b/MapoDb/MapoDb.csproj index f7879e7f..885d4460 100644 --- a/MapoDb/MapoDb.csproj +++ b/MapoDb/MapoDb.csproj @@ -89,6 +89,11 @@ True DS_applicazione.xsd + + True + True + DS_IntServ.xsd + DS_ProdTempi.xsd @@ -137,6 +142,7 @@ Designer MSDataSetGenerator + DS_IntServ.Designer.cs DS_IntServ.xsd