diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 3a8468e..0336450 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -140,33 +140,6 @@ namespace AppData #endregion Private Properties - #region Protected Properties - - /// - /// Recupera prossimo batch da DB (NEXT... da db x status... ok SOLO x singola macchina) - /// - protected int getNextBatch - { - get - { - DataLayer DLMan = new DataLayer(); - int answ = 0; - try - { - var currData = DLMan.taBL.getNextAvailable(); - if (currData.Count > 0) - { - answ = currData[0].BatchID; - } - } - catch - { } - return answ; - } - } - - #endregion Protected Properties - #region Public Properties /// @@ -707,6 +680,26 @@ namespace AppData memLayer.ML.setRSV(redCurrSheetTabKey(machine), rawData, 2); } + /// + /// Recupera prossimo batch da DB (NEXT... da db x status...) + /// + protected int getNextBatch(string PlaceCod) + { + DataLayer DLMan = new DataLayer(); + int answ = 0; + try + { + var currData = DLMan.taBL.getNextAvailable(PlaceCod); + if (currData.Count > 0) + { + answ = currData[0].BatchID; + } + } + catch + { } + return answ; + } + /// /// Recupera SHEET da batch e sstati permessi... /// @@ -2864,7 +2857,7 @@ namespace AppData else { // recupero batch e sheet... - int batchId = getNextBatch; + int batchId = getNextBatch(machineCod); // se non trovo creo un oggetto NUOVO e vuoto x ogni oggetto... e salvo... answ.Add("BatchID", batchId.ToString()); answ.Add("SheetID_load", getSheetIdByBatch(batchId, 0, 1).ToString()); diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index c164f21..cb1690e 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -27940,6 +27940,7 @@ namespace AppData.DS_AppTableAdapters { this._commandCollection[15].CommandText = "dbo.stp_Batch_getNextAvailable"; this._commandCollection[15].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[15].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[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[16] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[16].Connection = this.Connection; this._commandCollection[16].CommandText = "dbo.stp_Batch_getRunning"; @@ -28164,8 +28165,14 @@ 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")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.BatchListDataTable getNextAvailable() { + public virtual DS_App.BatchListDataTable getNextAvailable(string PlaceCod) { this.Adapter.SelectCommand = this.CommandCollection[15]; + if ((PlaceCod == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(PlaceCod)); + } DS_App.BatchListDataTable dataTable = new DS_App.BatchListDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index ffe2feb..9a6ea47 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -209,6 +209,7 @@ FROM v_BatchList dbo.stp_Batch_getNextAvailable + @@ -3417,7 +3418,7 @@ SELECT PlaceCod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceC - + dbo.stp_PLAC_insert @@ -3452,7 +3453,7 @@ SELECT PlaceCod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceC - + dbo.stp_STALOG_insert @@ -3468,7 +3469,7 @@ SELECT PlaceCod, PlaceDesc, PlaceCodAncest FROM Places WHERE (PlaceCod = @PlaceC - + dbo.stp_STALOG_updateDuration @@ -3535,7 +3536,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + dbo.stp_STADEC_insertQuery @@ -3557,7 +3558,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3615,7 +3616,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3640,7 +3641,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3695,7 +3696,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3768,7 +3769,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3837,7 +3838,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3870,7 +3871,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3942,7 +3943,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3961,7 +3962,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -3992,7 +3993,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4000,7 +4001,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4017,7 +4018,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4026,7 +4027,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4057,7 +4058,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4065,7 +4066,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4081,7 +4082,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4089,7 +4090,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4117,7 +4118,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4153,7 +4154,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4169,7 +4170,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4179,7 +4180,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4196,7 +4197,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4209,7 +4210,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4258,7 +4259,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4287,7 +4288,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4329,7 +4330,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4440,7 +4441,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4503,7 +4504,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4548,7 +4549,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4574,7 +4575,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4667,7 +4668,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4730,7 +4731,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4789,7 +4790,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4838,7 +4839,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4877,7 +4878,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4930,7 +4931,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4947,7 +4948,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4960,7 +4961,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -4982,7 +4983,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -5009,7 +5010,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -5046,7 +5047,7 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - + @@ -5246,18 +5247,18 @@ SELECT Station, Code, Descript, Css FROM StatusDecode WHERE (Code = @Code) AND ( - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 3b51159..705abc7 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,19 +4,19 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + - + @@ -39,14 +39,14 @@ - + - + - - - - + + + + @@ -185,7 +185,7 @@ - + 1034 diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx b/NKC_WF/WebUserControls/cmp_stackLoading.ascx index 4b93245..d15e9f3 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx @@ -10,7 +10,7 @@

<%: traduci("ProdSimul") %>

- <%: traduci("Advance") %> #<%: traduci("Prod") %> + <%: traduci("Advance") %>#<%: traduci("Prod") %>
@@ -18,6 +18,7 @@
+ @@ -51,7 +52,11 @@
- + + + + +
diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs index 4d4c184..091a99e 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.cs @@ -99,6 +99,8 @@ namespace NKC_WF.WebUserControls set { cmp_MachSelSmart.MachineSel = value; + hfMachine.Value = value; + frmView.DataBind(); } } diff --git a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs index 8fa8f33..da92f69 100644 --- a/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_stackLoading.ascx.designer.cs @@ -41,6 +41,15 @@ namespace NKC_WF.WebUserControls /// protected global::NKC_WF.WebUserControls.cmp_MachSelSmart cmp_MachSelSmart; + /// + /// hfMachine control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfMachine; + /// /// hfBarcode control. ///