From da63b299a3d17f964867974205b2519958264229 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 12:54:40 +0100 Subject: [PATCH 1/4] Bozza componente statistiche --- AppData/AppData.csproj | 1 + AppData/DS_App.Designer.cs | 781 +++++++++++++++++- AppData/DS_App.xsd | 41 + AppData/DS_App.xss | 69 +- AppData/Objects.cs | 34 + NKC_SDK/Objects.cs | 2 +- NKC_WF/NKC_WF.csproj | 8 + NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 25 + .../WebUserControls/cmp_MU_singleStat.ascx.cs | 69 ++ .../cmp_MU_singleStat.ascx.designer.cs | 89 ++ NKC_WF/WebUserControls/cmp_MU_stats.ascx | 20 +- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 74 +- .../cmp_MU_stats.ascx.designer.cs | 18 + NKC_WF/site/MachineUnload.aspx.cs | 1 + 14 files changed, 1163 insertions(+), 69 deletions(-) create mode 100644 AppData/Objects.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index ebec613..30e2562 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -175,6 +175,7 @@ True DS_Report.xsd + True True diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 1f704aa..99b0f95 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -66,6 +66,8 @@ namespace AppData { private PartValidParetoDataTable tablePartValidPareto; + private UnloadStatsDataTable tableUnloadStats; + private global::System.Data.DataRelation relationFK_BatchReqList_OrderList; private global::System.Data.DataRelation relationFK_ItemList_Materials1; @@ -181,6 +183,9 @@ namespace AppData { if ((ds.Tables["PartValidPareto"] != null)) { base.Tables.Add(new PartValidParetoDataTable(ds.Tables["PartValidPareto"])); } + if ((ds.Tables["UnloadStats"] != null)) { + base.Tables.Add(new UnloadStatsDataTable(ds.Tables["UnloadStats"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -409,6 +414,16 @@ 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 UnloadStatsDataTable UnloadStats { + get { + return this.tableUnloadStats; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.BrowsableAttribute(true)] @@ -539,6 +554,9 @@ namespace AppData { if ((ds.Tables["PartValidPareto"] != null)) { base.Tables.Add(new PartValidParetoDataTable(ds.Tables["PartValidPareto"])); } + if ((ds.Tables["UnloadStats"] != null)) { + base.Tables.Add(new UnloadStatsDataTable(ds.Tables["UnloadStats"])); + } this.DataSetName = ds.DataSetName; this.Prefix = ds.Prefix; this.Namespace = ds.Namespace; @@ -698,6 +716,12 @@ namespace AppData { this.tablePartValidPareto.InitVars(); } } + this.tableUnloadStats = ((UnloadStatsDataTable)(base.Tables["UnloadStats"])); + if ((initTable == true)) { + if ((this.tableUnloadStats != null)) { + this.tableUnloadStats.InitVars(); + } + } this.relationFK_BatchReqList_OrderList = this.Relations["FK_BatchReqList_OrderList"]; this.relationFK_ItemList_Materials1 = this.Relations["FK_ItemList_Materials1"]; this.relationFK_OffOrd2Item_OfflineOrderList = this.Relations["FK_OffOrd2Item_OfflineOrderList"]; @@ -762,6 +786,8 @@ namespace AppData { base.Tables.Add(this.tableItemValidation); this.tablePartValidPareto = new PartValidParetoDataTable(); base.Tables.Add(this.tablePartValidPareto); + this.tableUnloadStats = new UnloadStatsDataTable(); + base.Tables.Add(this.tableUnloadStats); this.relationFK_BatchReqList_OrderList = new global::System.Data.DataRelation("FK_BatchReqList_OrderList", new global::System.Data.DataColumn[] { this.tableOrderList.OrdIDColumn}, new global::System.Data.DataColumn[] { this.tableBatchReqList.OrdIDColumn}, false); @@ -938,6 +964,12 @@ namespace AppData { return false; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeUnloadStats() { + 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) { @@ -1056,6 +1088,9 @@ namespace AppData { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public delegate void PartValidParetoRowChangeEventHandler(object sender, PartValidParetoRowChangeEvent e); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void UnloadStatsRowChangeEventHandler(object sender, UnloadStatsRowChangeEvent e); + /// ///Represents the strongly named DataTable class. /// @@ -8636,6 +8671,315 @@ namespace AppData { } } + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class UnloadStatsDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnStat; + + private global::System.Data.DataColumn columnTotal; + + private global::System.Data.DataColumn columnWait; + + private global::System.Data.DataColumn columnWip; + + private global::System.Data.DataColumn columnDone; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsDataTable() { + this.TableName = "UnloadStats"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal UnloadStatsDataTable(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 UnloadStatsDataTable(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 StatColumn { + get { + return this.columnStat; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn TotalColumn { + get { + return this.columnTotal; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn WaitColumn { + get { + return this.columnWait; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn WipColumn { + get { + return this.columnWip; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DoneColumn { + get { + return this.columnDone; + } + } + + [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 UnloadStatsRow this[int index] { + get { + return ((UnloadStatsRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event UnloadStatsRowChangeEventHandler UnloadStatsRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddUnloadStatsRow(UnloadStatsRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow AddUnloadStatsRow(string Stat, int Total, int Wait, int Wip, int Done) { + UnloadStatsRow rowUnloadStatsRow = ((UnloadStatsRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Stat, + Total, + Wait, + Wip, + Done}; + rowUnloadStatsRow.ItemArray = columnValuesArray; + this.Rows.Add(rowUnloadStatsRow); + return rowUnloadStatsRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + UnloadStatsDataTable cln = ((UnloadStatsDataTable)(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 UnloadStatsDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnStat = base.Columns["Stat"]; + this.columnTotal = base.Columns["Total"]; + this.columnWait = base.Columns["Wait"]; + this.columnWip = base.Columns["Wip"]; + this.columnDone = base.Columns["Done"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnStat = new global::System.Data.DataColumn("Stat", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStat); + this.columnTotal = new global::System.Data.DataColumn("Total", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTotal); + this.columnWait = new global::System.Data.DataColumn("Wait", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWait); + this.columnWip = new global::System.Data.DataColumn("Wip", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWip); + this.columnDone = new global::System.Data.DataColumn("Done", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDone); + this.columnStat.ReadOnly = true; + this.columnStat.MaxLength = 50; + this.columnTotal.ReadOnly = true; + this.columnWait.ReadOnly = true; + this.columnWip.ReadOnly = true; + this.columnDone.ReadOnly = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UnloadStatsRow NewUnloadStatsRow() { + return ((UnloadStatsRow)(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 UnloadStatsRow(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(UnloadStatsRow); + } + + [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.UnloadStatsRowChanged != null)) { + this.UnloadStatsRowChanged(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(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.UnloadStatsRowChanging != null)) { + this.UnloadStatsRowChanging(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(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.UnloadStatsRowDeleted != null)) { + this.UnloadStatsRowDeleted(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(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.UnloadStatsRowDeleting != null)) { + this.UnloadStatsRowDeleting(this, new UnloadStatsRowChangeEvent(((UnloadStatsRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveUnloadStatsRow(UnloadStatsRow 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 = "UnloadStatsDataTable"; + 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. /// @@ -11798,6 +12142,161 @@ namespace AppData { } } + /// + ///Represents strongly named DataRow class. + /// + public partial class UnloadStatsRow : global::System.Data.DataRow { + + private UnloadStatsDataTable tableUnloadStats; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal UnloadStatsRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableUnloadStats = ((UnloadStatsDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Stat { + get { + try { + return ((string)(this[this.tableUnloadStats.StatColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Stat\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.StatColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Total { + get { + try { + return ((int)(this[this.tableUnloadStats.TotalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Total\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.TotalColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Wait { + get { + try { + return ((int)(this[this.tableUnloadStats.WaitColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Wait\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.WaitColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Wip { + get { + try { + return ((int)(this[this.tableUnloadStats.WipColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Wip\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.WipColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Done { + get { + try { + return ((int)(this[this.tableUnloadStats.DoneColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'Done\' nella tabella \'UnloadStats\' è DBNull.", e); + } + } + set { + this[this.tableUnloadStats.DoneColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsStatNull() { + return this.IsNull(this.tableUnloadStats.StatColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetStatNull() { + this[this.tableUnloadStats.StatColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsTotalNull() { + return this.IsNull(this.tableUnloadStats.TotalColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetTotalNull() { + this[this.tableUnloadStats.TotalColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsWaitNull() { + return this.IsNull(this.tableUnloadStats.WaitColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetWaitNull() { + this[this.tableUnloadStats.WaitColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsWipNull() { + return this.IsNull(this.tableUnloadStats.WipColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetWipNull() { + this[this.tableUnloadStats.WipColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDoneNull() { + return this.IsNull(this.tableUnloadStats.DoneColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDoneNull() { + this[this.tableUnloadStats.DoneColumn] = global::System.Convert.DBNull; + } + } + /// ///Row event argument class /// @@ -12511,6 +13010,40 @@ namespace AppData { } } } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class UnloadStatsRowChangeEvent : global::System.EventArgs { + + private UnloadStatsRow 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 UnloadStatsRowChangeEvent(UnloadStatsRow 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 UnloadStatsRow 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 { @@ -20795,6 +21328,204 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt } } + /// + ///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 UnloadStatsTableAdapter : 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 UnloadStatsTableAdapter() { + 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 = "UnloadStats"; + tableMapping.ColumnMappings.Add("Stat", "Stat"); + tableMapping.ColumnMappings.Add("Total", "Total"); + tableMapping.ColumnMappings.Add("Wait", "Wait"); + tableMapping.ColumnMappings.Add("Wip", "Wip"); + tableMapping.ColumnMappings.Add("Done", "Done"); + 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[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "dbo.stp_Unload_Stat"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[0].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[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatLevel", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [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.UnloadStatsDataTable dataTable, global::System.Nullable BatchID, global::System.Nullable StatLevel) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatLevel.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(StatLevel.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + 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.UnloadStatsDataTable GetData(global::System.Nullable BatchID, global::System.Nullable StatLevel) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((StatLevel.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[2].Value = ((int)(StatLevel.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + DS_App.UnloadStatsDataTable dataTable = new DS_App.UnloadStatsDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + } + /// ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios /// @@ -21209,6 +21940,15 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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); @@ -21263,15 +22003,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -21331,6 +22062,14 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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) @@ -21379,14 +22118,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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._batchReqListTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.BatchReqList.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -21413,14 +22144,6 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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) - && (0 < deletedRows.Length))) { - result = (result + this._itemValidationTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._nestingTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.Nesting.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -21469,6 +22192,14 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt 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) + && (0 < deletedRows.Length))) { + result = (result + this._itemValidationTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } if ((this._finalKitTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.FinalKit.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 561e1b2..b8ef9bc 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -1958,6 +1958,30 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt + + + + + + dbo.stp_Unload_Stat + + + + + + + + + + + + + + + + + + @@ -2530,6 +2554,23 @@ SELECT ItemExtCode, BatchID, EvalDate, Status FROM ItemValidation WHERE (ItemExt + + + + + + + + + + + + + + + + + diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 5d7953c..ca3ee57 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,32 +4,33 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + 352 @@ -41,7 +42,7 @@ - + 1197 @@ -53,7 +54,7 @@ - + 1140 @@ -65,7 +66,7 @@ - + 788 @@ -77,7 +78,7 @@ - + 986 @@ -89,7 +90,7 @@ - + 699 @@ -101,7 +102,7 @@ - + 550 @@ -113,7 +114,7 @@ - + 1129 @@ -125,7 +126,7 @@ - + 1359 @@ -137,7 +138,7 @@ - + 1161 @@ -149,7 +150,7 @@ - + 131 @@ -161,7 +162,7 @@ - + 352 diff --git a/AppData/Objects.cs b/AppData/Objects.cs new file mode 100644 index 0000000..ee94b26 --- /dev/null +++ b/AppData/Objects.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AppData +{ + + /// + /// Struttura delel statistiche mostrate + /// + public class stats + { + /// + /// Variabili (red / yellow / green) + /// + public List vars { get; set; } + } + /// + /// Oggetto variabile da mostrare + /// + public class varData + { + /// + /// Nome variabile + /// + public string name { get; set; } = "A"; + /// + /// Valore variabile + /// + public string value { get; set; } = "0"; + } +} diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index dc14518..5e45e7f 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -341,7 +341,7 @@ namespace NKC_SDK public class NestBin { /// - /// Indice del BIN nel TAKC / giorno + /// Indice del BIN nel TAKT / giorno /// public int BinIndex { get; set; } = 0; /// diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 634b45d..cb5bdeb 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -300,6 +300,7 @@ + @@ -764,6 +765,13 @@ cmp_MU_carts.ascx + + cmp_MU_singleStat.ascx + ASPXCodeBehind + + + cmp_MU_singleStat.ascx + cmp_MU_stats.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx new file mode 100644 index 0000000..061a894 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -0,0 +1,25 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> + + + +
+
+
+ + + + + + + + + + + + + + + +
+
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs new file mode 100644 index 0000000..13ac731 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -0,0 +1,69 @@ +using AppData; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_MU_singleStat : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + } + /// + /// Css titolo + /// + public string titleCss = "bg-dark text-light"; + /// + /// Css titolo + /// + public string title = "NONE"; + + /// + /// Valirizzazione variabili + /// + public void doUpdate() + { + h5Title.Attributes.Remove("class"); + h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); + lblTitle.Text = title; + // titoli + try + { + lblTitRed.Text = currStat.vars[0].name; + lblTitYel.Text = currStat.vars[1].name; + lblTitGre.Text = currStat.vars[2].name; + // valori + lblValRed.Text = currStat.vars[0].value; + lblValYel.Text = currStat.vars[1].value; + lblValGre.Text = currStat.vars[2].value; + } + catch + { } + } + + /// + /// Statistiche salvate (locali) + /// + protected stats _currStat { get; set; } + /// + /// Statistiche da mostrare + /// + public stats currStat + { + get + { + return _currStat; + } + set + { + _currStat = value; + doUpdate(); + } + } + + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs new file mode 100644 index 0000000..bd7e474 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_MU_singleStat + { + + /// + /// Controllo h5Title. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl h5Title; + + /// + /// Controllo lblTitle. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblTitle; + + /// + /// Controllo lblTitRed. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblTitRed; + + /// + /// Controllo lblTitYel. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblTitYel; + + /// + /// Controllo lblTitGre. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblTitGre; + + /// + /// Controllo lblValRed. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblValRed; + + /// + /// Controllo lblValYel. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblValYel; + + /// + /// Controllo lblValGre. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblValGre; + } +} diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index 4ece5a3..4b87d99 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -1,6 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_stats.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_stats" %> +<%@ Register Src="~/WebUserControls/cmp_MU_singleStat.ascx" TagPrefix="uc1" TagName="cmp_MU_singleStat" %> + +
@@ -27,7 +30,7 @@
-
SHEET SH00000123
+
SHIFT B20190916.0
@@ -39,9 +42,9 @@ - - - + + +
52520%2540%
@@ -51,6 +54,7 @@
+
BUNK ST00000A2
@@ -77,7 +81,7 @@
-
SHIFT B20190916.0
+
SHEET SH00000123
@@ -89,9 +93,9 @@ - - - + + +
2540%52520%
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index c6cf7bf..1dee58b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -1,4 +1,5 @@ -using System; +using AppData; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -9,9 +10,80 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_stats : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } protected void Page_Load(object sender, EventArgs e) { } + public void doUpdate() + { + // leggo stats e compongo + List variabili = new List(); + variabili.Add(new varData { name = "WAIT", value = "2" }); + variabili.Add(new varData { name = "WIP", value = "1" }); + variabili.Add(new varData { name = "DONE", value = "3" }); + stats bunkStsat = new stats + { + vars = variabili + }; + + cmp_MU_singleStatBunk.title = "BUNK"; + cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + cmp_MU_singleStatBunk.currStat = bunkStsat; + } + /// + /// Calcola il rapporto tra 2 valori + /// + /// + /// + /// + public double getRatio(object _dividendo, object _divisore) + { + double ratio = 0; + double dividendo = 0; + double divisore = 1; + double.TryParse(_dividendo.ToString(), out dividendo); + double.TryParse(_divisore.ToString(), out divisore); + ratio = dividendo / divisore; + return ratio; + } + /// + /// determina CSS x colore testo da perc svuotamento... + /// + /// + /// + public string getCssByRatio(double ratio) + { + string answ = "text-dark"; + if (ratio == 0) + { + answ = "text-danger"; + } + else if (ratio == 1) + { + answ = "text-success"; + } + else + { + answ = "text-warning"; + } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs index 93aede4..2763d2c 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs @@ -13,5 +13,23 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_stats { + + /// + /// Controllo hfBatchID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + + /// + /// Controllo cmp_MU_singleStatBunk. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBunk; } } diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs index 786cdfc..28dcce0 100644 --- a/NKC_WF/site/MachineUnload.aspx.cs +++ b/NKC_WF/site/MachineUnload.aspx.cs @@ -36,6 +36,7 @@ namespace NKC_WF //!!!FIXME!!! fare calcolo del VERO batch corrente... BatchId = 242; // fixed x test! // aggiorno child + cmp_MU_stats.BatchId = BatchId; cmp_MU_svgViewer.BatchId = BatchId; cmp_MU_bins.BatchId = BatchId; cmp_MU_carts.BatchId = BatchId; From 221f7034493c1373b1c11219863b501843b46fc6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 16:53:14 +0100 Subject: [PATCH 2/4] Update pagina stats (in corso..) --- AppData/AppData.csproj | 1 + AppData/Enum.cs | 17 +++++ NKC_WF/Controllers/getMUCssController.cs | 15 +++-- NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 63 ++++++++++++++++--- .../WebUserControls/cmp_MU_singleStat.ascx.cs | 39 +++++++++++- .../cmp_MU_singleStat.ascx.designer.cs | 36 +++++++++++ NKC_WF/WebUserControls/cmp_MU_stats.ascx | 4 +- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 7 ++- 8 files changed, 165 insertions(+), 17 deletions(-) create mode 100644 AppData/Enum.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index 30e2562..5acafb5 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -175,6 +175,7 @@ True DS_Report.xsd + True diff --git a/AppData/Enum.cs b/AppData/Enum.cs new file mode 100644 index 0000000..b2b5b7c --- /dev/null +++ b/AppData/Enum.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AppData +{ + public enum StatType + { + BATCH =1, + BUNK, + SHEET, + CART, + BIN + } +} diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index d61b077..84dd481 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -32,10 +32,17 @@ namespace NKC_WF.Controllers // imposto sfondo ... answ = answ.Replace("#BLK-BCK", "#Sheet"); // ...e primi 3 items... - answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); - answ = answ.Replace("#BLK-SEL", "#IT000003"); - answ = answ.Replace("#BLK-BIN", "#IT000001"); - answ = answ.Replace("#BLK-CART", "#IT000002"); + answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE, #IT000085AF"); + answ = answ.Replace("#BLK-SEL", "#IT000085C2"); + answ = answ.Replace("#BLK-BIN", "#IT000085BE"); + answ = answ.Replace("#BLK-CART", "#IT000085AB"); + + + + //answ = answ.Replace("#BLK-CUT", "#IT000006, #IT000007, #IT000008"); + //answ = answ.Replace("#BLK-SEL", "#IT000003"); + //answ = answ.Replace("#BLK-BIN", "#IT000001"); + //answ = answ.Replace("#BLK-CART", "#IT000002"); // salvo redis! memLayer.ML.setRSV(redKey, answ); diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx index 061a894..f067822 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -1,25 +1,70 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> - -
-
+
+
- - - + + + - - - + + +
+ + +
+ + +
+ + + +
+
+
+
+ + + + + + + + + + + + + + + +
WAITWIPDONE
+ + +
+
+
+
+
+ + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs index 13ac731..463c1e0 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -10,6 +10,41 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_singleStat : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + /// + /// Tipo statistica richiesta + /// + public int statLevel + { + set + { + hfStatLevel.Value = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(hfStatLevel.Value, out answ); + return answ; + } + + } + protected void Page_Load(object sender, EventArgs e) { } @@ -30,6 +65,7 @@ namespace NKC_WF.WebUserControls h5Title.Attributes.Remove("class"); h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); lblTitle.Text = title; +#if true // titoli try { @@ -42,7 +78,8 @@ namespace NKC_WF.WebUserControls lblValGre.Text = currStat.vars[2].value; } catch - { } + { } +#endif } /// diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs index bd7e474..36aa0c9 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -85,5 +85,41 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblValGre; + + /// + /// Controllo frmView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.FormView frmView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfBatchID. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + + /// + /// Controllo hfStatLevel. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfStatLevel; } } diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index 4b87d99..dcc178e 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -55,7 +55,7 @@
-
+ <%--
BUNK ST00000A2
@@ -75,7 +75,7 @@
-
+
--%>
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index 1dee58b..d0375d8 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -43,8 +43,13 @@ namespace NKC_WF.WebUserControls vars = variabili }; - cmp_MU_singleStatBunk.title = "BUNK"; cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + cmp_MU_singleStatBunk.BatchId = BatchId; + cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK; + + + + cmp_MU_singleStatBunk.title = "BUNK"; cmp_MU_singleStatBunk.currStat = bunkStsat; } /// From 3729517f53d363a9656f7add5eb406bd8465e399 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 16:53:35 +0100 Subject: [PATCH 3/4] Cambio flash colore --- NKC_WF/Content/SheetColor.css | 28 ++++++++++++++-------------- NKC_WF/Content/SheetColor.less | 20 ++++++++++---------- NKC_WF/Content/SheetColor.min.css | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index 3680df5..c89c8ce 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,19 +1,19 @@ /* ANIMAZIONE */ .strokeThick { - stroke-width: 50px !important; + stroke-width: 10px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; @@ -21,21 +21,21 @@ animation-direction: alternate; } /* Safari 4.0 - 8.0 */ -@-webkit-keyframes blueFlash { +@-webkit-keyframes doFlash { 0% { - stroke: #c4dbff; + stroke: #f8fbff; } 25% { - stroke: #9dc4ff; + stroke: #ff0; } 50% { - stroke: #5ca5ff; + stroke: #f2f200; } 75% { - stroke: #1b82ff; + stroke: #d8d800; } 100% { - stroke: #005ccc; + stroke: #bebe00; } } /* COLORI */ @@ -78,22 +78,22 @@ } #BLK-SEL { fill: orange; - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; animation-iteration-count: infinite; animation-direction: alternate; - stroke-width: 50px !important; + stroke-width: 10px !important; } #BLK-BIN { fill: #28a745; diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index 2437d38..f6ef8f1 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,21 +1,21 @@ /* ANIMAZIONE */ -@borderThick: 50px; +@borderThick: 10px; .strokeThick { stroke-width: @borderThick !important; } /* Animazione per richiamo attenzione*/ .flashStroke { - stroke: blue; + stroke: yellow; /* Safari 4.0 - 8.0 */ - -webkit-animation-name: blueFlash; + -webkit-animation-name: doFlash; -webkit-animation-duration: 0.8s; -webkit-animation-timing-function: linear; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; -webkit-animation-direction: alternate; /* Standard syntax */ - animation-name: blueFlash; + animation-name: doFlash; animation-duration: 0.8s; animation-timing-function: linear; animation-delay: 0s; @@ -24,25 +24,25 @@ } /* Safari 4.0 - 8.0 */ -@-webkit-keyframes blueFlash { +@-webkit-keyframes doFlash { 0% { - stroke: #c4dbff; + stroke: #f8fbff; } 25% { - stroke: #9dc4ff; + stroke: #ff0; } 50% { - stroke: #5ca5ff; + stroke: #f2f200; } 75% { - stroke: #1b82ff; + stroke: #d8d800; } 100% { - stroke: #005ccc; + stroke: #bebe00; } } diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index 840c089..20847e4 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:50px !important;}.flashStroke{stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes blueFlash{0%{stroke:#c4dbff;}25%{stroke:#9dc4ff;}50%{stroke:#5ca5ff;}75%{stroke:#1b82ff;}100%{stroke:#005ccc;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:blue;-webkit-animation-name:blueFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:blueFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:50px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file +.strokeThick{stroke-width:10px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:10px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file From 9f2e73e1f7e4e4f8da7502003b8728fff731cc49 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 20 Jan 2020 17:54:05 +0100 Subject: [PATCH 4/4] Completato componente statistiche --- AppData/AppData.csproj | 1 - AppData/Objects.cs | 34 ----- Jenkinsfile | 2 +- NKC_WF/Content/SheetColor.css | 22 ++-- NKC_WF/Content/SheetColor.less | 20 +-- NKC_WF/Content/SheetColor.min.css | 2 +- NKC_WF/Controllers/getMUCssController.cs | 11 +- NKC_WF/WebUserControls/cmp_MU_singleStat.ascx | 33 +---- .../WebUserControls/cmp_MU_singleStat.ascx.cs | 48 +------ .../cmp_MU_singleStat.ascx.designer.cs | 72 ----------- NKC_WF/WebUserControls/cmp_MU_stats.ascx | 119 ++---------------- NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs | 36 ++++-- .../cmp_MU_stats.ascx.designer.cs | 36 ++++++ 13 files changed, 110 insertions(+), 326 deletions(-) delete mode 100644 AppData/Objects.cs diff --git a/AppData/AppData.csproj b/AppData/AppData.csproj index 5acafb5..fbb4308 100644 --- a/AppData/AppData.csproj +++ b/AppData/AppData.csproj @@ -176,7 +176,6 @@ DS_Report.xsd - True True diff --git a/AppData/Objects.cs b/AppData/Objects.cs deleted file mode 100644 index ee94b26..0000000 --- a/AppData/Objects.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AppData -{ - - /// - /// Struttura delel statistiche mostrate - /// - public class stats - { - /// - /// Variabili (red / yellow / green) - /// - public List vars { get; set; } - } - /// - /// Oggetto variabile da mostrare - /// - public class varData - { - /// - /// Nome variabile - /// - public string name { get; set; } = "A"; - /// - /// Valore variabile - /// - public string value { get; set; } = "0"; - } -} diff --git a/Jenkinsfile b/Jenkinsfile index 2eca4fb..47b08b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=203']) { + withEnv(['NEXT_BUILD_NUMBER=205']) { // env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '0.8.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') diff --git a/NKC_WF/Content/SheetColor.css b/NKC_WF/Content/SheetColor.css index c89c8ce..fb3a967 100644 --- a/NKC_WF/Content/SheetColor.css +++ b/NKC_WF/Content/SheetColor.css @@ -1,6 +1,6 @@ /* ANIMAZIONE */ .strokeThick { - stroke-width: 10px !important; + stroke-width: 15px !important; } /* Animazione per richiamo attenzione*/ .flashStroke { @@ -49,10 +49,10 @@ fill: #ACACAC; } .VERDE { - fill: #28a745; + fill: #21CD39; } .BLU { - fill: #007bff; + fill: #0000FF; } .ARANCIO { fill: orange; @@ -63,9 +63,15 @@ .PURPLE { fill: purple; } +.ROSSO { + fill: red; +} .TESTO { fill: white; } +.NERO { + fill: black; +} /* Classi da sostituire dinamicamente*/ #BLK-BCK { /*background-image: url("../Images/MT0006110.jpg"); @@ -77,7 +83,7 @@ fill: #ACACAC; } #BLK-SEL { - fill: orange; + fill: yellow; stroke: yellow; /* Safari 4.0 - 8.0 */ -webkit-animation-name: doFlash; @@ -93,14 +99,14 @@ animation-delay: 0s; animation-iteration-count: infinite; animation-direction: alternate; - stroke-width: 10px !important; + stroke-width: 15px !important; } #BLK-BIN { - fill: #28a745; + fill: #0000FF; } #BLK-CART { - fill: #007bff; + fill: #21CD39; } #BLK-SEC-OP { - fill: purple; + fill: red; } \ No newline at end of file diff --git a/NKC_WF/Content/SheetColor.less b/NKC_WF/Content/SheetColor.less index f6ef8f1..7a1d39d 100644 --- a/NKC_WF/Content/SheetColor.less +++ b/NKC_WF/Content/SheetColor.less @@ -1,5 +1,5 @@ /* ANIMAZIONE */ -@borderThick: 10px; +@borderThick: 15px; .strokeThick { stroke-width: @borderThick !important; @@ -57,10 +57,10 @@ fill: #ACACAC; } .VERDE { - fill: #28a745; + fill: #21CD39; } .BLU { - fill: #007bff; + fill: #0000FF; } .ARANCIO { fill: orange; @@ -71,9 +71,15 @@ .PURPLE { fill: purple; } +.ROSSO { + fill: red; +} .TESTO { fill: white; } +.NERO { + fill: black; +} /* Classi da sostituire dinamicamente*/ #BLK-BCK { @@ -83,17 +89,17 @@ .GRIGIO; } #BLK-SEL { - .ARANCIO; + .GIALLO; .flashStroke; .strokeThick; } #BLK-BIN { - .VERDE; + .BLU; } #BLK-CART { - .BLU; + .VERDE; } #BLK-SEC-OP { - .PURPLE; + .ROSSO; } diff --git a/NKC_WF/Content/SheetColor.min.css b/NKC_WF/Content/SheetColor.min.css index 20847e4..f8ee14a 100644 --- a/NKC_WF/Content/SheetColor.min.css +++ b/NKC_WF/Content/SheetColor.min.css @@ -1 +1 @@ -.strokeThick{stroke-width:10px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#28a745;}.BLU{fill:#007bff;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.TESTO{fill:white;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:orange;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:10px !important;}#BLK-BIN{fill:#28a745;}#BLK-CART{fill:#007bff;}#BLK-SEC-OP{fill:purple;} \ No newline at end of file +.strokeThick{stroke-width:15px !important;}.flashStroke{stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;}@-webkit-keyframes doFlash{0%{stroke:#f8fbff;}25%{stroke:#ff0;}50%{stroke:#f2f200;}75%{stroke:#d8d800;}100%{stroke:#bebe00;}}.SFONDO{fill:#dedede;}.GRIGIO{fill:#acacac;}.VERDE{fill:#21cd39;}.BLU{fill:#00f;}.ARANCIO{fill:orange;}.GIALLO{fill:yellow;}.PURPLE{fill:purple;}.ROSSO{fill:red;}.TESTO{fill:white;}.NERO{fill:black;}#BLK-BCK{fill:#dedede;}#BLK-CUT{fill:#acacac;}#BLK-SEL{fill:yellow;stroke:yellow;-webkit-animation-name:doFlash;-webkit-animation-duration:.8s;-webkit-animation-timing-function:linear;-webkit-animation-delay:0s;-webkit-animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-name:doFlash;animation-duration:.8s;animation-timing-function:linear;animation-delay:0s;animation-iteration-count:infinite;animation-direction:alternate;stroke-width:15px !important;}#BLK-BIN{fill:#00f;}#BLK-CART{fill:#21cd39;}#BLK-SEC-OP{fill:red;} \ No newline at end of file diff --git a/NKC_WF/Controllers/getMUCssController.cs b/NKC_WF/Controllers/getMUCssController.cs index 84dd481..05f36d0 100644 --- a/NKC_WF/Controllers/getMUCssController.cs +++ b/NKC_WF/Controllers/getMUCssController.cs @@ -29,10 +29,17 @@ namespace NKC_WF.Controllers string filename = HttpContext.Current.Server.MapPath("~/Content/SheetColor.css"); answ = File.ReadAllText(filename); - // imposto sfondo ... + // imposto sfondo ... NON usato answ = answ.Replace("#BLK-BCK", "#Sheet"); + + // All'inizio --> tutti colorati secondo destinazione (cart, bin, secop) + + // eventualmente sec-op è SECONDO css aggiuntivo opzionale x indicare tratteggiato e/o tratteggiato + flashing... + + // ...e primi 3 items... - answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE, #IT000085AF"); + answ = answ.Replace("#BLK-CUT", "#IT00008594, #IT000085AC, #IT000085AD, #IT000085AE"); + answ = answ.Replace("#BLK-SEC-OP", "#IT000085AF"); answ = answ.Replace("#BLK-SEL", "#IT000085C2"); answ = answ.Replace("#BLK-BIN", "#IT000085BE"); answ = answ.Replace("#BLK-CART", "#IT000085AB"); diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx index f067822..5e60ee7 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx @@ -1,38 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_MU_singleStat.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_MU_singleStat" %> -
-
-
-
- - - - - - - - - - - - - - - -
- - -
- - -
-
-
- - +
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs index 463c1e0..6c2dcb7 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.cs @@ -44,63 +44,19 @@ namespace NKC_WF.WebUserControls } } - protected void Page_Load(object sender, EventArgs e) { } /// /// Css titolo /// - public string titleCss = "bg-dark text-light"; - /// - /// Css titolo - /// - public string title = "NONE"; - + public string titleCss { get; set; } = "bg-dark text-light"; /// /// Valirizzazione variabili /// public void doUpdate() { - h5Title.Attributes.Remove("class"); - h5Title.Attributes.Add("class", $"card-header py-1 {titleCss}"); - lblTitle.Text = title; -#if true - // titoli - try - { - lblTitRed.Text = currStat.vars[0].name; - lblTitYel.Text = currStat.vars[1].name; - lblTitGre.Text = currStat.vars[2].name; - // valori - lblValRed.Text = currStat.vars[0].value; - lblValYel.Text = currStat.vars[1].value; - lblValGre.Text = currStat.vars[2].value; - } - catch - { } -#endif + frmView.DataBind(); } - - /// - /// Statistiche salvate (locali) - /// - protected stats _currStat { get; set; } - /// - /// Statistiche da mostrare - /// - public stats currStat - { - get - { - return _currStat; - } - set - { - _currStat = value; - doUpdate(); - } - } - } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs index 36aa0c9..c635b58 100644 --- a/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_singleStat.ascx.designer.cs @@ -14,78 +14,6 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_singleStat { - /// - /// Controllo h5Title. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl h5Title; - - /// - /// Controllo lblTitle. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblTitle; - - /// - /// Controllo lblTitRed. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblTitRed; - - /// - /// Controllo lblTitYel. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblTitYel; - - /// - /// Controllo lblTitGre. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblTitGre; - - /// - /// Controllo lblValRed. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblValRed; - - /// - /// Controllo lblValYel. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblValYel; - - /// - /// Controllo lblValGre. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblValGre; - /// /// Controllo frmView. /// diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx b/NKC_WF/WebUserControls/cmp_MU_stats.ascx index dcc178e..cff9501 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx @@ -6,123 +6,22 @@
-
-
BINS
-
-
- - - - - - - - - - - - - - -
WAITWIPDONE
1235
-
-
-
-
-
-
SHIFT B20190916.0
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
2540%
-
-
+
- - <%--
-
BUNK ST00000A2
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
31225%
-
-
--%> + +
+
+ +
+
+
-
-
SHEET SH00000123
-
- - - - - - - - - - - - - - - -
DONETOTRATIO
52520%
-
-
-
-
-
-
CARTS
-
- - - - - - - - - - - - - - - -
WAITWIPDONE
2426
-
-
+
diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs index d0375d8..38f5b3a 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.cs @@ -33,24 +33,34 @@ namespace NKC_WF.WebUserControls } public void doUpdate() { - // leggo stats e compongo - List variabili = new List(); - variabili.Add(new varData { name = "WAIT", value = "2" }); - variabili.Add(new varData { name = "WIP", value = "1" }); - variabili.Add(new varData { name = "DONE", value = "3" }); - stats bunkStsat = new stats - { - vars = variabili - }; - cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + // fix x BIN + cmp_MU_singleStatBin.BatchId = BatchId; + cmp_MU_singleStatBin.statLevel = (int)StatType.BIN; + cmp_MU_singleStatBin.titleCss = "bg-primary text-light"; + + + // fix x BATCH + cmp_MU_singleStatBatch.BatchId = BatchId; + cmp_MU_singleStatBatch.statLevel = (int)StatType.BATCH; + cmp_MU_singleStatBatch.titleCss = "bg-info"; + + // fix x BUNK cmp_MU_singleStatBunk.BatchId = BatchId; - cmp_MU_singleStatBunk.statLevel= (int)StatType.BUNK; + cmp_MU_singleStatBunk.statLevel = (int)StatType.BUNK; + cmp_MU_singleStatBunk.titleCss = "bg-secondary text-light"; + // fix x SHEET + cmp_MU_singleStatSheet.BatchId = BatchId; + cmp_MU_singleStatSheet.statLevel = (int)StatType.SHEET; + cmp_MU_singleStatSheet.titleCss = "bg-warning"; + + // fix x CART + cmp_MU_singleStatCart.BatchId = BatchId; + cmp_MU_singleStatCart.statLevel = (int)StatType.CART; + cmp_MU_singleStatCart.titleCss = "bg-success"; - cmp_MU_singleStatBunk.title = "BUNK"; - cmp_MU_singleStatBunk.currStat = bunkStsat; } /// /// Calcola il rapporto tra 2 valori diff --git a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs index 2763d2c..ff455c4 100644 --- a/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_stats.ascx.designer.cs @@ -23,6 +23,24 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfBatchID; + /// + /// Controllo cmp_MU_singleStatBin. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBin; + + /// + /// Controllo cmp_MU_singleStatBatch. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBatch; + /// /// Controllo cmp_MU_singleStatBunk. /// @@ -31,5 +49,23 @@ namespace NKC_WF.WebUserControls /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatBunk; + + /// + /// Controllo cmp_MU_singleStatSheet. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatSheet; + + /// + /// Controllo cmp_MU_singleStatCart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_MU_singleStat cmp_MU_singleStatCart; } }