diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index e535e7b..d3396e1 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -103,7 +103,15 @@ namespace AppData /// /// Stack Completato /// - StackDone + StackDone, + /// + /// Stack currently in LOAD + /// + Current, + /// + /// Stack completed + /// + Completed } public static string PositionStatusDescr(object value) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 8c1b7b1..a723619 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -982,6 +982,10 @@ namespace AppData { private global::System.Data.DataColumn columnNumItems; + private global::System.Data.DataColumn columnPosition; + + private global::System.Data.DataColumn columnStackDtmx; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public StackListDataTable() { @@ -1079,6 +1083,22 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PositionColumn { + get { + return this.columnPosition; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn StackDtmxColumn { + get { + return this.columnStackDtmx; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1116,7 +1136,7 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public StackListRow AddStackListRow(int StackID, int StackIndex, int BatchID, int NumSheets, int NumSheetsPrepared, int NumSheetsPrinted, int NumSheetsWorked, int NumItems) { + public StackListRow AddStackListRow(int StackID, int StackIndex, int BatchID, int NumSheets, int NumSheetsPrepared, int NumSheetsPrinted, int NumSheetsWorked, int NumItems, int Position, string StackDtmx) { StackListRow rowStackListRow = ((StackListRow)(this.NewRow())); object[] columnValuesArray = new object[] { StackID, @@ -1126,7 +1146,9 @@ namespace AppData { NumSheetsPrepared, NumSheetsPrinted, NumSheetsWorked, - NumItems}; + NumItems, + Position, + StackDtmx}; rowStackListRow.ItemArray = columnValuesArray; this.Rows.Add(rowStackListRow); return rowStackListRow; @@ -1164,6 +1186,8 @@ namespace AppData { this.columnNumSheetsPrinted = base.Columns["NumSheetsPrinted"]; this.columnNumSheetsWorked = base.Columns["NumSheetsWorked"]; this.columnNumItems = base.Columns["NumItems"]; + this.columnPosition = base.Columns["Position"]; + this.columnStackDtmx = base.Columns["StackDtmx"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1185,6 +1209,10 @@ namespace AppData { base.Columns.Add(this.columnNumSheetsWorked); this.columnNumItems = new global::System.Data.DataColumn("NumItems", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumItems); + this.columnPosition = new global::System.Data.DataColumn("Position", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPosition); + this.columnStackDtmx = new global::System.Data.DataColumn("StackDtmx", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnStackDtmx); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnStackID}, true)); this.columnStackID.AllowDBNull = false; @@ -1196,6 +1224,9 @@ namespace AppData { this.columnNumSheetsPrinted.ReadOnly = true; this.columnNumSheetsWorked.ReadOnly = true; this.columnNumItems.ReadOnly = true; + this.columnPosition.AllowDBNull = false; + this.columnStackDtmx.ReadOnly = true; + this.columnStackDtmx.MaxLength = 10; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3861,6 +3892,33 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Position { + get { + return ((int)(this[this.tableStackList.PositionColumn])); + } + set { + this[this.tableStackList.PositionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string StackDtmx { + get { + try { + return ((string)(this[this.tableStackList.StackDtmxColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("Il valore della colonna \'StackDtmx\' nella tabella \'StackList\' è DBNull.", e); + } + } + set { + this[this.tableStackList.StackDtmxColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public bool IsNumSheetsNull() { @@ -3920,6 +3978,18 @@ namespace AppData { public void SetNumItemsNull() { this[this.tableStackList.NumItemsColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsStackDtmxNull() { + return this.IsNull(this.tableStackList.StackDtmxColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetStackDtmxNull() { + this[this.tableStackList.StackDtmxColumn] = global::System.Convert.DBNull; + } } /// @@ -5284,7 +5354,7 @@ namespace AppData.DS_AppTableAdapters { [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[6]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList"; @@ -5316,11 +5386,16 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[5].CommandText = "dbo.stp_Batch_getNextAvailable"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[6].Connection = this.Connection; + this._commandCollection[6].CommandText = "dbo.stp_Batch_updateStatus"; + this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", 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()] @@ -5398,6 +5473,17 @@ namespace AppData.DS_AppTableAdapters { 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.BatchListDataTable getNextAvailable() { + this.Adapter.SelectCommand = this.CommandCollection[5]; + DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); + 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")] @@ -5436,7 +5522,7 @@ namespace AppData.DS_AppTableAdapters { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateStatus(global::System.Nullable BatchID, global::System.Nullable Status) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((BatchID.HasValue == true)) { command.Parameters[1].Value = ((int)(BatchID.Value)); } @@ -5596,6 +5682,8 @@ namespace AppData.DS_AppTableAdapters { tableMapping.ColumnMappings.Add("NumSheetsPrinted", "NumSheetsPrinted"); tableMapping.ColumnMappings.Add("NumSheetsWorked", "NumSheetsWorked"); tableMapping.ColumnMappings.Add("NumItems", "NumItems"); + tableMapping.ColumnMappings.Add("Position", "Position"); + tableMapping.ColumnMappings.Add("StackDtmx", "StackDtmx"); this._adapter.TableMappings.Add(tableMapping); } @@ -5609,7 +5697,7 @@ namespace AppData.DS_AppTableAdapters { [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 = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_StackList"; @@ -5626,6 +5714,12 @@ namespace AppData.DS_AppTableAdapters { 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("@StackID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_Stacks_getNextByBatch"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", 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()] @@ -5685,6 +5779,23 @@ namespace AppData.DS_AppTableAdapters { 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.StackListDataTable getNextByBatch(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((BatchID.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(BatchID.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_App.StackListDataTable dataTable = new DS_App.StackListDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } } /// diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index fc7d3e9..b1ad0f2 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -81,6 +81,16 @@ FROM v_BatchList + + + + dbo.stp_Batch_getNextAvailable + + + + + + @@ -116,6 +126,8 @@ FROM v_StackList + + @@ -140,6 +152,17 @@ FROM v_StackList + + + + dbo.stp_Stacks_getNextByBatch + + + + + + + @@ -604,7 +627,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -636,7 +659,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -647,10 +670,18 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat + + + + + + + + - + @@ -701,7 +732,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -773,7 +804,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -781,7 +812,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -842,7 +873,7 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - + @@ -909,9 +940,9 @@ SELECT MatID, MatExtCode, MatDesc, ApprovDate, ApprovUser, L_mm, W_mm, T_mm, Mat - - - + + + \ No newline at end of file diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs index 51a5577..19fdc1c 100644 --- a/AppData/DataLayer.cs +++ b/AppData/DataLayer.cs @@ -1,4 +1,5 @@ using SteamWare; +using System.Globalization; namespace AppData { @@ -74,6 +75,18 @@ namespace AppData answ.codeInt = codeInt; answ.description = $"Material: {answ.code}"; } + else if (bcValue.StartsWith("ST")) + { + answ.codeType = codeType.Stack; + answ.code = bcValue.Replace("ST", ""); + int codeInt = 0; + int.TryParse(answ.code, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codeInt); + answ.codeInt = codeInt; + answ.description = $"Stack: {answ.code}"; + } + //else if (bcValue.StartsWith("SH")) + //{ + //} return answ; } } diff --git a/NKC_WF/MachineLoad.aspx b/NKC_WF/MachineLoad.aspx new file mode 100644 index 0000000..80cb162 --- /dev/null +++ b/NKC_WF/MachineLoad.aspx @@ -0,0 +1,31 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MachineLoad.aspx.cs" Inherits="NKC_WF.MachineLoad" %> + +<%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> +<%@ Register Src="~/WebUserControls/cmp_stackLoading.ascx" TagPrefix="uc1" TagName="cmp_stackLoading" %> + + + + +
+

<%: traduci("MachineLoad") %>

+
+
+
+ +
+
+ STACK DATA +
+
+ CURRENT LOAD DATA +
+
+ MACHINE DATA +
+
+ UNLOAD DATA +
+
+
+
+
diff --git a/NKC_WF/MachineLoad.aspx.cs b/NKC_WF/MachineLoad.aspx.cs new file mode 100644 index 0000000..3a3e35a --- /dev/null +++ b/NKC_WF/MachineLoad.aspx.cs @@ -0,0 +1,14 @@ +using AppData; +using System; + +namespace NKC_WF +{ + public partial class MachineLoad : BasePage + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + } +} \ No newline at end of file diff --git a/NKC_WF/MachineLoad.aspx.designer.cs b/NKC_WF/MachineLoad.aspx.designer.cs new file mode 100644 index 0000000..a0909ab --- /dev/null +++ b/NKC_WF/MachineLoad.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// 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 { + + + public partial class MachineLoad { + + /// + /// Controllo cmp_stackLoading. + /// + /// + /// 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_stackLoading cmp_stackLoading; + } +} diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index f313e55..e2b0cbe 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -167,6 +167,7 @@ fonts.css + @@ -179,6 +180,8 @@ + + @@ -328,6 +331,13 @@ Global.asax + + MachineLoad.aspx + ASPXCodeBehind + + + MachineLoad.aspx + OrderManager.aspx ASPXCodeBehind @@ -455,6 +465,20 @@ cmp_stackList.ascx + + cmp_stackLoading.ascx + ASPXCodeBehind + + + cmp_stackLoading.ascx + + + cmp_stackNextloading.ascx + ASPXCodeBehind + + + cmp_stackNextloading.ascx + cmp_taktList.ascx ASPXCodeBehind diff --git a/NKC_WF/WebUserControls/cmp_homeButtons.ascx b/NKC_WF/WebUserControls/cmp_homeButtons.ascx index 83dd94b..b827f63 100644 --- a/NKC_WF/WebUserControls/cmp_homeButtons.ascx +++ b/NKC_WF/WebUserControls/cmp_homeButtons.ascx @@ -11,7 +11,8 @@ <%: traduci("StackManager") %> - <%: traduci("MachineLoad") %> + <%: traduci("MachineLoad") %> <%: traduci("MachineUnload") %> diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx b/NKC_WF/WebUserControls/cmp_stackLoading.ascx new file mode 100644 index 0000000..19ef217 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx @@ -0,0 +1,38 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_stackLoading.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_stackLoading" %> +<%@ Register Src="~/WebUserControls/cmp_barcode.ascx" TagPrefix="uc1" TagName="cmp_barcode" %> +<%@ Register Src="~/WebUserControls/cmp_stackNextloading.ascx" TagPrefix="uc1" TagName="cmp_stackNextloading" %> + + + +
+
+ + + + +
+
+ Takt: +
+ BatchID: +
+
+ <%: traduci("StackReading") %> +
+
+ Due Date: +
+ Num Stacks: +
+
+
+
+ +
+
+ +
+
+ +
+
diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs new file mode 100644 index 0000000..0d0cd76 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs @@ -0,0 +1,145 @@ +using AppData; +using System; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_stackLoading : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + // svuoto input barcode... + cmp_barcode.inputAcquired = ""; + lastCmd = ""; + } + cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh; + } + /// + /// Comando barcode letto + /// + protected string lastCmd + { + get + { + return hfBarcode.Value; + } + set + { + hfBarcode.Value = value; + } + } + public int BatchIdCurr + { + get + { + int answ = 0; + try + { + int.TryParse(frmView.SelectedValue.ToString(), out answ); + } + catch + { } + return answ; + } + } + public int StackId + { + set + { + hfStackId.Value = value.ToString(); + lastCmd = ""; + cmp_barcode.resetMessage(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfStackId.Value, out answ); + return answ; + } + } + private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e) + { + // processo evento.. + lastCmd = cmp_barcode.inputAcquired.ToUpper(); + // processiamo barcode letto + decodedData decoData = DataLayer.man.decodeBcode(lastCmd); + switch (decoData.codeType) + { + case codeType.UNK: + cmp_barcode.showOutput("text-danger", "Unknown Data"); + break; + case codeType.Item: + cmp_barcode.showOutput("text-warning", "Item - ignored"); + break; + case codeType.Material: + cmp_barcode.showOutput("badge badge-warning", $"Material - ignored, {decoData.description}"); + break; + case codeType.Sheet: + cmp_barcode.showOutput("badge badge-warning", "Sheet - ignored"); + break; + case codeType.Stack: + + // verifico SE lo stack esista... + DS_App.StackListDataTable tabStack = DataLayer.man.taSTL.getByKey(decoData.codeInt); + if (tabStack.Count == 0) + { + cmp_barcode.showOutput("badge badge-danger", $"STACK NOT FOUND, {decoData.description}"); + } + else + { + } + DS_App.SheetListDataTable nextTbl = DataLayer.man.taSHL.getNextByStack(StackId); + // se tab vuota --> HO FINITO!!!! + if (nextTbl.Count == 0) + { + cmp_barcode.showOutput("badge badge-warning", $"STACK IS COMPLETED, {decoData.description}"); + } + // se ho valori --> controllo se corretto... + else + { + string codReq = nextTbl[0].MatExtCode.ToString(); + if (codReq == decoData.codeInt.ToString()) + { + cmp_barcode.showOutput("badge badge-success", $"SHEET RECORDED: {decoData.description}"); + // chiamo stored x indicare preparato + DataLayer.man.taSHL.setPrepared(nextTbl[0].SheetID); + } + else + { + cmp_barcode.showOutput("badge badge-danger", $"WRONG SHEET: {decoData.description}"); + } + } + + + + + cmp_barcode.showOutput("badge badge-warning", "Stack - ignored"); + break; + case codeType.Batch: + cmp_barcode.showOutput("badge badge-warning", "Batch - ignored"); + break; + default: + break; + } + // reset comando + cmp_barcode.inputAcquired = ""; + // aggiorno... + doUpdate(); + } + + public void doUpdate() + { + //repCtrl.DataBind(); + //checkPrint(); + } + + + + protected void frmView_DataBound(object sender, EventArgs e) + { + cmp_stackNextloading.BatchId = BatchIdCurr; + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs new file mode 100644 index 0000000..15281b8 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// 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_stackLoading { + + /// + /// Controllo hfBarcode. + /// + /// + /// 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 hfBarcode; + + /// + /// Controllo hfStackId. + /// + /// + /// 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 hfStackId; + + /// + /// 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 cmp_barcode. + /// + /// + /// 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_barcode cmp_barcode; + + /// + /// Controllo cmp_stackNextloading. + /// + /// + /// 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_stackNextloading cmp_stackNextloading; + } +} diff --git a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx new file mode 100644 index 0000000..d4ca06f --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx @@ -0,0 +1,29 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_stackNextloading.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_stackNextloading" %> + + + + + Code: + +
+ StackIndex: + +
+ + NumSheets: + +
+ NumSheetsPrinted: + +
+ NumSheetsWorked: + + + +
+
+ + + + + diff --git a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs new file mode 100644 index 0000000..ba39077 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.cs @@ -0,0 +1,32 @@ +using System; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_stackNextloading : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } + + public void doUpdate() + { + frmView.DataBind(); + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.designer.cs new file mode 100644 index 0000000..2a55f84 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_stackNextloading.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// 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_stackNextloading { + + /// + /// 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 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; + } +}