- Update IOB x  metodi generazione automatica dossier quotidiani
This commit is contained in:
Samuele Locatelli
2022-12-21 09:57:34 +01:00
parent 4c966d68bf
commit 83d2f69f19
8 changed files with 1306 additions and 48 deletions
+82 -1
View File
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Web.Mvc;
namespace MP_IO.Controllers
@@ -253,7 +254,7 @@ namespace MP_IO.Controllers
var lastOdlStarted = DataLayerObj.taODL.getLastByMacc(id);
if (lastOdlStarted != null && lastOdlStarted.Count > 0)
{
// calcolo data ultimo avviato e cheido dal giorno dopo...
// calcolo data ultimo avviato e chiedo dal giorno dopo...
DateTime dtFrom = lastOdlStarted[0].DataInizio.AddDays(1);
DateTime dtTo = DateTime.Today;
if (dtTo >= dtFrom)
@@ -272,6 +273,86 @@ namespace MP_IO.Controllers
return answ;
}
/// <summary>
/// Sistema Dossier/Snapshot giornalieri x impianto indicato, andando a generare 1 Dossier giornaliero x ogni
/// giornata dall'ultimo registrato alla data corrente
/// es: http://url_site/MP/IO/IOB/fixDailyDossier/SIMUL_03
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public string fixDailyDossier(string id)
{
string answ = "";
// attenzione! poiché nell'URL il carattere "#" viene filtrato ci aspettiamo il
// carattere "|" che poi trasformiamo ora in "#"
id = id.Replace("|", "#");
// effettuo processing
try
{
DataLayer DataLayerObj = new DataLayer();
// verifico se si possa processare, ovvero tab ConfFlux x macchina sia valorizzata...
var confDataMach = DataLayerObj.confFluxMach(id);
if (confDataMach.Count > 0)
{
// determino ultima data da processare (inizio oggi, a mezzanotte)
DateTime dtTo = DateTime.Today;
DateTime dtFrom = dtTo;
// determino data di partenza, prima da dossier esistenti
var listaDoss = DataLayerObj.dossierLastByMach(id);
if (listaDoss.Count > 0)
{
// primo giorno DOPO ultima registrazione
dtFrom = listaDoss.OrderByDescending(x => x).FirstOrDefault().AddDays(1);
}
else
{
// ...o da fluxLog acquisiti...
var listaFL = DataLayerObj.fluxLogFirstByMach(id);
if (listaFL.Count > 0)
{
// giorno successivo a prima registrazione
dtFrom = listaFL.OrderBy(x => x).FirstOrDefault().AddDays(1);
}
}
string caller = $"takeFlogSnapshot({id})";
DateTime dtStart = dtFrom;
DateTime dtEnd = dtFrom;
int maxAdd = 5;
if (dtStart < dtTo)
{
// verifico di avere almeno 1 dossier da produrre
// ciclo fino ad esaurire le date da processare
while (dtStart < dtTo && maxAdd > 0)
{
// sistemo end
dtEnd = dtStart.AddDays(1);
// effettuo chiamata registrazione snapshot!
answ = doSaveFLSnapshot(id, dtStart, dtEnd, caller);
// incremento START...
dtStart = dtEnd;
// riduco il numero di chiamate ammesse x singolo task
maxAdd--;
}
// reset cache dossier...
DataLayerObj.dossierLastByMachReset(id);
}
else
{
answ = "NO more to add";
}
}
else
{
answ = "NO ConfFluxData";
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in recupero fixDailyDossier{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
return answ;
}
// GET: IOB/flog/SIMUL_03?flux=PROG&valore=P0001&dtEve=20161223180600000&dtCurr=20161223180600000&cnt=999
public string flog(string id, string flux, string valore, string dtEve, string dtCurr, string cnt)
{
+838
View File
@@ -26,6 +26,8 @@ namespace MapoDb {
private DossiersDataTable tableDossiers;
private ConfFluxDataTable tableConfFlux;
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -57,6 +59,9 @@ namespace MapoDb {
if ((ds.Tables["Dossiers"] != null)) {
base.Tables.Add(new DossiersDataTable(ds.Tables["Dossiers"]));
}
if ((ds.Tables["ConfFlux"] != null)) {
base.Tables.Add(new ConfFluxDataTable(ds.Tables["ConfFlux"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -85,6 +90,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 ConfFluxDataTable ConfFlux {
get {
return this.tableConfFlux;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.BrowsableAttribute(true)]
@@ -155,6 +170,9 @@ namespace MapoDb {
if ((ds.Tables["Dossiers"] != null)) {
base.Tables.Add(new DossiersDataTable(ds.Tables["Dossiers"]));
}
if ((ds.Tables["ConfFlux"] != null)) {
base.Tables.Add(new ConfFluxDataTable(ds.Tables["ConfFlux"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
@@ -194,6 +212,12 @@ namespace MapoDb {
this.tableDossiers.InitVars();
}
}
this.tableConfFlux = ((ConfFluxDataTable)(base.Tables["ConfFlux"]));
if ((initTable == true)) {
if ((this.tableConfFlux != null)) {
this.tableConfFlux.InitVars();
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -206,6 +230,8 @@ namespace MapoDb {
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
this.tableDossiers = new DossiersDataTable();
base.Tables.Add(this.tableDossiers);
this.tableConfFlux = new ConfFluxDataTable();
base.Tables.Add(this.tableConfFlux);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -214,6 +240,12 @@ namespace MapoDb {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
private bool ShouldSerializeConfFlux() {
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) {
@@ -272,6 +304,9 @@ namespace MapoDb {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public delegate void DossiersRowChangeEventHandler(object sender, DossiersRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public delegate void ConfFluxRowChangeEventHandler(object sender, ConfFluxRowChangeEvent e);
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
@@ -628,6 +663,297 @@ namespace MapoDb {
}
}
/// <summary>
///Represents the strongly named DataTable class.
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class ConfFluxDataTable : global::System.Data.TypedTableBase<ConfFluxRow> {
private global::System.Data.DataColumn columnIdxMacchina;
private global::System.Data.DataColumn columnCodFlux;
private global::System.Data.DataColumn columnEnabDoss;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public ConfFluxDataTable() {
this.TableName = "ConfFlux";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
internal ConfFluxDataTable(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 ConfFluxDataTable(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 IdxMacchinaColumn {
get {
return this.columnIdxMacchina;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public global::System.Data.DataColumn CodFluxColumn {
get {
return this.columnCodFlux;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public global::System.Data.DataColumn EnabDossColumn {
get {
return this.columnEnabDoss;
}
}
[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 ConfFluxRow this[int index] {
get {
return ((ConfFluxRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public event ConfFluxRowChangeEventHandler ConfFluxRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public event ConfFluxRowChangeEventHandler ConfFluxRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public event ConfFluxRowChangeEventHandler ConfFluxRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public event ConfFluxRowChangeEventHandler ConfFluxRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public void AddConfFluxRow(ConfFluxRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public ConfFluxRow AddConfFluxRow(string IdxMacchina, string CodFlux, bool EnabDoss) {
ConfFluxRow rowConfFluxRow = ((ConfFluxRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
IdxMacchina,
CodFlux,
EnabDoss};
rowConfFluxRow.ItemArray = columnValuesArray;
this.Rows.Add(rowConfFluxRow);
return rowConfFluxRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public ConfFluxRow FindByIdxMacchinaCodFlux(string IdxMacchina, string CodFlux) {
return ((ConfFluxRow)(this.Rows.Find(new object[] {
IdxMacchina,
CodFlux})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public override global::System.Data.DataTable Clone() {
ConfFluxDataTable cln = ((ConfFluxDataTable)(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 ConfFluxDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
internal void InitVars() {
this.columnIdxMacchina = base.Columns["IdxMacchina"];
this.columnCodFlux = base.Columns["CodFlux"];
this.columnEnabDoss = base.Columns["EnabDoss"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
private void InitClass() {
this.columnIdxMacchina = new global::System.Data.DataColumn("IdxMacchina", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnIdxMacchina);
this.columnCodFlux = new global::System.Data.DataColumn("CodFlux", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnCodFlux);
this.columnEnabDoss = new global::System.Data.DataColumn("EnabDoss", typeof(bool), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnEnabDoss);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnIdxMacchina,
this.columnCodFlux}, true));
this.columnIdxMacchina.AllowDBNull = false;
this.columnIdxMacchina.MaxLength = 50;
this.columnCodFlux.AllowDBNull = false;
this.columnCodFlux.MaxLength = 50;
this.columnEnabDoss.AllowDBNull = false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public ConfFluxRow NewConfFluxRow() {
return ((ConfFluxRow)(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 ConfFluxRow(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(ConfFluxRow);
}
[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.ConfFluxRowChanged != null)) {
this.ConfFluxRowChanged(this, new ConfFluxRowChangeEvent(((ConfFluxRow)(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.ConfFluxRowChanging != null)) {
this.ConfFluxRowChanging(this, new ConfFluxRowChangeEvent(((ConfFluxRow)(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.ConfFluxRowDeleted != null)) {
this.ConfFluxRowDeleted(this, new ConfFluxRowChangeEvent(((ConfFluxRow)(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.ConfFluxRowDeleting != null)) {
this.ConfFluxRowDeleting(this, new ConfFluxRowChangeEvent(((ConfFluxRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public void RemoveConfFluxRow(ConfFluxRow 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_DossPar ds = new DS_DossPar();
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 = "ConfFluxDataTable";
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;
}
}
/// <summary>
///Represents strongly named DataRow class.
///</summary>
@@ -720,6 +1046,54 @@ namespace MapoDb {
}
}
/// <summary>
///Represents strongly named DataRow class.
///</summary>
public partial class ConfFluxRow : global::System.Data.DataRow {
private ConfFluxDataTable tableConfFlux;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
internal ConfFluxRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableConfFlux = ((ConfFluxDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public string IdxMacchina {
get {
return ((string)(this[this.tableConfFlux.IdxMacchinaColumn]));
}
set {
this[this.tableConfFlux.IdxMacchinaColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public string CodFlux {
get {
return ((string)(this[this.tableConfFlux.CodFluxColumn]));
}
set {
this[this.tableConfFlux.CodFluxColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public bool EnabDoss {
get {
return ((bool)(this[this.tableConfFlux.EnabDossColumn]));
}
set {
this[this.tableConfFlux.EnabDossColumn] = value;
}
}
}
/// <summary>
///Row event argument class
///</summary>
@@ -753,6 +1127,40 @@ namespace MapoDb {
}
}
}
/// <summary>
///Row event argument class
///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public class ConfFluxRowChangeEvent : global::System.EventArgs {
private ConfFluxRow 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 ConfFluxRowChangeEvent(ConfFluxRow 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 ConfFluxRow 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_DossParTableAdapters {
@@ -1227,6 +1635,370 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
}
}
/// <summary>
///Represents the connection and commands used to retrieve and save data.
///</summary>
[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 ConfFluxTableAdapter : 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", "17.0.0.0")]
public ConfFluxTableAdapter() {
this.ClearBeforeFill = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "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")]
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", "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 = "ConfFlux";
tableMapping.ColumnMappings.Add("IdxMacchina", "IdxMacchina");
tableMapping.ColumnMappings.Add("CodFlux", "CodFlux");
tableMapping.ColumnMappings.Add("EnabDoss", "EnabDoss");
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 [ConfFlux] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([CodFl" +
"ux] = @Original_CodFlux) AND ([EnabDoss] = @Original_EnabDoss))";
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_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_EnabDoss", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EnabDoss", 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 [Dossiers] ([IdxMacchina], [DtRif], [IdxODL], [CodArticolo], [DataType], [Valore]) VALUES (@IdxMacchina, @DtRif, @IdxODL, @CodArticolo, @DataType, @Valore);
SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FROM Dossiers WHERE (IdxDossier = SCOPE_IDENTITY())";
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("@DtRif", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DtRif", 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("@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("@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 = new global::System.Data.SqlClient.SqlCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = @"UPDATE [ConfFlux] SET [IdxMacchina] = @IdxMacchina, [CodFlux] = @CodFlux, [EnabDoss] = @EnabDoss WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([CodFlux] = @Original_CodFlux) AND ([EnabDoss] = @Original_EnabDoss));
SELECT IdxMacchina, CodFlux, EnabDoss FROM ConfFlux WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina)";
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("@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("@EnabDoss", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EnabDoss", 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_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_EnabDoss", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EnabDoss", 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[1];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM ConfFlux";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
}
[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_DossPar.ConfFluxDataTable 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_DossPar.ConfFluxDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
DS_DossPar.ConfFluxDataTable dataTable = new DS_DossPar.ConfFluxDataTable();
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_DossPar.ConfFluxDataTable 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_DossPar dataSet) {
return this.Adapter.Update(dataSet, "ConfFlux");
}
[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, string Original_CodFlux, bool Original_EnabDoss) {
if ((Original_IdxMacchina == null)) {
throw new global::System.ArgumentNullException("Original_IdxMacchina");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_IdxMacchina));
}
if ((Original_CodFlux == null)) {
throw new global::System.ArgumentNullException("Original_CodFlux");
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_CodFlux));
}
this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_EnabDoss));
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 DtRif, int IdxODL, string CodArticolo, string DataType, string Valore) {
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)(DtRif));
this.Adapter.InsertCommand.Parameters[2].Value = ((int)(IdxODL));
if ((CodArticolo == null)) {
throw new global::System.ArgumentNullException("CodArticolo");
}
else {
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(CodArticolo));
}
if ((DataType == null)) {
throw new global::System.ArgumentNullException("DataType");
}
else {
this.Adapter.InsertCommand.Parameters[4].Value = ((string)(DataType));
}
if ((Valore == null)) {
throw new global::System.ArgumentNullException("Valore");
}
else {
this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Valore));
}
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, string CodFlux, bool EnabDoss, string Original_IdxMacchina, string Original_CodFlux, bool Original_EnabDoss) {
if ((IdxMacchina == null)) {
throw new global::System.ArgumentNullException("IdxMacchina");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(IdxMacchina));
}
if ((CodFlux == null)) {
throw new global::System.ArgumentNullException("CodFlux");
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(CodFlux));
}
this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(EnabDoss));
if ((Original_IdxMacchina == null)) {
throw new global::System.ArgumentNullException("Original_IdxMacchina");
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_IdxMacchina));
}
if ((Original_CodFlux == null)) {
throw new global::System.ArgumentNullException("Original_CodFlux");
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_CodFlux));
}
this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(Original_EnabDoss));
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", "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(bool EnabDoss, string Original_IdxMacchina, string Original_CodFlux, bool Original_EnabDoss) {
return this.Update(Original_IdxMacchina, Original_CodFlux, EnabDoss, Original_IdxMacchina, Original_CodFlux, Original_EnabDoss);
}
}
/// <summary>
///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
///</summary>
@@ -1241,6 +2013,8 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
private DossiersTableAdapter _dossiersTableAdapter;
private ConfFluxTableAdapter _confFluxTableAdapter;
private bool _backupDataSetBeforeUpdate;
private global::System.Data.IDbConnection _connection;
@@ -1270,6 +2044,20 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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 ConfFluxTableAdapter ConfFluxTableAdapter {
get {
return this._confFluxTableAdapter;
}
set {
this._confFluxTableAdapter = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public bool BackupDataSetBeforeUpdate {
@@ -1293,6 +2081,10 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
&& (this._dossiersTableAdapter.Connection != null))) {
return this._dossiersTableAdapter.Connection;
}
if (((this._confFluxTableAdapter != null)
&& (this._confFluxTableAdapter.Connection != null))) {
return this._confFluxTableAdapter.Connection;
}
return null;
}
set {
@@ -1309,6 +2101,9 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
if ((this._dossiersTableAdapter != null)) {
count = (count + 1);
}
if ((this._confFluxTableAdapter != null)) {
count = (count + 1);
}
return count;
}
}
@@ -1329,6 +2124,15 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
allChangedRows.AddRange(updatedRows);
}
}
if ((this._confFluxTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.ConfFlux.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._confFluxTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
return result;
}
@@ -1347,6 +2151,14 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
allAddedRows.AddRange(addedRows);
}
}
if ((this._confFluxTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.ConfFlux.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._confFluxTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
return result;
}
@@ -1357,6 +2169,14 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
private int UpdateDeletedRows(DS_DossPar dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
int result = 0;
if ((this._confFluxTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.ConfFlux.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._confFluxTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._dossiersTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Dossiers.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
@@ -1409,6 +2229,11 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._confFluxTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._confFluxTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
global::System.Data.IDbConnection workConnection = this.Connection;
if ((workConnection == null)) {
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
@@ -1450,6 +2275,15 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
adaptersWithAcceptChangesDuringUpdate.Add(this._dossiersTableAdapter.Adapter);
}
}
if ((this._confFluxTableAdapter != null)) {
revertConnections.Add(this._confFluxTableAdapter, this._confFluxTableAdapter.Connection);
this._confFluxTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
this._confFluxTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
if (this._confFluxTableAdapter.Adapter.AcceptChangesDuringUpdate) {
this._confFluxTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
adaptersWithAcceptChangesDuringUpdate.Add(this._confFluxTableAdapter.Adapter);
}
}
//
//---- Perform updates -----------
//
@@ -1512,6 +2346,10 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
this._dossiersTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._dossiersTableAdapter]));
this._dossiersTableAdapter.Transaction = null;
}
if ((this._confFluxTableAdapter != null)) {
this._confFluxTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._confFluxTableAdapter]));
this._confFluxTableAdapter.Transaction = null;
}
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
+88 -6
View File
@@ -111,6 +111,62 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
</DbSource>
</Sources>
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ConfFluxTableAdapter" GeneratorDataComponentClassName="ConfFluxTableAdapter" Name="ConfFlux" UserDataComponentName="ConfFluxTableAdapter">
<MainSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.ConfFlux" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [ConfFlux] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([CodFlux] = @Original_CodFlux) AND ([EnabDoss] = @Original_EnabDoss))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="IdxMacchina" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodFlux" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodFlux" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_EnabDoss" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="EnabDoss" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [Dossiers] ([IdxMacchina], [DtRif], [IdxODL], [CodArticolo], [DataType], [Valore]) VALUES (@IdxMacchina, @DtRif, @IdxODL, @CodArticolo, @DataType, @Valore);
SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FROM Dossiers WHERE (IdxDossier = SCOPE_IDENTITY())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="IdxMacchina" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@DtRif" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="DtRif" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IdxODL" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdxODL" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodArticolo" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodArticolo" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@DataType" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="DataType" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Valore" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Valore" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT * FROM ConfFlux</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>UPDATE [ConfFlux] SET [IdxMacchina] = @IdxMacchina, [CodFlux] = @CodFlux, [EnabDoss] = @EnabDoss WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([CodFlux] = @Original_CodFlux) AND ([EnabDoss] = @Original_EnabDoss));
SELECT IdxMacchina, CodFlux, EnabDoss FROM ConfFlux WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="IdxMacchina" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CodFlux" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodFlux" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@EnabDoss" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="EnabDoss" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="IdxMacchina" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CodFlux" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CodFlux" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_EnabDoss" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="EnabDoss" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="IdxMacchina" DataSetColumn="IdxMacchina" />
<Mapping SourceColumn="CodFlux" DataSetColumn="CodFlux" />
<Mapping SourceColumn="EnabDoss" DataSetColumn="EnabDoss" />
</Mappings>
<Sources />
</TableAdapter>
</Tables>
<Sources />
</DataSource>
@@ -123,30 +179,30 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
<xs:complexType>
<xs:sequence>
<xs:element name="IdxDossier" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInTable="IdxDossierColumn" msprop:Generator_ColumnPropNameInRow="IdxDossier" msprop:Generator_UserColumnName="IdxDossier" msprop:Generator_ColumnVarNameInTable="columnIdxDossier" type="xs:int" />
<xs:element name="IdxMacchina" msprop:Generator_ColumnPropNameInRow="IdxMacchina" msprop:Generator_ColumnPropNameInTable="IdxMacchinaColumn" msprop:Generator_ColumnVarNameInTable="columnIdxMacchina" msprop:Generator_UserColumnName="IdxMacchina">
<xs:element name="IdxMacchina" msprop:Generator_UserColumnName="IdxMacchina" msprop:Generator_ColumnPropNameInTable="IdxMacchinaColumn" msprop:Generator_ColumnPropNameInRow="IdxMacchina" msprop:Generator_ColumnVarNameInTable="columnIdxMacchina">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DtRif" msprop:Generator_ColumnPropNameInRow="DtRif" msprop:Generator_ColumnPropNameInTable="DtRifColumn" msprop:Generator_ColumnVarNameInTable="columnDtRif" msprop:Generator_UserColumnName="DtRif" type="xs:dateTime" />
<xs:element name="IdxODL" msprop:Generator_ColumnPropNameInRow="IdxODL" msprop:Generator_ColumnPropNameInTable="IdxODLColumn" msprop:Generator_ColumnVarNameInTable="columnIdxODL" msprop:Generator_UserColumnName="IdxODL" type="xs:int" />
<xs:element name="CodArticolo" msprop:Generator_ColumnPropNameInRow="CodArticolo" msprop:Generator_ColumnPropNameInTable="CodArticoloColumn" msprop:Generator_ColumnVarNameInTable="columnCodArticolo" msprop:Generator_UserColumnName="CodArticolo">
<xs:element name="DtRif" msprop:Generator_UserColumnName="DtRif" msprop:Generator_ColumnPropNameInTable="DtRifColumn" msprop:Generator_ColumnPropNameInRow="DtRif" msprop:Generator_ColumnVarNameInTable="columnDtRif" type="xs:dateTime" />
<xs:element name="IdxODL" msprop:Generator_UserColumnName="IdxODL" msprop:Generator_ColumnPropNameInTable="IdxODLColumn" msprop:Generator_ColumnPropNameInRow="IdxODL" msprop:Generator_ColumnVarNameInTable="columnIdxODL" type="xs:int" />
<xs:element name="CodArticolo" msprop:Generator_UserColumnName="CodArticolo" msprop:Generator_ColumnPropNameInTable="CodArticoloColumn" msprop:Generator_ColumnPropNameInRow="CodArticolo" msprop:Generator_ColumnVarNameInTable="columnCodArticolo">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DataType" msprop:Generator_ColumnPropNameInRow="DataType" msprop:Generator_ColumnPropNameInTable="DataTypeColumn" msprop:Generator_ColumnVarNameInTable="columnDataType" msprop:Generator_UserColumnName="DataType">
<xs:element name="DataType" msprop:Generator_UserColumnName="DataType" msprop:Generator_ColumnPropNameInTable="DataTypeColumn" msprop:Generator_ColumnPropNameInRow="DataType" msprop:Generator_ColumnVarNameInTable="columnDataType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Valore" msprop:Generator_ColumnPropNameInRow="Valore" msprop:Generator_ColumnPropNameInTable="ValoreColumn" msprop:Generator_ColumnVarNameInTable="columnValore" msprop:Generator_UserColumnName="Valore">
<xs:element name="Valore" msprop:Generator_UserColumnName="Valore" msprop:Generator_ColumnPropNameInTable="ValoreColumn" msprop:Generator_ColumnPropNameInRow="Valore" msprop:Generator_ColumnVarNameInTable="columnValore">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
@@ -156,11 +212,37 @@ SELECT IdxDossier, IdxMacchina, DtRif, IdxODL, CodArticolo, DataType, Valore FRO
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ConfFlux" msprop:Generator_RowEvHandlerName="ConfFluxRowChangeEventHandler" msprop:Generator_RowDeletedName="ConfFluxRowDeleted" msprop:Generator_RowDeletingName="ConfFluxRowDeleting" msprop:Generator_RowEvArgName="ConfFluxRowChangeEvent" msprop:Generator_TablePropName="ConfFlux" msprop:Generator_RowChangedName="ConfFluxRowChanged" msprop:Generator_RowChangingName="ConfFluxRowChanging" msprop:Generator_TableClassName="ConfFluxDataTable" msprop:Generator_RowClassName="ConfFluxRow" msprop:Generator_TableVarName="tableConfFlux" msprop:Generator_UserTableName="ConfFlux">
<xs:complexType>
<xs:sequence>
<xs:element name="IdxMacchina" msprop:Generator_ColumnPropNameInRow="IdxMacchina" msprop:Generator_ColumnPropNameInTable="IdxMacchinaColumn" msprop:Generator_ColumnVarNameInTable="columnIdxMacchina" msprop:Generator_UserColumnName="IdxMacchina">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CodFlux" msprop:Generator_ColumnPropNameInRow="CodFlux" msprop:Generator_ColumnPropNameInTable="CodFluxColumn" msprop:Generator_ColumnVarNameInTable="columnCodFlux" msprop:Generator_UserColumnName="CodFlux">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EnabDoss" msprop:Generator_ColumnPropNameInRow="EnabDoss" msprop:Generator_ColumnPropNameInTable="EnabDossColumn" msprop:Generator_ColumnVarNameInTable="columnEnabDoss" msprop:Generator_UserColumnName="EnabDoss" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Dossiers" />
<xs:field xpath="mstns:IdxDossier" />
</xs:unique>
<xs:unique name="ConfFlux_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ConfFlux" />
<xs:field xpath="mstns:IdxMacchina" />
<xs:field xpath="mstns:CodFlux" />
</xs:unique>
</xs:element>
</xs:schema>
+3 -2
View File
@@ -4,9 +4,10 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:Dossiers" ZOrder="1" X="70" Y="70" Height="267" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:Dossiers" ZOrder="2" X="70" Y="70" Height="267" Width="215" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
<Shape ID="DesignTable:ConfFlux" ZOrder="1" X="386" Y="93" Height="133" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
</Shapes>
<Connectors />
</DiagramLayout>
+44 -14
View File
@@ -28802,7 +28802,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[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[8];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.FluxLog";
@@ -28850,29 +28850,36 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
this._commandCollection[5].CommandText = "dbo.stp_FL_InsNew";
this._commandCollection[5].CommandText = "dbo.stp_FL_getFirstByMacc";
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEvento", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Count", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numMax", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[6].Connection = this.Connection;
this._commandCollection[6].CommandText = "dbo.stp_FL_TakeSnapshot";
this._commandCollection[6].CommandText = "dbo.stp_FL_InsNew";
this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEvento", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Count", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[7].Connection = this.Connection;
this._commandCollection[7].CommandText = "dbo.stp_FL_TakeSnapshotLast";
this._commandCollection[7].CommandText = "dbo.stp_FL_TakeSnapshot";
this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMin", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMax", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MaxSec", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[8].Connection = this.Connection;
this._commandCollection[8].CommandText = "dbo.stp_FL_TakeSnapshotLast";
this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[8].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[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMin", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtMax", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -29028,6 +29035,29 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
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.FluxLogDataTable getFirstByMacc(string IdxMacchina, global::System.Nullable<int> numMax) {
this.Adapter.SelectCommand = this.CommandCollection[5];
if ((IdxMacchina == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina));
}
if ((numMax.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[2].Value = ((int)(numMax.Value));
}
else {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
DS_applicazione.FluxLogDataTable dataTable = new DS_applicazione.FluxLogDataTable();
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")]
@@ -29270,7 +29300,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int InsNew(string IdxMacchina, global::System.Nullable<global::System.DateTime> dtEvento, string CodFlux, string Valore, global::System.Nullable<int> Count) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
if ((IdxMacchina == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -29322,7 +29352,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int takeSnapshot(string IdxMacchina, global::System.Nullable<int> MaxSec) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
if ((IdxMacchina == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -29356,7 +29386,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int TakeSnapshotLast(string IdxMacchina, global::System.Nullable<global::System.DateTime> DtMin, global::System.Nullable<global::System.DateTime> DtMax) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8];
if ((IdxMacchina == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
+33 -21
View File
@@ -2596,6 +2596,18 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_FL_getFirstByMacc" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getFirstByMacc" GetMethodModifier="Public" GetMethodName="getFirstByMacc" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getFirstByMacc" UserSourceName="getFirstByMacc">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_FL_getFirstByMacc</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="nvarchar" DbType="String" Direction="Input" ParameterName="@IdxMacchina" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@numMax" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="MoonProConnectionString (Settings)" DbObjectName="MoonPro.dbo.stp_FL_InsNew" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="InsNew" Modifier="Public" Name="InsNew" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="InsNew">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
@@ -4033,33 +4045,33 @@ FROM v_AlarmLog</CommandText>
<xs:selector xpath=".//mstns:AlarmLog" />
<xs:field xpath="mstns:AlarmLogId" />
</xs:unique>
<xs:keyref name="FK_AnagTags_DiarioDichiarazioni" refer="AnagTags_Constraint1" msprop:rel_Generator_UserParentTable="AnagTags" msprop:rel_Generator_UserChildTable="DiarioDichiarazioni" msprop:rel_Generator_RelationVarName="relationFK_AnagTags_DiarioDichiarazioni" msprop:rel_Generator_ChildPropName="GetDiarioDichiarazioniRows" msprop:rel_Generator_UserRelationName="FK_AnagTags_DiarioDichiarazioni" msprop:rel_Generator_ParentPropName="AnagTagsRow">
<xs:keyref name="FK_AnagTags_DiarioDichiarazioni" refer="AnagTags_Constraint1" msprop:rel_Generator_UserParentTable="AnagTags" msprop:rel_Generator_UserChildTable="DiarioDichiarazioni" msprop:rel_Generator_RelationVarName="relationFK_AnagTags_DiarioDichiarazioni" msprop:rel_Generator_ChildPropName="GetDiarioDichiarazioniRows" msprop:rel_Generator_ParentPropName="AnagTagsRow" msprop:rel_Generator_UserRelationName="FK_AnagTags_DiarioDichiarazioni">
<xs:selector xpath=".//mstns:DiarioDichiarazioni" />
<xs:field xpath="mstns:TagCode" />
</xs:keyref>
</xs:element>
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="FK_Macchine2FamiglieMacchine_FamiglieMacchine" msdata:parent="FamiglieMacchine" msdata:child="Macchine2FamiglieMacchine" msdata:parentkey="IdxFamiglia" msdata:childkey="IdxFamiglia" msprop:Generator_UserParentTable="FamiglieMacchine" msprop:Generator_UserChildTable="Macchine2FamiglieMacchine" msprop:Generator_RelationVarName="relationFK_Macchine2FamiglieMacchine_FamiglieMacchine" msprop:Generator_ChildPropName="GetMacchine2FamiglieMacchineRows" msprop:Generator_UserRelationName="FK_Macchine2FamiglieMacchine_FamiglieMacchine" msprop:Generator_ParentPropName="FamiglieMacchineRow" />
<msdata:Relationship name="FK_Macchine2FamiglieMacchine_Macchine" msdata:parent="Macchine" msdata:child="Macchine2FamiglieMacchine" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="Macchine2FamiglieMacchine" msprop:Generator_RelationVarName="relationFK_Macchine2FamiglieMacchine_Macchine" msprop:Generator_ChildPropName="GetMacchine2FamiglieMacchineRows" msprop:Generator_UserRelationName="FK_Macchine2FamiglieMacchine_Macchine" msprop:Generator_ParentPropName="MacchineRow" />
<msdata:Relationship name="FK_TransizioneStati_FamiglieMacchine" msdata:parent="FamiglieMacchine" msdata:child="TransizioneStati" msdata:parentkey="IdxFamiglia" msdata:childkey="IdxFamiglia" msprop:Generator_UserParentTable="FamiglieMacchine" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_FamiglieMacchine" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_UserRelationName="FK_TransizioneStati_FamiglieMacchine" msprop:Generator_ParentPropName="FamiglieMacchineRow" />
<msdata:Relationship name="FK_StatoMacchine_Macchine" msdata:parent="Macchine" msdata:child="StatoMacchine" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_Macchine" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_UserRelationName="FK_StatoMacchine_Macchine" msprop:Generator_ParentPropName="MacchineRow" />
<msdata:Relationship name="FK_TransizioneStati_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="TransizioneStati" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_AnagraficaStati" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_UserRelationName="FK_TransizioneStati_AnagraficaStati" msprop:Generator_ParentPropName="AnagraficaStatiRow" />
<msdata:Relationship name="FK_StatoMacchine_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="StatoMacchine" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_AnagraficaStati" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_UserRelationName="FK_StatoMacchine_AnagraficaStati" msprop:Generator_ParentPropName="AnagraficaStatiRow" />
<msdata:Relationship name="FK_EventList_Macchine" msdata:parent="Macchine" msdata:child="EventList" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_Macchine" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_UserRelationName="FK_EventList_Macchine" msprop:Generator_ParentPropName="MacchineRow" />
<msdata:Relationship name="FK_TransizioneStati_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="TransizioneStati" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipo" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_AnagraficaEventi" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_UserRelationName="FK_TransizioneStati_AnagraficaEventi" msprop:Generator_ParentPropName="AnagraficaEventiRow" />
<msdata:Relationship name="FK_EventList_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="EventList" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipo" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_AnagraficaEventi" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_UserRelationName="FK_EventList_AnagraficaEventi" msprop:Generator_ParentPropName="AnagraficaEventiRow" />
<msdata:Relationship name="FK_DiarioDiBordo_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="DiarioDiBordo" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_AnagraficaStati" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_UserRelationName="FK_DiarioDiBordo_AnagraficaStati" msprop:Generator_ParentPropName="AnagraficaStatiRow" />
<msdata:Relationship name="FK_DiarioDiBordo_Macchine" msdata:parent="Macchine" msdata:child="DiarioDiBordo" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_Macchine" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_UserRelationName="FK_DiarioDiBordo_Macchine" msprop:Generator_ParentPropName="MacchineRow" />
<msdata:Relationship name="FK_TransizioneEventi_AnagraficaEventi1" msdata:parent="AnagraficaEventi" msdata:child="TransizioneEventi" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipoEvento" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneEventi" msprop:Generator_RelationVarName="relationFK_TransizioneEventi_AnagraficaEventi1" msprop:Generator_ChildPropName="GetTransizioneEventiRows" msprop:Generator_UserRelationName="FK_TransizioneEventi_AnagraficaEventi1" msprop:Generator_ParentPropName="AnagraficaEventiRow" />
<msdata:Relationship name="FK_Macchine2FamigliaIngressi_Macchine" msdata:parent="Macchine" msdata:child="Macchine2FamigliaIngressi" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="Macchine2FamigliaIngressi" msprop:Generator_RelationVarName="relationFK_Macchine2FamigliaIngressi_Macchine" msprop:Generator_ChildPropName="GetMacchine2FamigliaIngressiRows" msprop:Generator_UserRelationName="FK_Macchine2FamigliaIngressi_Macchine" msprop:Generator_ParentPropName="MacchineRow" />
<msdata:Relationship name="FK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" msdata:parent="FamigliaTipoIngressi" msdata:child="Macchine2FamigliaIngressi" msdata:parentkey="IdxFamigliaIngresso" msdata:childkey="IdxFamigliaIngresso" msprop:Generator_UserParentTable="FamigliaTipoIngressi" msprop:Generator_UserChildTable="Macchine2FamigliaIngressi" msprop:Generator_RelationVarName="relationFK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" msprop:Generator_ChildPropName="GetMacchine2FamigliaIngressiRows" msprop:Generator_UserRelationName="FK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" msprop:Generator_ParentPropName="FamigliaTipoIngressiRow" />
<msdata:Relationship name="FK_TransizioneIngressi_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="TransizioneIngressi" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipoEvento" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneIngressi" msprop:Generator_RelationVarName="relationFK_TransizioneIngressi_AnagraficaEventi" msprop:Generator_ChildPropName="GetTransizioneIngressiRows" msprop:Generator_UserRelationName="FK_TransizioneIngressi_AnagraficaEventi" msprop:Generator_ParentPropName="AnagraficaEventiRow" />
<msdata:Relationship name="FK_TransizioneIngressi_FamigliaTipoIngressi" msdata:parent="FamigliaTipoIngressi" msdata:child="TransizioneIngressi" msdata:parentkey="IdxFamigliaIngresso" msdata:childkey="IdxFamigliaIngresso" msprop:Generator_UserParentTable="FamigliaTipoIngressi" msprop:Generator_UserChildTable="TransizioneIngressi" msprop:Generator_RelationVarName="relationFK_TransizioneIngressi_FamigliaTipoIngressi" msprop:Generator_ChildPropName="GetTransizioneIngressiRows" msprop:Generator_UserRelationName="FK_TransizioneIngressi_FamigliaTipoIngressi" msprop:Generator_ParentPropName="FamigliaTipoIngressiRow" />
<msdata:Relationship name="FK_DiarioDiBordo_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="DiarioDiBordo" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_AnagraficaOperatori" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_UserRelationName="FK_DiarioDiBordo_AnagraficaOperatori" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" />
<msdata:Relationship name="FK_EventList_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="EventList" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_AnagraficaOperatori" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_UserRelationName="FK_EventList_AnagraficaOperatori" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" />
<msdata:Relationship name="FK_StatoMacchine_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="StatoMacchine" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_AnagraficaOperatori" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_UserRelationName="FK_StatoMacchine_AnagraficaOperatori" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" />
<msdata:Relationship name="AnagArticoli_DiarioDiBordo" msdata:parent="AnagArticoli" msdata:child="DiarioDiBordo" msdata:parentkey="CodArticolo" msdata:childkey="CodArticolo" msprop:Generator_UserParentTable="AnagArticoli" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationAnagArticoli_DiarioDiBordo" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_UserRelationName="AnagArticoli_DiarioDiBordo" msprop:Generator_ParentPropName="AnagArticoliRow" />
<msdata:Relationship name="FK_Macchine2FamiglieMacchine_FamiglieMacchine" msdata:parent="FamiglieMacchine" msdata:child="Macchine2FamiglieMacchine" msdata:parentkey="IdxFamiglia" msdata:childkey="IdxFamiglia" msprop:Generator_UserParentTable="FamiglieMacchine" msprop:Generator_UserChildTable="Macchine2FamiglieMacchine" msprop:Generator_RelationVarName="relationFK_Macchine2FamiglieMacchine_FamiglieMacchine" msprop:Generator_ChildPropName="GetMacchine2FamiglieMacchineRows" msprop:Generator_ParentPropName="FamiglieMacchineRow" msprop:Generator_UserRelationName="FK_Macchine2FamiglieMacchine_FamiglieMacchine" />
<msdata:Relationship name="FK_Macchine2FamiglieMacchine_Macchine" msdata:parent="Macchine" msdata:child="Macchine2FamiglieMacchine" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="Macchine2FamiglieMacchine" msprop:Generator_RelationVarName="relationFK_Macchine2FamiglieMacchine_Macchine" msprop:Generator_ChildPropName="GetMacchine2FamiglieMacchineRows" msprop:Generator_ParentPropName="MacchineRow" msprop:Generator_UserRelationName="FK_Macchine2FamiglieMacchine_Macchine" />
<msdata:Relationship name="FK_TransizioneStati_FamiglieMacchine" msdata:parent="FamiglieMacchine" msdata:child="TransizioneStati" msdata:parentkey="IdxFamiglia" msdata:childkey="IdxFamiglia" msprop:Generator_UserParentTable="FamiglieMacchine" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_FamiglieMacchine" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_ParentPropName="FamiglieMacchineRow" msprop:Generator_UserRelationName="FK_TransizioneStati_FamiglieMacchine" />
<msdata:Relationship name="FK_StatoMacchine_Macchine" msdata:parent="Macchine" msdata:child="StatoMacchine" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_Macchine" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_ParentPropName="MacchineRow" msprop:Generator_UserRelationName="FK_StatoMacchine_Macchine" />
<msdata:Relationship name="FK_TransizioneStati_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="TransizioneStati" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_AnagraficaStati" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_ParentPropName="AnagraficaStatiRow" msprop:Generator_UserRelationName="FK_TransizioneStati_AnagraficaStati" />
<msdata:Relationship name="FK_StatoMacchine_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="StatoMacchine" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_AnagraficaStati" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_ParentPropName="AnagraficaStatiRow" msprop:Generator_UserRelationName="FK_StatoMacchine_AnagraficaStati" />
<msdata:Relationship name="FK_EventList_Macchine" msdata:parent="Macchine" msdata:child="EventList" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_Macchine" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_ParentPropName="MacchineRow" msprop:Generator_UserRelationName="FK_EventList_Macchine" />
<msdata:Relationship name="FK_TransizioneStati_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="TransizioneStati" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipo" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneStati" msprop:Generator_RelationVarName="relationFK_TransizioneStati_AnagraficaEventi" msprop:Generator_ChildPropName="GetTransizioneStatiRows" msprop:Generator_ParentPropName="AnagraficaEventiRow" msprop:Generator_UserRelationName="FK_TransizioneStati_AnagraficaEventi" />
<msdata:Relationship name="FK_EventList_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="EventList" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipo" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_AnagraficaEventi" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_ParentPropName="AnagraficaEventiRow" msprop:Generator_UserRelationName="FK_EventList_AnagraficaEventi" />
<msdata:Relationship name="FK_DiarioDiBordo_AnagraficaStati" msdata:parent="AnagraficaStati" msdata:child="DiarioDiBordo" msdata:parentkey="IdxStato" msdata:childkey="IdxStato" msprop:Generator_UserParentTable="AnagraficaStati" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_AnagraficaStati" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_ParentPropName="AnagraficaStatiRow" msprop:Generator_UserRelationName="FK_DiarioDiBordo_AnagraficaStati" />
<msdata:Relationship name="FK_DiarioDiBordo_Macchine" msdata:parent="Macchine" msdata:child="DiarioDiBordo" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_Macchine" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_ParentPropName="MacchineRow" msprop:Generator_UserRelationName="FK_DiarioDiBordo_Macchine" />
<msdata:Relationship name="FK_TransizioneEventi_AnagraficaEventi1" msdata:parent="AnagraficaEventi" msdata:child="TransizioneEventi" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipoEvento" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneEventi" msprop:Generator_RelationVarName="relationFK_TransizioneEventi_AnagraficaEventi1" msprop:Generator_ChildPropName="GetTransizioneEventiRows" msprop:Generator_ParentPropName="AnagraficaEventiRow" msprop:Generator_UserRelationName="FK_TransizioneEventi_AnagraficaEventi1" />
<msdata:Relationship name="FK_Macchine2FamigliaIngressi_Macchine" msdata:parent="Macchine" msdata:child="Macchine2FamigliaIngressi" msdata:parentkey="IdxMacchina" msdata:childkey="IdxMacchina" msprop:Generator_UserParentTable="Macchine" msprop:Generator_UserChildTable="Macchine2FamigliaIngressi" msprop:Generator_RelationVarName="relationFK_Macchine2FamigliaIngressi_Macchine" msprop:Generator_ChildPropName="GetMacchine2FamigliaIngressiRows" msprop:Generator_ParentPropName="MacchineRow" msprop:Generator_UserRelationName="FK_Macchine2FamigliaIngressi_Macchine" />
<msdata:Relationship name="FK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" msdata:parent="FamigliaTipoIngressi" msdata:child="Macchine2FamigliaIngressi" msdata:parentkey="IdxFamigliaIngresso" msdata:childkey="IdxFamigliaIngresso" msprop:Generator_UserParentTable="FamigliaTipoIngressi" msprop:Generator_UserChildTable="Macchine2FamigliaIngressi" msprop:Generator_RelationVarName="relationFK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" msprop:Generator_ChildPropName="GetMacchine2FamigliaIngressiRows" msprop:Generator_ParentPropName="FamigliaTipoIngressiRow" msprop:Generator_UserRelationName="FK_Macchine2FamigliaIngressi_FamigliaTipoIngressi" />
<msdata:Relationship name="FK_TransizioneIngressi_AnagraficaEventi" msdata:parent="AnagraficaEventi" msdata:child="TransizioneIngressi" msdata:parentkey="IdxTipo" msdata:childkey="IdxTipoEvento" msprop:Generator_UserParentTable="AnagraficaEventi" msprop:Generator_UserChildTable="TransizioneIngressi" msprop:Generator_RelationVarName="relationFK_TransizioneIngressi_AnagraficaEventi" msprop:Generator_ChildPropName="GetTransizioneIngressiRows" msprop:Generator_ParentPropName="AnagraficaEventiRow" msprop:Generator_UserRelationName="FK_TransizioneIngressi_AnagraficaEventi" />
<msdata:Relationship name="FK_TransizioneIngressi_FamigliaTipoIngressi" msdata:parent="FamigliaTipoIngressi" msdata:child="TransizioneIngressi" msdata:parentkey="IdxFamigliaIngresso" msdata:childkey="IdxFamigliaIngresso" msprop:Generator_UserParentTable="FamigliaTipoIngressi" msprop:Generator_UserChildTable="TransizioneIngressi" msprop:Generator_RelationVarName="relationFK_TransizioneIngressi_FamigliaTipoIngressi" msprop:Generator_ChildPropName="GetTransizioneIngressiRows" msprop:Generator_ParentPropName="FamigliaTipoIngressiRow" msprop:Generator_UserRelationName="FK_TransizioneIngressi_FamigliaTipoIngressi" />
<msdata:Relationship name="FK_DiarioDiBordo_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="DiarioDiBordo" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationFK_DiarioDiBordo_AnagraficaOperatori" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" msprop:Generator_UserRelationName="FK_DiarioDiBordo_AnagraficaOperatori" />
<msdata:Relationship name="FK_EventList_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="EventList" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="EventList" msprop:Generator_RelationVarName="relationFK_EventList_AnagraficaOperatori" msprop:Generator_ChildPropName="GetEventListRows" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" msprop:Generator_UserRelationName="FK_EventList_AnagraficaOperatori" />
<msdata:Relationship name="FK_StatoMacchine_AnagraficaOperatori" msdata:parent="AnagraficaOperatori" msdata:child="StatoMacchine" msdata:parentkey="MatrOpr" msdata:childkey="MatrOpr" msprop:Generator_UserParentTable="AnagraficaOperatori" msprop:Generator_UserChildTable="StatoMacchine" msprop:Generator_RelationVarName="relationFK_StatoMacchine_AnagraficaOperatori" msprop:Generator_ChildPropName="GetStatoMacchineRows" msprop:Generator_ParentPropName="AnagraficaOperatoriRow" msprop:Generator_UserRelationName="FK_StatoMacchine_AnagraficaOperatori" />
<msdata:Relationship name="AnagArticoli_DiarioDiBordo" msdata:parent="AnagArticoli" msdata:child="DiarioDiBordo" msdata:parentkey="CodArticolo" msdata:childkey="CodArticolo" msprop:Generator_UserParentTable="AnagArticoli" msprop:Generator_UserChildTable="DiarioDiBordo" msprop:Generator_RelationVarName="relationAnagArticoli_DiarioDiBordo" msprop:Generator_ChildPropName="GetDiarioDiBordoRows" msprop:Generator_ParentPropName="AnagArticoliRow" msprop:Generator_UserRelationName="AnagArticoli_DiarioDiBordo" />
</xs:appinfo>
</xs:annotation>
</xs:schema>
+1 -1
View File
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="869" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="830" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:Macchine2FamiglieMacchine" ZOrder="30" X="553" Y="715" Height="115" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:FamiglieMacchine" ZOrder="32" X="519" Y="1007" Height="115" Width="249" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+217 -3
View File
@@ -48,6 +48,8 @@ namespace MapoDb
public DS_UtilityTableAdapters.CommentiTableAdapter taComm;
public DS_DossParTableAdapters.ConfFluxTableAdapter taConfFlux;
public DS_ProdTempiTableAdapters.DatiConfermatiTableAdapter taDatiConf;
public DS_ProdTempiTableAdapters.DatiMacchineTableAdapter taDatiMacchine;
@@ -402,7 +404,36 @@ namespace MapoDb
/// <returns></returns>
public static string currStatoMaccHash(string idxMacchina)
{
return mHash(string.Format("CurrStatoMacc:{0}", idxMacchina));
return mHash($"CurrStatoMacc:{idxMacchina}");
}
/// <summary>
/// Hash dati ConfFlux x la macchina specificata
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public static string confFluxMaccHash(string idxMacchina)
{
return mHash($"MachineConfFlux:{idxMacchina}");
}
/// <summary>
/// Hash dati Dossier (last) x la macchina specificata
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public static string dossLastMaccHash(string idxMacchina)
{
return mHash($"MachineDossierLast:{idxMacchina}");
}
/// <summary>
/// Hash dati FluxLog (iniziale) x la macchina specificata
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public static string fluxLogFirstMaccHash(string idxMacchina)
{
return mHash($"MachineFluxLogFirst:{idxMacchina}");
}
public static List<T> DataTableToList<T>(DataTable dt) where T : class, new()
@@ -717,7 +748,7 @@ namespace MapoDb
//2020.01.31 nuovo obj x evitare concorrenza
MapoDb man = new MapoDb();
answTab = man.taAnagSt.GetData();
//answTab = MapoDbObj.taAnagSt.GetData();
//resultList = MapoDbObj.taAnagSt.GetData();
// salvo in redis...
rCall = JsonConvert.SerializeObject(answTab);
int anagrCacheDur = memLayer.ML.CRI("anagrCacheDur");
@@ -1405,7 +1436,7 @@ namespace MapoDb
// 2020.01.31 uso nuovo oggetto connessione
MapoDb man = new MapoDb();
answTab = man.currStatoMaccTab(idxMacchina);
//answTab = MapoDbObj.currStatoMaccTab(idxMacchina);
//resultList = MapoDbObj.currStatoMaccTab(idxMacchina);
// salvo in redis...
rCall = JsonConvert.SerializeObject(answTab);
int currStatoMaccCacheDur = memLayer.ML.CRI("currStatoMaccCacheDur");
@@ -1424,6 +1455,187 @@ namespace MapoDb
return answTab;
}
/// <summary>
/// Restituisce l'elenco codici flusso (da confFlux) x una macchina (se presenti)
/// Impiegata anche cache redis
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public List<string> confFluxMach(string idxMacchina)
{
List<string> resultList = new List<string>();
string rawData = "";
if (memLayer.ML.CRB("IOB_RedEnab"))
{
saveCallRec("confFluxMach");
string redKey = confFluxMaccHash(idxMacchina);
try
{
DataLayer man = new DataLayer();
rawData = memLayer.ML.getRSV(redKey);
if (!string.IsNullOrEmpty(rawData))
{
var redisResult = JsonConvert.DeserializeObject<List<string>>(rawData);
resultList = redisResult != null ? redisResult : new List<string>();
}
else
{
resultList = man.taConfFlux
.GetData()
.Where(x => x.IdxMacchina == idxMacchina)
.Select(x => x.CodFlux)
.ToList();
// salvo in redis...
rawData = JsonConvert.SerializeObject(resultList);
int IO_CacheConfFluxMin = memLayer.ML.CRI("IO_CacheConfFluxMin");
memLayer.ML.setRSV(redKey, rawData, IO_CacheConfFluxMin * 60);
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in recupero confFluxMach{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
resultList = taConfFlux
.GetData()
.Where(x => x.IdxMacchina == idxMacchina)
.Select(x => x.CodFlux)
.ToList();
}
if (resultList == null)
{
resultList = new List<string>();
}
return resultList;
}
/// <summary>
/// Restituisce l'elenco delle date dei dossier x una macchina (se presenti)
/// Impiegata anche cache redis
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public List<DateTime> dossierLastByMach(string idxMacchina)
{
List<DateTime> resultList = new List<DateTime>();
string rawData = "";
if (memLayer.ML.CRB("IOB_RedEnab"))
{
saveCallRec("dossierLastByMach");
string redKey = dossLastMaccHash(idxMacchina);
try
{
DataLayer man = new DataLayer();
rawData = memLayer.ML.getRSV(redKey);
if (!string.IsNullOrEmpty(rawData))
{
var redisResult = JsonConvert.DeserializeObject<List<DateTime>>(rawData);
resultList = redisResult != null ? redisResult : new List<DateTime>();
}
else
{
resultList = man.taDOSS
.getLastByMacc(idxMacchina)
.Select(x=> x.DtRif)
.ToList();
// salvo in redis...
rawData = JsonConvert.SerializeObject(resultList);
int IO_CacheDossLastMin = memLayer.ML.CRI("IO_CacheDossLastMin");
memLayer.ML.setRSV(redKey, rawData, IO_CacheDossLastMin * 60);
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in recupero dossierLastByMach{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
resultList = taDOSS
.getLastByMacc(idxMacchina)
.Select(x => x.DtRif)
.ToList();
}
if (resultList == null)
{
resultList = new List<DateTime>();
}
return resultList;
}
/// <summary>
/// Svuota la cache redis x l'elenco delle righe di confFlux x una macchina (se presenti)
/// </summary>
/// <param name="idxMacchina"></param>
/// <returns></returns>
public bool dossierLastByMachReset(string idxMacchina)
{
bool answ = false;
string rawData = "";
string redKey = dossLastMaccHash(idxMacchina);
memLayer.ML.setRSV(redKey, rawData, 1);
return answ;
}
/// <summary>
/// Restituisce l'elenco delle data-ora di confFlux x una macchina (se presenti)
/// Impiegata anche cache redis
/// </summary>
/// <param name="idxMacchina"></param>
/// <param name="numMax">num record da recuperare</param>
/// <returns></returns>
public List<DateTime> fluxLogFirstByMach(string idxMacchina, int numMax = 10)
{
List<DateTime> resultList = new List<DateTime>();
string rawData = "";
if (memLayer.ML.CRB("IOB_RedEnab"))
{
saveCallRec("fluxLogFirstByMach");
string redKey = fluxLogFirstMaccHash(idxMacchina);
try
{
DataLayer man = new DataLayer();
rawData = memLayer.ML.getRSV(redKey);
if (!string.IsNullOrEmpty(rawData))
{
var redisResult = JsonConvert.DeserializeObject<List<DateTime>>(rawData);
resultList = redisResult != null ? redisResult : new List<DateTime>();
}
else
{
resultList = man.taFL
.getFirstByMacc(idxMacchina, numMax)
.Select(x => x.dtEvento)
.ToList();
// salvo in redis...
rawData = JsonConvert.SerializeObject(resultList);
int IO_CacheFluxLogFirstMin = memLayer.ML.CRI("IO_CacheFluxLogFirstMin");
memLayer.ML.setRSV(redKey, rawData, IO_CacheFluxLogFirstMin * 60);
}
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in recupero fluxLogFirstByMach{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
resultList = taFL
.getFirstByMacc(idxMacchina, numMax)
.Select(x => x.dtEvento)
.ToList();
}
if (resultList == null)
{
resultList = new List<DateTime>();
}
return resultList;
}
/// <summary>
/// Rimuove Key dell'ODL corrente x una data macchina IOB
/// </summary>
@@ -4024,6 +4236,7 @@ namespace MapoDb
taArcaGiac = new DS_ArcaTableAdapters.GiacenzeTableAdapter();
taCalFF = new DS_ProdTempiTableAdapters.CalendFesteFerieTableAdapter();
taComm = new DS_UtilityTableAdapters.CommentiTableAdapter();
taConfFlux = new DS_DossParTableAdapters.ConfFluxTableAdapter();
taDatiConf = new DS_ProdTempiTableAdapters.DatiConfermatiTableAdapter();
taDatiMacchine = new DS_ProdTempiTableAdapters.DatiMacchineTableAdapter();
taDatiProd = new DS_ProdTempiTableAdapters.DatiProduzioneTableAdapter();
@@ -4096,6 +4309,7 @@ namespace MapoDb
taArcaGiac.Connection.ConnectionString = connectionStringArca;
taCalFF.Connection.ConnectionString = connectionString;
taComm.Connection.ConnectionString = connectionString;
taConfFlux.Connection.ConnectionString = connectionString;
taDatiConf.Connection.ConnectionString = connectionString;
taDatiMacchine.Connection.ConnectionString = connectionString;
taDatiProd.Connection.ConnectionString = connectionString;