update x recupero altri BATCH splitted

This commit is contained in:
Samuele Locatelli
2021-06-14 12:24:41 +02:00
parent 769a2d8f4c
commit 099eaebaa8
4 changed files with 117 additions and 50 deletions
+34
View File
@@ -698,6 +698,40 @@ namespace AppData
return answ;
}
/// <summary>
/// Elenco dei Batch descendant di un batch a sua volta descendant
/// </summary>
public static DS_App.BatchListDataTable BatchOtherDescendant(int BatchDescId)
{
DataLayer DLMan = new DataLayer();
string redKey = $"{redBatchDescend}:{BatchDescId}";
string rawData = "";
DS_App.BatchListDataTable answ = new DS_App.BatchListDataTable();
// cerco in redis
if (memLayer.ML.redKeyPresent(redKey))
{
rawData = memLayer.ML.getRSV(redKey);
if (!string.IsNullOrEmpty(rawData))
{
try
{
answ = JsonConvert.DeserializeObject<DS_App.BatchListDataTable>(rawData);
}
catch
{ }
}
}
// se vuoto rileggo
if (answ.Count == 0)
{
answ = DLMan.taBL.getSplitByKey(BatchDescId);
// salvo in cache
rawData = JsonConvert.SerializeObject(answ);
memLayer.ML.setRSV(redKey, rawData, 5 * 60);
}
return answ;
}
public static string BatchStatusDescr(object value)
{
string answ = "";
+69 -46
View File
@@ -26449,7 +26449,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[26];
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[27];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_BatchList";
@@ -26560,55 +26560,61 @@ namespace AppData.DS_AppTableAdapters {
this._commandCollection[17].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[18] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[18].Connection = this.Connection;
this._commandCollection[18].CommandText = "dbo.stp_Batch_makeDescendantByKey";
this._commandCollection[18].CommandText = "dbo.stp_Batch_getSplitByKey";
this._commandCollection[18].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[18].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[18].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[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCodAnces", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[19] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[19].Connection = this.Connection;
this._commandCollection[19].CommandText = "dbo.stp_Batch_redoPartValid";
this._commandCollection[19].CommandText = "dbo.stp_Batch_makeDescendantByKey";
this._commandCollection[19].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[19].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[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[19].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[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCodAnces", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[20] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[20].Connection = this.Connection;
this._commandCollection[20].CommandText = "dbo.stp_Batch_resetAllNesting";
this._commandCollection[20].CommandText = "dbo.stp_Batch_redoPartValid";
this._commandCollection[20].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[20].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[20].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[20].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[21] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[21].Connection = this.Connection;
this._commandCollection[21].CommandText = "dbo.stp_Batch_resetPartUnValid";
this._commandCollection[21].CommandText = "dbo.stp_Batch_resetAllNesting";
this._commandCollection[21].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[21].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[21].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[22] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[22].Connection = this.Connection;
this._commandCollection[22].CommandText = "dbo.stp_zzz_resetProdCall";
this._commandCollection[22].CommandText = "dbo.stp_Batch_resetPartUnValid";
this._commandCollection[22].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[22].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[23] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[23].Connection = this.Connection;
this._commandCollection[23].CommandText = "dbo.stp_Batch_resetTree";
this._commandCollection[23].CommandText = "dbo.stp_zzz_resetProdCall";
this._commandCollection[23].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[23].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[23].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[24] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[24].Connection = this.Connection;
this._commandCollection[24].CommandText = "dbo.stp_Batch_updateSchedPrior";
this._commandCollection[24].CommandText = "dbo.stp_Batch_resetTree";
this._commandCollection[24].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[24].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[24].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[24].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SchedPrio", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[24].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[25] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[25].Connection = this.Connection;
this._commandCollection[25].CommandText = "dbo.stp_Batch_updateStatus";
this._commandCollection[25].CommandText = "dbo.stp_Batch_updateSchedPrior";
this._commandCollection[25].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[25].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[25].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[25].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[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[25].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SchedPrio", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[26] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[26].Connection = this.Connection;
this._commandCollection[26].CommandText = "dbo.stp_Batch_updateStatus";
this._commandCollection[26].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[26].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[26].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[26].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[26].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EnvNum", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[26].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TotalTime", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 6, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -26788,6 +26794,23 @@ 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 getSplitByKey(global::System.Nullable<int> BatchID) {
this.Adapter.SelectCommand = this.CommandCollection[18];
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.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")]
@@ -27028,7 +27051,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 makeDescendantByKey(global::System.Nullable<int> BatchID, string PlaceCodAnces) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19];
if ((BatchID.HasValue == true)) {
command.Parameters[1].Value = ((int)(BatchID.Value));
}
@@ -27062,7 +27085,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 redoPartValid(string Takt) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20];
if ((Takt == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -27090,7 +27113,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 resetNesting(global::System.Nullable<int> BatchID) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[20];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21];
if ((BatchID.HasValue == true)) {
command.Parameters[1].Value = ((int)(BatchID.Value));
}
@@ -27118,28 +27141,6 @@ 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 resetPartUnValid() {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[21];
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int resetProdCall() {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[22];
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
@@ -27161,8 +27162,30 @@ namespace AppData.DS_AppTableAdapters {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int resetTree(global::System.Nullable<int> Original_BatchID) {
public virtual int resetProdCall() {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[23];
global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
command.Connection.Open();
}
int returnValue;
try {
returnValue = command.ExecuteNonQuery();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
command.Connection.Close();
}
}
return returnValue;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int resetTree(global::System.Nullable<int> Original_BatchID) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[24];
if ((Original_BatchID.HasValue == true)) {
command.Parameters[1].Value = ((int)(Original_BatchID.Value));
}
@@ -27190,7 +27213,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 updateSchedPrior(global::System.Nullable<int> BatchID, global::System.Nullable<int> SchedPrio) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[24];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[25];
if ((BatchID.HasValue == true)) {
command.Parameters[1].Value = ((int)(BatchID.Value));
}
@@ -27224,7 +27247,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<int> BatchID, global::System.Nullable<int> Status, string EnvNum, global::System.Nullable<decimal> TotalTime) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[25];
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[26];
if ((BatchID.HasValue == true)) {
command.Parameters[1].Value = ((int)(BatchID.Value));
}
+11
View File
@@ -233,6 +233,17 @@ FROM v_BatchList</CommandText>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_Batch_getSplitByKey" DbObjectType="StoredProcedure" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="getSplitByKey" GetMethodModifier="Public" GetMethodName="getSplitByKey" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="getSplitByKey" UserSourceName="getSplitByKey">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
<CommandText>dbo.stp_Batch_getSplitByKey</CommandText>
<Parameters>
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@BatchID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
<DbSource ConnectionRef="Sauder_NKCConnectionString (Settings)" DbObjectName="Sauder_NKC.dbo.stp_Batch_makeDescendantByKey" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="makeDescendantByKey" Modifier="Public" Name="makeDescendantByKey" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy8" UserSourceName="makeDescendantByKey">
<SelectCommand>
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
+3 -4
View File
@@ -479,10 +479,8 @@ namespace NKC_WF.Controllers
// NKC2: se è un batch ti dipo descendant
if (ComLib.BType(rispNest.BatchID) == BatchType.Descendant)
{
// verifico se ce ne siano altri NON validati
// invio il PRIMO batch descendant
var tabDesc = ComLib.BatchDescendant(rispNest.BatchID);
// verifico se ce ne siano altri NON validati (ma splitted)
var tabDesc = ComLib.BatchOtherDescendant(rispNest.BatchID);
if (tabDesc != null && tabDesc.Count > 0)
{
// ciclo x tutte le righe che NON fossero con nesting effettuato
@@ -491,6 +489,7 @@ namespace NKC_WF.Controllers
// se NON effettuato
if (item.STATUS == 2)
{
// invio il PRIMO batch descendant
ComLib.sendBatchReq(item.BatchID, "Nesting", 2, false);
// registro su DB nesting iniziato...
DLMan.taBL.updateStatus(item.BatchID, (int)BatchStatus.NestRequested, "", -1);