From 38e553a5bd90495409f47b474e5d09297f990a8e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 1 Jul 2021 15:19:08 +0200 Subject: [PATCH 1/2] Aggiunta metodi x salvataggio statistiche su DB e redis (OK!!!) --- AppData/ComLib.cs | 165 +++- AppData/DS_App.Designer.cs | 1643 ++++++++++++++++++++++++++++++++++-- AppData/DS_App.xsd | 189 +++++ AppData/DS_App.xss | 114 +-- AppData/DataLayer.cs | 6 + 5 files changed, 1992 insertions(+), 125 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 04f4dc9..0ecf4f5 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -63,7 +63,9 @@ namespace AppData public static string redOrders = "NKC:SERV:ORDERS"; public static string redOutPath = "NKC:SERV:BREQ"; public static string redProdAnsw = "NKC:PROD:BUNKS"; - public static string redProdMachStateData = "NKC:PROD:MACHSTATE"; + public static string redProdMachClock = "NKC:PROD:MACH:CLOCK"; + public static string redProdMachList = "NKC:PROD:MACH:LIST"; + public static string redProdMachStateData = "NKC:PROD:MACH:STATE"; public static string redProdReq = "NKC:SERV:BUNKS"; /// @@ -249,6 +251,41 @@ namespace AppData #region Private Methods + /// + /// verifica che la macchina dichiarata esiste o la crea... + /// + /// + private static void checkPlace(string machine) + { + DS_App.PlacesDataTable tabPlace = new DS_App.PlacesDataTable(); + DataLayer DLMan = new DataLayer(); + // cerco in Redis... + string rawData = memLayer.ML.getRSV(redProdMachList); + // provo a deserializzare e cercare... + if (!string.IsNullOrEmpty(rawData)) + { + tabPlace = JsonConvert.DeserializeObject(rawData); + } + // cerco item + var foundItem = tabPlace.Where(x => x.PlaceCod == machine).ToList(); + if (foundItem.Count == 0) + { + // forzo (ri)lettura... + tabPlace = DLMan.taPlac.GetData(); + rawData = JsonConvert.SerializeObject(tabPlace); + memLayer.ML.setRSV(redProdMachList, rawData, 600); + } + // cerco di nuovoitem + foundItem = tabPlace.Where(x => x.PlaceCod == machine).ToList(); + if (foundItem.Count == 0) + { + // se non ci fosse --> creo + DLMan.taPlac.insertQuery(machine); + // inserisco empty x 1 sec così rileggerà... + memLayer.ML.setRSV(redProdMachList, "", 1); + } + } + /// /// Transcodifica dati da format DB a formato PROD /// @@ -421,6 +458,38 @@ namespace AppData return answ; } + private static List saveStatus(string machine, List lastRecord) + { + List currData = new List(); + // ora processo lo status attuale x salvare MAPPA ULTIMO status in Redis... + string redVal = memLayer.ML.getRSV(redProdMachStateData); + if (!string.IsNullOrEmpty(redVal)) + { + currData = JsonConvert.DeserializeObject>(redVal); + + // certo info x macchina corrente + var machRecord = currData.Where(x => x.Machine == machine).FirstOrDefault(); + // recupero ultimo stato + + if (machRecord != null) + { + machRecord.Records = lastRecord; + } + // aggiungo + else + { + currData.Add(new MachineStatData() { Machine = machine, Records = lastRecord }); + } + } + + // serializzo + string rawData = JsonConvert.SerializeObject(currData); + + // salvo! + memLayer.ML.setRSV(redProdMachStateData, rawData); + return currData; + } + /// /// Salvo in Redis il SUCCESSIVO bunk da lavorare /// @@ -1809,38 +1878,84 @@ namespace AppData /// public static bool prodMachStateDataInsert(MachineStatData updateRecords) { - List currData = new List(); - // FIXME TODO: salvare TUTTO sul DB !!! + /* ------------------------------------------------------------------ + * Info preliminari + * Public Const STATION_LINE As String = "LINE" + * Public Const STATION_PRINTER As String = "PRINTER" + * Public Const STATION_NC_MACHINE As String = "NC_MACHINE" + * Public Const STATION_UNLOADER As String = "UNLOADER" + //* Public Const STATION_NC_MACHINE As String = "NC MACHINE" + * + * + * + * Public Const ST_KEEP_ALIVE_START As String = "00" + * Public Const ST_KEEP_ALIVE As String = "01" + * + * + * Public Const ST_PRINTER_INIT As String = "02" + * Public Const ST_PRINTER_WARM_START As String = "03" + * Public Const ST_PRINTER_READY As String = "04" + * Public Const ST_PRINTER_WAIT_SHEET_LOADED As String = "05" + * Public Const ST_PRINTER_PRINTING As String = "06" + * Public Const ST_PRINTER_WAIT_SHEET_UNLOADED As String = "07" + * Public Const ST_PRINTER_WAIT_PROGRAM As String = "08" + * + * ------------------------------------------------------------------ */ + + bool answ = false; + DataLayer DLMan = new DataLayer(); + + // recupero clockDrift + string clockDriftKey = $"{redProdMachClock}:{updateRecords.Machine}"; + string rawDrift = memLayer.ML.getRSV(clockDriftKey); + double driftSec = 0; + if (!string.IsNullOrEmpty(rawDrift)) + { + double.TryParse(rawDrift, out driftSec); + } + + // salvo in mongo x debug ComLib.man.saveProdStat(updateRecords); - // leggo stato attuale... - string redVal = memLayer.ML.getRSV(redProdMachStateData); - if (!string.IsNullOrEmpty(redVal)) + // verifica preliminare della PLACE + checkPlace(updateRecords.Machine); + // salvo sul DB il set di dati... + foreach (var item in updateRecords.Records) { - currData = JsonConvert.DeserializeObject>(redVal); - - // certo info x macchina corrente - var machRecord = currData.Where(x => x.Machine == updateRecords.Machine).FirstOrDefault(); - // recupero ultimo stato - var lastRecord = updateRecords.Records.OrderByDescending(x => x.DtRecord).ToList(); - //var lastRecord = newData.Records.OrderByDescending(x => x.DtRecord).Take(1).ToList(); - - if (machRecord != null) + // i keep alive NON li scrivo ma processo + switch (item.Code) { - machRecord.Records = lastRecord; - } - // aggiungo - else - { - currData.Add(new MachineStatData() { Machine = updateRecords.Machine, Records = lastRecord }); + case "00": + // è PRIMO keepalive --> uso x sync dell'orologio + DateTime adesso = DateTime.Now; + DateTime machClock = item.DtRecord; + driftSec = adesso.Subtract(machClock).TotalSeconds; + // salvo + memLayer.ML.setRSV(clockDriftKey, $"{driftSec}"); + break; + + case "01": + // x ora lo ignoro ma so che ora la macchina è ALIVE... + break; + + default: + DLMan.taStatLog.insert(item.DtRecord.AddMilliseconds(driftSec), updateRecords.Machine, item.Station, item.Code, item.Payload, 0); + break; } } - // serializzo - string rawData = JsonConvert.SerializeObject(currData); + // chiamo procedura x fix durate + DLMan.taStatLog.updateDuration(updateRecords.Machine); - // salvo! - bool answ = memLayer.ML.setRSV(redProdMachStateData, rawData); + // recupero ultimo record ricevuto + try + { + var lastRecord = updateRecords.Records.OrderByDescending(x => x.DtRecord).Take(1).ToList(); + saveStatus(updateRecords.Machine, lastRecord); + answ = true; + } + catch + { } return answ; } diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 1663e71..d0af3f7 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -100,6 +100,10 @@ namespace AppData { private OrderListTreeDataTable tableOrderListTree; + private PlacesDataTable tablePlaces; + + private StatusLogDataTable tableStatusLog; + private global::System.Data.DataRelation relationFK_ItemList_Materials1; private global::System.Data.DataRelation relationFK_OffOrd2Item_OfflineOrderList; @@ -122,6 +126,8 @@ namespace AppData { private global::System.Data.DataRelation relationFK_Order2FinalKit_OrderList; + private global::System.Data.DataRelation relationFK_StatusLog_Places; + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -264,6 +270,12 @@ namespace AppData { if ((ds.Tables["OrderListTree"] != null)) { base.Tables.Add(new OrderListTreeDataTable(ds.Tables["OrderListTree"])); } + if ((ds.Tables["Places"] != null)) { + base.Tables.Add(new PlacesDataTable(ds.Tables["Places"])); + } + if ((ds.Tables["StatusLog"] != null)) { + base.Tables.Add(new StatusLogDataTable(ds.Tables["StatusLog"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -662,6 +674,26 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public PlacesDataTable Places { + get { + return this.tablePlaces; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public StatusLogDataTable StatusLog { + get { + return this.tableStatusLog; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -843,6 +875,12 @@ namespace AppData { if ((ds.Tables["OrderListTree"] != null)) { base.Tables.Add(new OrderListTreeDataTable(ds.Tables["OrderListTree"])); } + if ((ds.Tables["Places"] != null)) { + base.Tables.Add(new PlacesDataTable(ds.Tables["Places"])); + } + if ((ds.Tables["StatusLog"] != null)) { + base.Tables.Add(new StatusLogDataTable(ds.Tables["StatusLog"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -1104,6 +1142,18 @@ namespace AppData { this.tableOrderListTree.InitVars(); } } + this.tablePlaces = ((PlacesDataTable)(base.Tables["Places"])); + if ((initTable == true)) { + if ((this.tablePlaces != null)) { + this.tablePlaces.InitVars(); + } + } + this.tableStatusLog = ((StatusLogDataTable)(base.Tables["StatusLog"])); + if ((initTable == true)) { + if ((this.tableStatusLog != null)) { + this.tableStatusLog.InitVars(); + } + } this.relationFK_ItemList_Materials1 = this.Relations["FK_ItemList_Materials1"]; this.relationFK_OffOrd2Item_OfflineOrderList = this.Relations["FK_OffOrd2Item_OfflineOrderList"]; this.relationFK_ItemList_KitList = this.Relations["FK_ItemList_KitList"]; @@ -1115,6 +1165,7 @@ namespace AppData { this.relationFK_BinList_ItemList = this.Relations["FK_BinList_ItemList"]; this.relationFK_Order2FinalKit_FinalKit = this.Relations["FK_Order2FinalKit_FinalKit"]; this.relationFK_Order2FinalKit_OrderList = this.Relations["FK_Order2FinalKit_OrderList"]; + this.relationFK_StatusLog_Places = this.Relations["FK_StatusLog_Places"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1201,6 +1252,10 @@ namespace AppData { base.Tables.Add(this.tableSheetsPreview); this.tableOrderListTree = new OrderListTreeDataTable(); base.Tables.Add(this.tableOrderListTree); + this.tablePlaces = new PlacesDataTable(); + base.Tables.Add(this.tablePlaces); + this.tableStatusLog = new StatusLogDataTable(); + base.Tables.Add(this.tableStatusLog); this.relationFK_ItemList_Materials1 = new global::System.Data.DataRelation("FK_ItemList_Materials1", new global::System.Data.DataColumn[] { this.tableMaterials.MatIDColumn}, new global::System.Data.DataColumn[] { this.tableItemList.MatIDColumn}, false); @@ -1245,6 +1300,10 @@ namespace AppData { this.tableOrderList.OrdIDColumn}, new global::System.Data.DataColumn[] { this.tableOrder2FinalKit.OrdIDColumn}, false); this.Relations.Add(this.relationFK_Order2FinalKit_OrderList); + this.relationFK_StatusLog_Places = new global::System.Data.DataRelation("FK_StatusLog_Places", new global::System.Data.DataColumn[] { + this.tablePlaces.PlaceCodColumn}, new global::System.Data.DataColumn[] { + this.tableStatusLog.PlaceCodColumn}, false); + this.Relations.Add(this.relationFK_StatusLog_Places); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1475,6 +1534,18 @@ namespace AppData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializePlaces() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeStatusLog() { + return false; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { @@ -1644,6 +1715,12 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void OrderListTreeRowChangeEventHandler(object sender, OrderListTreeRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void PlacesRowChangeEventHandler(object sender, PlacesRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void StatusLogRowChangeEventHandler(object sender, StatusLogRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -17248,6 +17325,655 @@ namespace AppData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class PlacesDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnPlaceCod; + + private global::System.Data.DataColumn columnPlaceDesc; + + private global::System.Data.DataColumn columnPlaceCodAncest; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesDataTable() { + this.TableName = "Places"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal PlacesDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected PlacesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceCodColumn { + get { + return this.columnPlaceCod; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceDescColumn { + get { + return this.columnPlaceDesc; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceCodAncestColumn { + get { + return this.columnPlaceCodAncest; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow this[int index] { + get { + return ((PlacesRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event PlacesRowChangeEventHandler PlacesRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event PlacesRowChangeEventHandler PlacesRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event PlacesRowChangeEventHandler PlacesRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event PlacesRowChangeEventHandler PlacesRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddPlacesRow(PlacesRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow AddPlacesRow(string PlaceCod, string PlaceDesc, string PlaceCodAncest) { + PlacesRow rowPlacesRow = ((PlacesRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + PlaceCod, + PlaceDesc, + PlaceCodAncest}; + rowPlacesRow.ItemArray = columnValuesArray; + this.Rows.Add(rowPlacesRow); + return rowPlacesRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow FindByPlaceCod(string PlaceCod) { + return ((PlacesRow)(this.Rows.Find(new object[] { + PlaceCod}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + PlacesDataTable cln = ((PlacesDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new PlacesDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnPlaceCod = base.Columns["PlaceCod"]; + this.columnPlaceDesc = base.Columns["PlaceDesc"]; + this.columnPlaceCodAncest = base.Columns["PlaceCodAncest"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnPlaceCod = new global::System.Data.DataColumn("PlaceCod", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceCod); + this.columnPlaceDesc = new global::System.Data.DataColumn("PlaceDesc", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceDesc); + this.columnPlaceCodAncest = new global::System.Data.DataColumn("PlaceCodAncest", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceCodAncest); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnPlaceCod}, true)); + this.columnPlaceCod.AllowDBNull = false; + this.columnPlaceCod.Unique = true; + this.columnPlaceCod.MaxLength = 50; + this.columnPlaceDesc.AllowDBNull = false; + this.columnPlaceDesc.MaxLength = 500; + this.columnPlaceCodAncest.AllowDBNull = false; + this.columnPlaceCodAncest.MaxLength = 50; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow NewPlacesRow() { + return ((PlacesRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new PlacesRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(PlacesRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.PlacesRowChanged != null)) { + this.PlacesRowChanged(this, new PlacesRowChangeEvent(((PlacesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.PlacesRowChanging != null)) { + this.PlacesRowChanging(this, new PlacesRowChangeEvent(((PlacesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.PlacesRowDeleted != null)) { + this.PlacesRowDeleted(this, new PlacesRowChangeEvent(((PlacesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.PlacesRowDeleting != null)) { + this.PlacesRowDeleting(this, new PlacesRowChangeEvent(((PlacesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemovePlacesRow(PlacesRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_App ds = new DS_App(); + 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 = "PlacesDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class StatusLogDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnPlaceCod; + + private global::System.Data.DataColumn columnStatusID; + + private global::System.Data.DataColumn columnDtRecord; + + private global::System.Data.DataColumn columnCode; + + private global::System.Data.DataColumn columnStation; + + private global::System.Data.DataColumn columnPayload; + + private global::System.Data.DataColumn columnDuration; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogDataTable() { + this.TableName = "StatusLog"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal StatusLogDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected StatusLogDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceCodColumn { + get { + return this.columnPlaceCod; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn StatusIDColumn { + get { + return this.columnStatusID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DtRecordColumn { + get { + return this.columnDtRecord; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn CodeColumn { + get { + return this.columnCode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn StationColumn { + get { + return this.columnStation; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PayloadColumn { + get { + return this.columnPayload; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DurationColumn { + get { + return this.columnDuration; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow this[int index] { + get { + return ((StatusLogRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event StatusLogRowChangeEventHandler StatusLogRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event StatusLogRowChangeEventHandler StatusLogRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event StatusLogRowChangeEventHandler StatusLogRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event StatusLogRowChangeEventHandler StatusLogRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddStatusLogRow(StatusLogRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow AddStatusLogRow(PlacesRow parentPlacesRowByFK_StatusLog_Places, int StatusID, System.DateTime DtRecord, string Code, string Station, string Payload, decimal Duration) { + StatusLogRow rowStatusLogRow = ((StatusLogRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + StatusID, + DtRecord, + Code, + Station, + Payload, + Duration}; + if ((parentPlacesRowByFK_StatusLog_Places != null)) { + columnValuesArray[0] = parentPlacesRowByFK_StatusLog_Places[0]; + } + rowStatusLogRow.ItemArray = columnValuesArray; + this.Rows.Add(rowStatusLogRow); + return rowStatusLogRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow FindByPlaceCod(string PlaceCod) { + return ((StatusLogRow)(this.Rows.Find(new object[] { + PlaceCod}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + StatusLogDataTable cln = ((StatusLogDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new StatusLogDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnPlaceCod = base.Columns["PlaceCod"]; + this.columnStatusID = base.Columns["StatusID"]; + this.columnDtRecord = base.Columns["DtRecord"]; + this.columnCode = base.Columns["Code"]; + this.columnStation = base.Columns["Station"]; + this.columnPayload = base.Columns["Payload"]; + this.columnDuration = base.Columns["Duration"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnPlaceCod = new global::System.Data.DataColumn("PlaceCod", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceCod); + this.columnStatusID = new global::System.Data.DataColumn("StatusID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStatusID); + this.columnDtRecord = new global::System.Data.DataColumn("DtRecord", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDtRecord); + this.columnCode = new global::System.Data.DataColumn("Code", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCode); + this.columnStation = new global::System.Data.DataColumn("Station", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStation); + this.columnPayload = new global::System.Data.DataColumn("Payload", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPayload); + this.columnDuration = new global::System.Data.DataColumn("Duration", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDuration); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnPlaceCod}, true)); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint2", new global::System.Data.DataColumn[] { + this.columnStatusID}, false)); + this.columnPlaceCod.AllowDBNull = false; + this.columnPlaceCod.Unique = true; + this.columnPlaceCod.MaxLength = 50; + this.columnStatusID.AllowDBNull = false; + this.columnStatusID.Unique = true; + this.columnDtRecord.AllowDBNull = false; + this.columnCode.AllowDBNull = false; + this.columnCode.MaxLength = 50; + this.columnStation.AllowDBNull = false; + this.columnStation.MaxLength = 50; + this.columnPayload.AllowDBNull = false; + this.columnPayload.MaxLength = 250; + this.columnDuration.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow NewStatusLogRow() { + return ((StatusLogRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new StatusLogRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(StatusLogRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.StatusLogRowChanged != null)) { + this.StatusLogRowChanged(this, new StatusLogRowChangeEvent(((StatusLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.StatusLogRowChanging != null)) { + this.StatusLogRowChanging(this, new StatusLogRowChangeEvent(((StatusLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.StatusLogRowDeleted != null)) { + this.StatusLogRowDeleted(this, new StatusLogRowChangeEvent(((StatusLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.StatusLogRowDeleting != null)) { + this.StatusLogRowDeleting(this, new StatusLogRowChangeEvent(((StatusLogRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveStatusLogRow(StatusLogRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DS_App ds = new DS_App(); + 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 = "StatusLogDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + /// ///Represents strongly named DataRow class. /// @@ -24997,6 +25723,168 @@ namespace AppData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class PlacesRow : global::System.Data.DataRow { + + private PlacesDataTable tablePlaces; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal PlacesRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablePlaces = ((PlacesDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceCod { + get { + return ((string)(this[this.tablePlaces.PlaceCodColumn])); + } + set { + this[this.tablePlaces.PlaceCodColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceDesc { + get { + return ((string)(this[this.tablePlaces.PlaceDescColumn])); + } + set { + this[this.tablePlaces.PlaceDescColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceCodAncest { + get { + return ((string)(this[this.tablePlaces.PlaceCodAncestColumn])); + } + set { + this[this.tablePlaces.PlaceCodAncestColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow[] GetStatusLogRows() { + if ((this.Table.ChildRelations["FK_StatusLog_Places"] == null)) { + return new StatusLogRow[0]; + } + else { + return ((StatusLogRow[])(base.GetChildRows(this.Table.ChildRelations["FK_StatusLog_Places"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class StatusLogRow : global::System.Data.DataRow { + + private StatusLogDataTable tableStatusLog; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal StatusLogRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableStatusLog = ((StatusLogDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceCod { + get { + return ((string)(this[this.tableStatusLog.PlaceCodColumn])); + } + set { + this[this.tableStatusLog.PlaceCodColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int StatusID { + get { + return ((int)(this[this.tableStatusLog.StatusIDColumn])); + } + set { + this[this.tableStatusLog.StatusIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DtRecord { + get { + return ((global::System.DateTime)(this[this.tableStatusLog.DtRecordColumn])); + } + set { + this[this.tableStatusLog.DtRecordColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Code { + get { + return ((string)(this[this.tableStatusLog.CodeColumn])); + } + set { + this[this.tableStatusLog.CodeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Station { + get { + return ((string)(this[this.tableStatusLog.StationColumn])); + } + set { + this[this.tableStatusLog.StationColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Payload { + get { + return ((string)(this[this.tableStatusLog.PayloadColumn])); + } + set { + this[this.tableStatusLog.PayloadColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal Duration { + get { + return ((decimal)(this[this.tableStatusLog.DurationColumn])); + } + set { + this[this.tableStatusLog.DurationColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow PlacesRow { + get { + return ((PlacesRow)(this.GetParentRow(this.Table.ParentRelations["FK_StatusLog_Places"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_StatusLog_Places"]); + } + } + } + /// ///Row event argument class /// @@ -26288,6 +27176,74 @@ namespace AppData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class PlacesRowChangeEvent : global::System.EventArgs { + + private PlacesRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRowChangeEvent(PlacesRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class StatusLogRowChangeEvent : global::System.EventArgs { + + private StatusLogRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRowChangeEvent(StatusLogRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } } } namespace AppData.DS_AppTableAdapters { @@ -39668,6 +40624,527 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE } } + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class PlacesTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public PlacesTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Places"; + tableMapping.ColumnMappings.Add("PlaceCod", "PlaceCod"); + tableMapping.ColumnMappings.Add("PlaceDesc", "PlaceDesc"); + tableMapping.ColumnMappings.Add("PlaceCodAncest", "PlaceCodAncest"); + 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 [PLACES] WHERE (([PlaceCod] = @Original_PlaceCod))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", 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 [PLACES] ([PlaceCod], [PlaceDesc], [PlaceCodAncest]) VALUES (@PlaceCo" + + "d, @PlaceDesc, @PlaceCodAncest);\r\nSELECT PlaceCod, PlaceDesc, PlaceCodAncest FRO" + + "M Places WHERE (PlaceCod = @PlaceCod)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceDesc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceDesc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCodAncest", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCodAncest", 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 [PLACES] SET [PlaceCod] = @PlaceCod, [PlaceDesc] = @PlaceDesc, [PlaceCodAn" + + "cest] = @PlaceCodAncest WHERE (([PlaceCod] = @Original_PlaceCod));\r\nSELECT Place" + + "Cod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceCod)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceDesc", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceDesc", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCodAncest", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCodAncest", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::AppData.Properties.Settings.Default.Sauder_NKCConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT * FROM PLACES"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_PLAC_insert"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_App.PlacesDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_App.PlacesDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_App.PlacesDataTable dataTable = new DS_App.PlacesDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.PlacesDataTable insertQuery(string PlaceCod) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((PlaceCod == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(PlaceCod)); + } + DS_App.PlacesDataTable dataTable = new DS_App.PlacesDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_App.PlacesDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DS_App dataSet) { + return this.Adapter.Update(dataSet, "Places"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class StatusLogTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public StatusLogTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "StatusLog"; + tableMapping.ColumnMappings.Add("PlaceCod", "PlaceCod"); + tableMapping.ColumnMappings.Add("StatusID", "StatusID"); + tableMapping.ColumnMappings.Add("DtRecord", "DtRecord"); + tableMapping.ColumnMappings.Add("Code", "Code"); + tableMapping.ColumnMappings.Add("Station", "Station"); + tableMapping.ColumnMappings.Add("Payload", "Payload"); + tableMapping.ColumnMappings.Add("Duration", "Duration"); + this._adapter.TableMappings.Add(tableMapping); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::AppData.Properties.Settings.Default.Sauder_NKCConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "select * from StatusLog\r\n"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_STALOG_insert"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRecord", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Station", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Code", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Payload", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Duration", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_STALOG_updateDuration"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DS_App.StatusLogDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DS_App.StatusLogDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DS_App.StatusLogDataTable dataTable = new DS_App.StatusLogDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insert(global::System.Nullable DtRecord, string PlaceCod, string Station, string Code, string Payload, global::System.Nullable Duration) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((DtRecord.HasValue == true)) { + command.Parameters[1].Value = ((System.DateTime)(DtRecord.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((PlaceCod == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(PlaceCod)); + } + if ((Station == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(Station)); + } + if ((Code == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(Code)); + } + if ((Payload == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Payload)); + } + if ((Duration.HasValue == true)) { + command.Parameters[6].Value = ((decimal)(Duration.Value)); + } + else { + command.Parameters[6].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int updateDuration(string PlaceCod) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((PlaceCod == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(PlaceCod)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -39706,6 +41183,8 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE private FileValidationTableAdapter _fileValidationTableAdapter; + private PlacesTableAdapter _placesTableAdapter; + private bool _backupDataSetBeforeUpdate; private global::System.Data.IDbConnection _connection; @@ -39903,6 +41382,20 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public PlacesTableAdapter PlacesTableAdapter { + get { + return this._placesTableAdapter; + } + set { + this._placesTableAdapter = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool BackupDataSetBeforeUpdate { @@ -39974,6 +41467,10 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE && (this._fileValidationTableAdapter.Connection != null))) { return this._fileValidationTableAdapter.Connection; } + if (((this._placesTableAdapter != null) + && (this._placesTableAdapter.Connection != null))) { + return this._placesTableAdapter.Connection; + } return null; } set { @@ -40026,6 +41523,9 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE if ((this._fileValidationTableAdapter != null)) { count = (count + 1); } + if ((this._placesTableAdapter != null)) { + count = (count + 1); + } return count; } } @@ -40037,15 +41537,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateUpdatedRows(DS_App dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._kitListTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.KitList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._kitListTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._materialsTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -40055,6 +41546,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } + if ((this._kitListTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.KitList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._kitListTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._itemListTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ItemList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -40064,6 +41564,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } + if ((this._placesTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Places.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._placesTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -40082,15 +41591,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } - if ((this._itemValidationTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._remnantsTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -40100,6 +41600,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(updatedRows); } } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } if ((this._errorsLogTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.ErrorsLog.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -40164,14 +41673,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private int UpdateInsertedRows(DS_App dataSet, global::System.Collections.Generic.List allAddedRows) { int result = 0; - if ((this._kitListTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.KitList.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._kitListTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._materialsTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40180,6 +41681,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } + if ((this._kitListTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.KitList.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._kitListTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._itemListTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ItemList.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40188,6 +41697,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } + if ((this._placesTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Places.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._placesTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40204,14 +41721,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } - if ((this._itemValidationTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._remnantsTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40220,6 +41729,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allAddedRows.AddRange(addedRows); } } + if ((this._itemValidationTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } if ((this._errorsLogTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.ErrorsLog.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -40326,14 +41843,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } - if ((this._remnantsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._remnantsTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._itemValidationTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ItemValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -40342,6 +41851,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } + if ((this._remnantsTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Remnants.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._remnantsTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._fileValidationTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.FileValidation.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -40358,6 +41875,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } + if ((this._placesTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Places.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._placesTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._itemListTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.ItemList.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -40366,14 +41891,6 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } - if ((this._materialsTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._materialsTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._kitListTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.KitList.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -40382,6 +41899,14 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE allChangedRows.AddRange(deletedRows); } } + if ((this._materialsTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Materials.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._materialsTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } return result; } @@ -40486,6 +42011,11 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } + if (((this._placesTableAdapter != null) + && (this.MatchTableAdapterConnection(this._placesTableAdapter.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" + @@ -40635,6 +42165,15 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE adaptersWithAcceptChangesDuringUpdate.Add(this._fileValidationTableAdapter.Adapter); } } + if ((this._placesTableAdapter != null)) { + revertConnections.Add(this._placesTableAdapter, this._placesTableAdapter.Connection); + this._placesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._placesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._placesTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._placesTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._placesTableAdapter.Adapter); + } + } // //---- Perform updates ----------- // @@ -40745,6 +42284,10 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE this._fileValidationTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._fileValidationTableAdapter])); this._fileValidationTableAdapter.Transaction = null; } + if ((this._placesTableAdapter != null)) { + this._placesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._placesTableAdapter])); + this._placesTableAdapter.Transaction = null; + } if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 15dccc4..fe75b41 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -3369,6 +3369,118 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + DELETE FROM [PLACES] WHERE (([PlaceCod] = @Original_PlaceCod)) + + + + + + + + INSERT INTO [PLACES] ([PlaceCod], [PlaceDesc], [PlaceCodAncest]) VALUES (@PlaceCod, @PlaceDesc, @PlaceCodAncest); +SELECT PlaceCod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceCod) + + + + + + + + + + SELECT * FROM PLACES + + + + + + UPDATE [PLACES] SET [PlaceCod] = @PlaceCod, [PlaceDesc] = @PlaceDesc, [PlaceCodAncest] = @PlaceCodAncest WHERE (([PlaceCod] = @Original_PlaceCod)); +SELECT PlaceCod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceCod) + + + + + + + + + + + + + + + + + + + + dbo.stp_PLAC_insert + + + + + + + + + + + + + + + select * from StatusLog + + + + + + + + + + + + + + + + + + + + dbo.stp_STALOG_insert + + + + + + + + + + + + + + + + dbo.stp_STALOG_updateDuration + + + + + + + + + @@ -4802,6 +4914,70 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4948,6 +5124,18 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + + + + + + + + + + + + @@ -4962,6 +5150,7 @@ SELECT ItemExtCode, BatchID, EvalDate, EstimTime, Status FROM FileValidation WHE + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 05a7ed4..c00aaea 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,49 +4,51 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 1189 @@ -58,7 +60,7 @@ - + 1028 @@ -70,7 +72,7 @@ - + 828 @@ -82,7 +84,7 @@ - + 1116 @@ -98,7 +100,7 @@ - + 721 @@ -110,7 +112,7 @@ - + 482 @@ -122,7 +124,7 @@ - + 1113 @@ -134,7 +136,7 @@ - + 1364 @@ -146,7 +148,7 @@ - + 1153 @@ -158,7 +160,7 @@ - + 115 @@ -170,7 +172,7 @@ - + 284 @@ -182,5 +184,17 @@ + + + + 1034 + 2236 + + + 1112 + 2236 + + + \ No newline at end of file diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index 134334b..33f1297 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -37,6 +37,7 @@ namespace AppData public DS_AppTableAdapters.OtherItemTableAdapter taOtItem; public DS_ReportTableAdapters.PrintJobQueueTableAdapter taPJQ; public DS_AppTableAdapters.PackListTableAdapter taPL; + public DS_AppTableAdapters.PlacesTableAdapter taPlac; public DS_AppTableAdapters.PackCheckTableAdapter taPLC; public DS_AppTableAdapters.PackListDetTableAdapter taPLD; public DS_AppTableAdapters.PackLogTableAdapter taPLog; @@ -52,6 +53,7 @@ namespace AppData public DS_ReportTableAdapters.stp_prt_PartTableAdapter taRepPart; public DS_AppTableAdapters.SheetListTableAdapter taSHL; public DS_AppTableAdapters.SheetsPreviewTableAdapter taSP; + public DS_AppTableAdapters.StatusLogTableAdapter taStatLog; public DS_AppTableAdapters.StackListTableAdapter taSTL; public DS_AppTableAdapters.UnloadStatsTableAdapter taUS; @@ -179,11 +181,13 @@ namespace AppData taOLT = new DS_AppTableAdapters.OrderListTreeTableAdapter(); taOtItem = new DS_AppTableAdapters.OtherItemTableAdapter(); taPL = new DS_AppTableAdapters.PackListTableAdapter(); + taPlac = new DS_AppTableAdapters.PlacesTableAdapter(); taPLC = new DS_AppTableAdapters.PackCheckTableAdapter(); taPLD = new DS_AppTableAdapters.PackListDetTableAdapter(); taPLog = new DS_AppTableAdapters.PackLogTableAdapter(); taPVP = new DS_AppTableAdapters.PartValidParetoTableAdapter(); taRem = new DS_AppTableAdapters.RemnantsTableAdapter(); + taStatLog = new DS_AppTableAdapters.StatusLogTableAdapter(); taSTL = new DS_AppTableAdapters.StackListTableAdapter(); taSHL = new DS_AppTableAdapters.SheetListTableAdapter(); taSP = new DS_AppTableAdapters.SheetsPreviewTableAdapter(); @@ -229,11 +233,13 @@ namespace AppData taOLT.Connection.ConnectionString = connString; taOtItem.Connection.ConnectionString = connString; taPL.Connection.ConnectionString = connString; + taPlac.Connection.ConnectionString = connString; taPLC.Connection.ConnectionString = connString; taPLD.Connection.ConnectionString = connString; taPLog.Connection.ConnectionString = connString; taPVP.Connection.ConnectionString = connString; taRem.Connection.ConnectionString = connString; + taStatLog.Connection.ConnectionString = connString; taSTL.Connection.ConnectionString = connString; taSHL.Connection.ConnectionString = connString; taSP.Connection.ConnectionString = connString; From c1f5ce18eda4de015b0a0875fe84dcdf0386ddd1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 1 Jul 2021 15:35:15 +0200 Subject: [PATCH 2/2] update simulatore x status macchine --- NKC_WF/WebUserControls/cmp_MachSem.ascx | 30 +++++++++++++++---- NKC_WF/WebUserControls/cmp_MachSem.ascx.cs | 27 +++++++++-------- .../cmp_MachSem.ascx.designer.cs | 27 +++++++++++++++++ 3 files changed, 66 insertions(+), 18 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_MachSem.ascx b/NKC_WF/WebUserControls/cmp_MachSem.ascx index be2a682..5cce675 100644 --- a/NKC_WF/WebUserControls/cmp_MachSem.ascx +++ b/NKC_WF/WebUserControls/cmp_MachSem.ascx @@ -2,9 +2,12 @@ - - - + + + + + +
@@ -23,9 +26,24 @@
-
 <%: traduci("print") %>
-
 <%: traduci("CNC") %>
-
 <%: traduci("unload") %>
+
+  <%: traduci("print") %> | <%: hfStat01.Value %> +
+ <%: traduci($"print_state_{hfStat01.Value}") %> +
+
+
+  <%: traduci("CNC") %> | <%: hfStat02.Value %> +
+ <%: traduci($"CNC_state_{hfStat02.Value}") %> +
+
+
+  <%: traduci("unload") %> | <%: hfStat03.Value %> +
+ <%: traduci($"unload_state_{hfStat03.Value}") %> +
+
diff --git a/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs b/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs index c562658..85e6a8a 100644 --- a/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MachSem.ascx.cs @@ -101,28 +101,31 @@ namespace NKC_WF.WebUserControls // FIXME TODO: fake.... DateTime adesso = DateTime.Now; int numsec = adesso.Second; - hfStat01.Value = "success"; - hfStat02.Value = "warning"; - hfStat03.Value = "danger"; + hfCss01.Value = "success"; + hfCss02.Value = "warning"; + hfCss03.Value = "danger"; + hfStat01.Value = $"{adesso.Second - 1 % 10:00}"; + hfStat02.Value = $"{adesso.Second + 3 % 10:00}"; + hfStat03.Value = $"{adesso.Second + 1 % 10:00}"; switch (numsec % 3) { case 1: - hfStat01.Value = "warning"; - hfStat02.Value = "danger"; - hfStat03.Value = "success"; + hfCss01.Value = "warning"; + hfCss02.Value = "danger"; + hfCss03.Value = "success"; break; case 2: - hfStat01.Value = "danger"; - hfStat02.Value = "success"; - hfStat03.Value = "warning"; + hfCss01.Value = "danger"; + hfCss02.Value = "success"; + hfCss03.Value = "warning"; break; case 0: default: - hfStat01.Value = "success"; - hfStat02.Value = "warning"; - hfStat03.Value = "danger"; + hfCss01.Value = "success"; + hfCss02.Value = "warning"; + hfCss03.Value = "danger"; break; } } diff --git a/NKC_WF/WebUserControls/cmp_MachSem.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MachSem.ascx.designer.cs index 9f20390..0abc71d 100644 --- a/NKC_WF/WebUserControls/cmp_MachSem.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MachSem.ascx.designer.cs @@ -59,6 +59,33 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfStat03; + /// + /// hfCss01 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCss01; + + /// + /// hfCss02 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCss02; + + /// + /// hfCss03 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfCss03; + /// /// divSelect control. ///