diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs
index acded05e..9259f2cc 100644
--- a/MP-IO/Controllers/IOBController.cs
+++ b/MP-IO/Controllers/IOBController.cs
@@ -609,8 +609,8 @@ namespace MP_IO.Controllers
return answ;
}
- /// Creazione nuovo ODL dato CodArt + numPz
- /// GET: IOB/forceCreatePOdl/SIMUL_03?CodArt=ABCD_1234&numPz=5 Creazione nuovo ODL dato CodXdl + numPz
+ /// GET: IOB/forceCreatePOdl/SIMUL_03?CodXdl=ABCD_1234&numPz=5 IdxODL creato
public int forceCreatePOdl(string id, string CodArt, string CodGruppo, int numPz)
@@ -713,6 +713,60 @@ namespace MP_IO.Controllers
return answ;
}
+ ///
+ /// Recupera ArtNum dato CodXdl (per impianti che accettano solo INT in scrittura):
+ ///
+ /// GET: IOB/getArtNum/SIMUL_03?CodXdl=ABC123
+ ///
+ /// IdxMacchina (NON considerato)
+ /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
+ /// Json contenente le righe delle codifiche attive Articolo/Numero
+ public string getArtNum(string id, string CodArt = "")
+ {
+ // in realtà ID macchina non conta e lo ignoriamo...
+ string answ = "";
+ // scrivo keep alive!!! (se necessario, altrimenti è in cache...)
+ MapoDb.MapoDb connDb = new MapoDb.MapoDb();
+ DataLayer DataLayerObj = new DataLayer();
+ connDb.scriviKeepAlive(id, DateTime.Now);
+ try
+ {
+ // recupero dati macchina...
+ Dictionary valori = DataLayerObj.getArtNum(CodArt);
+ answ = JsonConvert.SerializeObject(valori);
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ ///
+ /// Recupera codice numerico ODL/PODL dato CodXdl, in pratica la parte finale SENZA ODL/PODL
+ /// Funzione per impianti che accettano solo INT in scrittura:
+ ///
+ /// GET: IOB/getXdlNum/SIMUL_03?CodXdl=ODL00000123
+ ///
+ /// IdxMacchina (NON considerato)
+ /// CodXdl richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
+ /// SINGOLO VALORE calcolato on the fly
+ public string getXdlNum(string id, string CodXdl = "")
+ {
+ // in realtà ID macchina non conta e lo ignoriamo...
+ string answ = "";
+ // scrivo keep alive!!! (se necessario, altrimenti è in cache...)
+ MapoDb.MapoDb connDb = new MapoDb.MapoDb();
+ DataLayer DataLayerObj = new DataLayer();
+ connDb.scriviKeepAlive(id, DateTime.Now);
+ try
+ {
+ // sostituisco PODL/ODL con "" e lascio zero iniziali (conversione INT in IOB)
+ answ = CodXdl.Replace("PODL", "").Replace("ODL", "");
+ }
+ catch
+ { }
+ return answ;
+ }
+
///
/// Recupera elenco articoli USATI:
///
diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs
index 2d9f2296..92186888 100644
--- a/MapoDb/DS_applicazione.Designer.cs
+++ b/MapoDb/DS_applicazione.Designer.cs
@@ -84,6 +84,8 @@ namespace MapoDb {
private AlarmLogDataTable tableAlarmLog;
+ private DecNumArticoliDataTable tableDecNumArticoli;
+
private global::System.Data.DataRelation relationFK_AnagTags_DiarioDichiarazioni;
private global::System.Data.DataRelation relationFK_Macchine2FamiglieMacchine_FamiglieMacchine;
@@ -244,6 +246,9 @@ namespace MapoDb {
if ((ds.Tables["AlarmLog"] != null)) {
base.Tables.Add(new AlarmLogDataTable(ds.Tables["AlarmLog"]));
}
+ if ((ds.Tables["DecNumArticoli"] != null)) {
+ base.Tables.Add(new DecNumArticoliDataTable(ds.Tables["DecNumArticoli"]));
+ }
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -562,6 +567,16 @@ namespace MapoDb {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Browsable(false)]
+ [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public DecNumArticoliDataTable DecNumArticoli {
+ get {
+ return this.tableDecNumArticoli;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.BrowsableAttribute(true)]
@@ -719,6 +734,9 @@ namespace MapoDb {
if ((ds.Tables["AlarmLog"] != null)) {
base.Tables.Add(new AlarmLogDataTable(ds.Tables["AlarmLog"]));
}
+ if ((ds.Tables["DecNumArticoli"] != null)) {
+ base.Tables.Add(new DecNumArticoliDataTable(ds.Tables["DecNumArticoli"]));
+ }
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -932,6 +950,12 @@ namespace MapoDb {
this.tableAlarmLog.InitVars();
}
}
+ this.tableDecNumArticoli = ((DecNumArticoliDataTable)(base.Tables["DecNumArticoli"]));
+ if ((initTable == true)) {
+ if ((this.tableDecNumArticoli != null)) {
+ this.tableDecNumArticoli.InitVars();
+ }
+ }
this.relationFK_AnagTags_DiarioDichiarazioni = this.Relations["FK_AnagTags_DiarioDichiarazioni"];
this.relationFK_Macchine2FamiglieMacchine_FamiglieMacchine = this.Relations["FK_Macchine2FamiglieMacchine_FamiglieMacchine"];
this.relationFK_Macchine2FamiglieMacchine_Macchine = this.Relations["FK_Macchine2FamiglieMacchine_Macchine"];
@@ -1023,6 +1047,8 @@ namespace MapoDb {
base.Tables.Add(this.tableDiarioDichiarazioni);
this.tableAlarmLog = new AlarmLogDataTable();
base.Tables.Add(this.tableAlarmLog);
+ this.tableDecNumArticoli = new DecNumArticoliDataTable();
+ base.Tables.Add(this.tableDecNumArticoli);
global::System.Data.ForeignKeyConstraint fkc;
fkc = new global::System.Data.ForeignKeyConstraint("FK_AnagTags_DiarioDichiarazioni", new global::System.Data.DataColumn[] {
this.tableAnagTags.TagCodeColumn}, new global::System.Data.DataColumn[] {
@@ -1297,6 +1323,12 @@ namespace MapoDb {
return false;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private bool ShouldSerializeDecNumArticoli() {
+ return false;
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
@@ -1442,6 +1474,9 @@ namespace MapoDb {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public delegate void AlarmLogRowChangeEventHandler(object sender, AlarmLogRowChangeEvent e);
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public delegate void DecNumArticoliRowChangeEventHandler(object sender, DecNumArticoliRowChangeEvent e);
+
///
///Represents the strongly named DataTable class.
///
@@ -11624,6 +11659,280 @@ namespace MapoDb {
}
}
+ ///
+ ///Represents the strongly named DataTable class.
+ ///
+ [global::System.Serializable()]
+ [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+ public partial class DecNumArticoliDataTable : global::System.Data.TypedTableBase {
+
+ private global::System.Data.DataColumn columnCodArticolo;
+
+ private global::System.Data.DataColumn columnNumART;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliDataTable() {
+ this.TableName = "DecNumArticoli";
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal DecNumArticoliDataTable(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", "17.0.0.0")]
+ protected DecNumArticoliDataTable(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", "17.0.0.0")]
+ public global::System.Data.DataColumn CodArticoloColumn {
+ get {
+ return this.columnCodArticolo;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn NumARTColumn {
+ get {
+ return this.columnNumART;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.0.0.0")]
+ public DecNumArticoliRow this[int index] {
+ get {
+ return ((DecNumArticoliRow)(this.Rows[index]));
+ }
+ }
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DecNumArticoliRowChangeEventHandler DecNumArticoliRowChanging;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DecNumArticoliRowChangeEventHandler DecNumArticoliRowChanged;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DecNumArticoliRowChangeEventHandler DecNumArticoliRowDeleting;
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public event DecNumArticoliRowChangeEventHandler DecNumArticoliRowDeleted;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void AddDecNumArticoliRow(DecNumArticoliRow row) {
+ this.Rows.Add(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliRow AddDecNumArticoliRow(string CodArticolo, int NumART) {
+ DecNumArticoliRow rowDecNumArticoliRow = ((DecNumArticoliRow)(this.NewRow()));
+ object[] columnValuesArray = new object[] {
+ CodArticolo,
+ NumART};
+ rowDecNumArticoliRow.ItemArray = columnValuesArray;
+ this.Rows.Add(rowDecNumArticoliRow);
+ return rowDecNumArticoliRow;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliRow FindByCodArticolo(string CodArticolo) {
+ return ((DecNumArticoliRow)(this.Rows.Find(new object[] {
+ CodArticolo})));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public override global::System.Data.DataTable Clone() {
+ DecNumArticoliDataTable cln = ((DecNumArticoliDataTable)(base.Clone()));
+ cln.InitVars();
+ return cln;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataTable CreateInstance() {
+ return new DecNumArticoliDataTable();
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal void InitVars() {
+ this.columnCodArticolo = base.Columns["CodArticolo"];
+ this.columnNumART = base.Columns["NumART"];
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitClass() {
+ this.columnCodArticolo = new global::System.Data.DataColumn("CodArticolo", typeof(string), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnCodArticolo);
+ this.columnNumART = new global::System.Data.DataColumn("NumART", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnNumART);
+ this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
+ this.columnCodArticolo}, true));
+ this.columnCodArticolo.AllowDBNull = false;
+ this.columnCodArticolo.Unique = true;
+ this.columnCodArticolo.MaxLength = 50;
+ this.columnNumART.AllowDBNull = false;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliRow NewDecNumArticoliRow() {
+ return ((DecNumArticoliRow)(this.NewRow()));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+ return new DecNumArticoliRow(builder);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override global::System.Type GetRowType() {
+ return typeof(DecNumArticoliRow);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanged(e);
+ if ((this.DecNumArticoliRowChanged != null)) {
+ this.DecNumArticoliRowChanged(this, new DecNumArticoliRowChangeEvent(((DecNumArticoliRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanging(e);
+ if ((this.DecNumArticoliRowChanging != null)) {
+ this.DecNumArticoliRowChanging(this, new DecNumArticoliRowChangeEvent(((DecNumArticoliRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleted(e);
+ if ((this.DecNumArticoliRowDeleted != null)) {
+ this.DecNumArticoliRowDeleted(this, new DecNumArticoliRowChangeEvent(((DecNumArticoliRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+ base.OnRowDeleting(e);
+ if ((this.DecNumArticoliRowDeleting != null)) {
+ this.DecNumArticoliRowDeleting(this, new DecNumArticoliRowChangeEvent(((DecNumArticoliRow)(e.Row)), e.Action));
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void RemoveDecNumArticoliRow(DecNumArticoliRow row) {
+ this.Rows.Remove(row);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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_applicazione ds = new DS_applicazione();
+ 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 = "DecNumArticoliDataTable";
+ 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.
///
@@ -16210,6 +16519,43 @@ namespace MapoDb {
}
}
+ ///
+ ///Represents strongly named DataRow class.
+ ///
+ public partial class DecNumArticoliRow : global::System.Data.DataRow {
+
+ private DecNumArticoliDataTable tableDecNumArticoli;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ internal DecNumArticoliRow(global::System.Data.DataRowBuilder rb) :
+ base(rb) {
+ this.tableDecNumArticoli = ((DecNumArticoliDataTable)(this.Table));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public string CodArticolo {
+ get {
+ return ((string)(this[this.tableDecNumArticoli.CodArticoloColumn]));
+ }
+ set {
+ this[this.tableDecNumArticoli.CodArticoloColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int NumART {
+ get {
+ return ((int)(this[this.tableDecNumArticoli.NumARTColumn]));
+ }
+ set {
+ this[this.tableDecNumArticoli.NumARTColumn] = value;
+ }
+ }
+ }
+
///
///Row event argument class
///
@@ -17229,6 +17575,40 @@ namespace MapoDb {
}
}
}
+
+ ///
+ ///Row event argument class
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public class DecNumArticoliRowChangeEvent : global::System.EventArgs {
+
+ private DecNumArticoliRow eventRow;
+
+ private global::System.Data.DataRowAction eventAction;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliRowChangeEvent(DecNumArticoliRow 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", "17.0.0.0")]
+ public DecNumArticoliRow Row {
+ get {
+ return this.eventRow;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataRowAction Action {
+ get {
+ return this.eventAction;
+ }
+ }
+ }
}
}
namespace MapoDb.DS_applicazioneTableAdapters {
@@ -31196,6 +31576,377 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag
return returnValue;
}
}
+
+ ///
+ ///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 DecNumArticoliTableAdapter : global::System.ComponentModel.Component {
+
+ private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+
+ private global::System.Data.SqlClient.SqlConnection _connection;
+
+ private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+
+ private bool _clearBeforeFill;
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public DecNumArticoliTableAdapter() {
+ this.ClearBeforeFill = true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private 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", "17.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", "17.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", "17.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", "17.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 = "DecNumArticoli";
+ tableMapping.ColumnMappings.Add("CodArticolo", "CodArticolo");
+ tableMapping.ColumnMappings.Add("NumART", "NumART");
+ 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].[FluxLog] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([" +
+ "dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore" +
+ "] = @Original_Valore) AND ([Cnt] = @Original_Cnt))";
+ this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
+ 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_dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", 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].[FluxLog] ([IdxMacchina], [dtEvento], [CodFlux], [Valore], [Cnt]) VALUES (@IdxMacchina, @dtEvento, @CodFlux, @Valore, @Cnt);
+SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)";
+ this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
+ 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("@dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", 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].[FluxLog] SET [IdxMacchina] = @IdxMacchina, [dtEvento] = @dtEvento, [CodFlux] = @CodFlux, [Valore] = @Valore, [Cnt] = @Cnt WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt));
+SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)";
+ this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
+ 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("@dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Current, 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_dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ private void InitConnection() {
+ this._connection = new global::System.Data.SqlClient.SqlConnection();
+ this._connection.ConnectionString = global::MapoDb.Properties.Settings.Default.MoonProConnectionString;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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 CodArticolo, NumART\r\nFROM DecNumArticoli";
+ 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_getArtDecNum";
+ 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("@CodArt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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_applicazione.DecNumArticoliDataTable 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", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+ public virtual DS_applicazione.DecNumArticoliDataTable GetData() {
+ this.Adapter.SelectCommand = this.CommandCollection[0];
+ DS_applicazione.DecNumArticoliDataTable dataTable = new DS_applicazione.DecNumArticoliDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_applicazione.DecNumArticoliDataTable getByKey(string CodArt) {
+ this.Adapter.SelectCommand = this.CommandCollection[1];
+ if ((CodArt == null)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodArt));
+ }
+ DS_applicazione.DecNumArticoliDataTable dataTable = new DS_applicazione.DecNumArticoliDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(DS_applicazione.DecNumArticoliDataTable dataTable) {
+ return this.Adapter.Update(dataTable);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int Update(DS_applicazione dataSet) {
+ return this.Adapter.Update(dataSet, "DecNumArticoli");
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.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", "17.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
+ public virtual int Delete(string Original_IdxMacchina, System.DateTime Original_dtEvento, string Original_CodFlux, string Original_Valore, int Original_Cnt) {
+ if ((Original_IdxMacchina == null)) {
+ throw new global::System.ArgumentNullException("Original_IdxMacchina");
+ }
+ else {
+ this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_IdxMacchina));
+ }
+ this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_dtEvento));
+ if ((Original_CodFlux == null)) {
+ throw new global::System.ArgumentNullException("Original_CodFlux");
+ }
+ else {
+ this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CodFlux));
+ }
+ if ((Original_Valore == null)) {
+ throw new global::System.ArgumentNullException("Original_Valore");
+ }
+ else {
+ this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Valore));
+ }
+ this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Cnt));
+ 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", "17.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 IdxMacchina, System.DateTime dtEvento, string CodFlux, string Valore, int Cnt) {
+ if ((IdxMacchina == null)) {
+ throw new global::System.ArgumentNullException("IdxMacchina");
+ }
+ else {
+ this.Adapter.InsertCommand.Parameters[0].Value = ((string)(IdxMacchina));
+ }
+ this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(dtEvento));
+ if ((CodFlux == null)) {
+ throw new global::System.ArgumentNullException("CodFlux");
+ }
+ else {
+ this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CodFlux));
+ }
+ if ((Valore == null)) {
+ throw new global::System.ArgumentNullException("Valore");
+ }
+ else {
+ this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Valore));
+ }
+ this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Cnt));
+ 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", "17.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 IdxMacchina, System.DateTime dtEvento, string CodFlux, string Valore, int Cnt, string Original_IdxMacchina, System.DateTime Original_dtEvento, string Original_CodFlux, string Original_Valore, int Original_Cnt) {
+ if ((IdxMacchina == null)) {
+ throw new global::System.ArgumentNullException("IdxMacchina");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(IdxMacchina));
+ }
+ this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(dtEvento));
+ if ((CodFlux == null)) {
+ throw new global::System.ArgumentNullException("CodFlux");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CodFlux));
+ }
+ if ((Valore == null)) {
+ throw new global::System.ArgumentNullException("Valore");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Valore));
+ }
+ this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Cnt));
+ if ((Original_IdxMacchina == null)) {
+ throw new global::System.ArgumentNullException("Original_IdxMacchina");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_IdxMacchina));
+ }
+ this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_dtEvento));
+ if ((Original_CodFlux == null)) {
+ throw new global::System.ArgumentNullException("Original_CodFlux");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_CodFlux));
+ }
+ if ((Original_Valore == null)) {
+ throw new global::System.ArgumentNullException("Original_Valore");
+ }
+ else {
+ this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Valore));
+ }
+ this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_Cnt));
+ 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();
+ }
+ }
+ }
+ }
}
#pragma warning restore 1591
\ No newline at end of file
diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd
index 5896eb29..fc37c08a 100644
--- a/MapoDb/DS_applicazione.xsd
+++ b/MapoDb/DS_applicazione.xsd
@@ -3030,6 +3030,79 @@ FROM v_AlarmLog
+
+
+
+
+
+ DELETE FROM [dbo].[FluxLog] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt))
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [dbo].[FluxLog] ([IdxMacchina], [dtEvento], [CodFlux], [Valore], [Cnt]) VALUES (@IdxMacchina, @dtEvento, @CodFlux, @Valore, @Cnt);
+SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)
+
+
+
+
+
+
+
+
+
+
+
+ SELECT CodArticolo, NumART
+FROM DecNumArticoli
+
+
+
+
+
+ UPDATE [dbo].[FluxLog] SET [IdxMacchina] = @IdxMacchina, [dtEvento] = @dtEvento, [CodFlux] = @CodFlux, [Valore] = @Valore, [Cnt] = @Cnt WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt));
+SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_getArtDecNum
+
+
+
+
+
+
+
+
+
@@ -3912,6 +3985,20 @@ FROM v_AlarmLog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4045,33 +4132,37 @@ FROM v_AlarmLog
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MapoDb/DS_applicazione.xss b/MapoDb/DS_applicazione.xss
index b51067ed..856ee01b 100644
--- a/MapoDb/DS_applicazione.xss
+++ b/MapoDb/DS_applicazione.xss
@@ -4,41 +4,42 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
456
@@ -50,7 +51,7 @@
-
+
667
@@ -62,7 +63,7 @@
-
+
699
@@ -74,7 +75,7 @@
-
+
768
@@ -86,7 +87,7 @@
-
+
636
@@ -102,7 +103,7 @@
-
+
444
@@ -118,7 +119,7 @@
-
+
537
@@ -138,7 +139,7 @@
-
+
879
@@ -150,7 +151,7 @@
-
+
1285
@@ -174,7 +175,7 @@
-
+
1285
@@ -186,7 +187,7 @@
-
+
356
@@ -198,7 +199,7 @@
-
+
619
@@ -210,7 +211,7 @@
-
+
1444
@@ -222,7 +223,7 @@
-
+
716
@@ -234,7 +235,7 @@
-
+
897
@@ -246,7 +247,7 @@
-
+
1285
@@ -266,7 +267,7 @@
-
+
933
@@ -286,7 +287,7 @@
-
+
965
@@ -302,7 +303,7 @@
-
+
1108
@@ -314,7 +315,7 @@
-
+
982
@@ -330,7 +331,7 @@
-
+
627
diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs
index 8f4badfd..e8687ab3 100644
--- a/MapoDb/DataLayer.cs
+++ b/MapoDb/DataLayer.cs
@@ -47,6 +47,7 @@ namespace MapoDb
public DS_ProdTempiTableAdapters.stp_repDonati_getDatiProdMacchinaTableAdapter taDatiProdMacch;
public DS_ProdTempiTableAdapters.stp_repDonati_getDatiProdMacchinaPeriodoTableAdapter taDatiProdMacchPer;
public DS_ProdTempiTableAdapters.stp_repDonati_getLastStatoDurataMacchinaTableAdapter taDatiStatoMacch;
+ public DS_applicazioneTableAdapters.DecNumArticoliTableAdapter taDecNA;
public DS_applicazioneTableAdapters.DiarioDichiarazioniTableAdapter taDiarioDich;
public DS_DossParTableAdapters.DossiersTableAdapter taDOSS;
public DS_applicazioneTableAdapters.EventListTableAdapter taEventi;
@@ -379,16 +380,20 @@ namespace MapoDb
return mHash($"PODLRow:{idxPODL}");
}
- ///
- /// Hash dati relativi all'associazione macchina <--> IOB
- ///
- /// Macchina
- ///
+ /// Hash dati relativi all'associazione macchina <--> IOB Macchina
public static string hIobDict(string IdxMacchina)
{
return mHash($"IOB:{IdxMacchina}:CurrInfo");
}
+ /// Hash dati relativi all'associazione macchina <--> IOB Macchina PRINCIPALE
+ public static string hM2IOB(string IdxMacchina)
+ {
+ return mHash(string.Format("hM2IOB:{0}", IdxMacchina));
+ }
+
///
/// Hash dati relativi a macchina + IOB + conf speciali
///
@@ -399,16 +404,6 @@ namespace MapoDb
return mHash($"IOB:{IdxMacchina}:MachIobConf");
}
- ///
- /// Hash dati relativi all'associazione macchina <--> IOB
- ///
- /// Macchina PRINCIPALE
- ///
- public static string hM2IOB(string IdxMacchina)
- {
- return mHash(string.Format("hM2IOB:{0}", IdxMacchina));
- }
-
///
/// Hash dati Macchine Multi SM Ingressi
///
@@ -1938,6 +1933,34 @@ namespace MapoDb
return answ;
}
+ ///
+ /// Recupera ArtNum dato CodArt (per impianti che accettano solo INT in scrittura)
+ ///
+ ///
+ /// CodArt richiesto, se vuoto restituisce TUTTI i valori in tabella di decodifica
+ ///
+ /// Dizionario contenente le righe delle codifiche attive Articolo/Numero
+ public Dictionary getArtNum(string codArt)
+ {
+ Dictionary answ = new Dictionary();
+ DS_applicazione.DecNumArticoliDataTable rawData;
+ // se vuoto --> leggo tabella
+ if (string.IsNullOrEmpty(codArt))
+ {
+ rawData = taDecNA.GetData();
+ }
+ // se non vuoto --> chiamo stored x recuperare info
+ else
+ {
+ rawData = taDecNA.getByKey(codArt);
+ }
+ foreach (var item in rawData)
+ {
+ answ.Add(item.CodArticolo, item.NumART);
+ }
+ return answ;
+ }
+
///
/// GET elenco parametri correnti x IOB
///
@@ -4281,6 +4304,7 @@ namespace MapoDb
taAnagTags = new DS_applicazioneTableAdapters.AnagTagsTableAdapter();
taAs400 = new DS_IntServTableAdapters.ProduzioneAs400TableAdapter();
taArcaGiac = new DS_ArcaTableAdapters.GiacenzeTableAdapter();
+ taDecNA = new DS_applicazioneTableAdapters.DecNumArticoliTableAdapter();
taCalFF = new DS_ProdTempiTableAdapters.CalendFesteFerieTableAdapter();
taComm = new DS_UtilityTableAdapters.CommentiTableAdapter();
taConfFlux = new DS_DossParTableAdapters.ConfFluxTableAdapter();
@@ -4355,6 +4379,7 @@ namespace MapoDb
taAnagTags.Connection.ConnectionString = connectionString;
taAs400.Connection.ConnectionString = connectionStringIS;
taArcaGiac.Connection.ConnectionString = connectionStringArca;
+ taDecNA.Connection.ConnectionString = connectionString;
taCalFF.Connection.ConnectionString = connectionString;
taConfig.Connection.ConnectionString = connectionString;
taComm.Connection.ConnectionString = connectionString;
diff --git a/MapoDb/Properties/Settings.Designer.cs b/MapoDb/Properties/Settings.Designer.cs
index aa039f7f..a40daa65 100644
--- a/MapoDb/Properties/Settings.Designer.cs
+++ b/MapoDb/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace MapoDb.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.11.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/MapoSDK/Enums.cs b/MapoSDK/Enums.cs
index dbdd4b55..857bd5c8 100644
--- a/MapoSDK/Enums.cs
+++ b/MapoSDK/Enums.cs
@@ -265,12 +265,21 @@ namespace MapoSDK
/// Imposta Articolo su PLC
///
setArt,
+ ///
+ /// Imposta Articolo IN MODALITA' NUMERICA su PLC
+ ///
+ setArtNum,
///
/// Imposta Commessa su PLC
///
setComm,
+ ///
+ /// Imposta Commessa IN MODALITA' NUMERICA su PLC
+ ///
+ setCommNum,
+
///
/// Set di un PARAMETRO su PLC (in value avremo un JSON object)
///