diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 588adbb..0d2bfea 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -1022,11 +1022,23 @@ SELECT BatchID, DueDate, NestingReq, NestingResp, Status, TotalTime, ApprovDate, [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 = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.BatchList"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "dbo.stp_Batch_getByKey"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_Batch_getByStatus"; + 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("@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()] @@ -1053,6 +1065,40 @@ SELECT BatchID, DueDate, NestingReq, NestingResp, Status, TotalTime, ApprovDate, 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 getByKey(global::System.Nullable BatchID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_App.BatchListDataTable getByStatus(global::System.Nullable Status) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((Status.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Status.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")] diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index 501ae1c..5f6b7db 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -89,7 +89,30 @@ SELECT BatchID, DueDate, NestingReq, NestingResp, Status, TotalTime, ApprovDate, - + + + + + dbo.stp_Batch_getByKey + + + + + + + + + + + dbo.stp_Batch_getByStatus + + + + + + + + @@ -99,7 +122,7 @@ SELECT BatchID, DueDate, NestingReq, NestingResp, Status, TotalTime, ApprovDate, - + diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index bfbec93..b35cc21 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -1,4 +1,52 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_batchDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_batchDetail" %> -Dettaglio Batch \ No newline at end of file +

Batch Detail

+ + + + +
+
+ BatchID: + +
+ DueDate: + +
+ NestingReq: + +
+ NestingResp: + +
+ Status: + +
+ TotalTime: + +
+ ApprovDate: + +
+ ApprovUser: + +
+
+ Send to Nesting + Stop Nesting +
+
+ Accept Nesting + Refuse Nesting +
+ + + + + + + + + +
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index e10be76..0df48f1 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -13,5 +13,55 @@ namespace NKC_WF.WebUserControls { } + + public int BatchId + { + set + { + hfBatchId.Value = value.ToString(); + frmView.DataBind(); + } + } + + public bool isNested(object _status) + { + bool answ = true; + int status = -1; + int.TryParse(_status.ToString(), out status); + switch (status) + { + case 0: + case 1: + answ = false; + break; + default: + break; + } + return answ; + } + +#if false + /// + /// Status del batch da cui deriva cosa visualizzare + /// + public int batchStatus + { + set + { + bool showNested = true; + switch (value) + { + case 0: + case 1: + showNested = false; + break; + default: + break; + } + divNesting.Visible = !showNested; + divNested.Visible = showNested; + } + } +#endif } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index e96964f..a37a0b4 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -11,5 +11,32 @@ namespace NKC_WF.WebUserControls { public partial class cmp_batchDetail { + + /// + /// 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 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 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; } } diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index e10510b..d46284b 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -1,7 +1,10 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_batchList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_batchList" %> +<%@ Register Src="~/WebUserControls/cmp_batchDetail.ascx" TagPrefix="uc1" TagName="cmp_batchDetail" %> +
+
diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index e24d71f..81b066a 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -45,10 +45,23 @@ namespace NKC_WF.WebUserControls grView.DataBind(); divDetail.Visible = false; } - + /// + /// BatchId selezionato + /// + protected int BatchIdSel + { + get + { + int answ = 0; + int.TryParse(grView.SelectedValue.ToString(), out answ); + return answ; + } + } protected void grView_SelectedIndexChanged(object sender, EventArgs e) { divDetail.Visible = true; + // recupero BatchId selezionato + cmp_batchDetail.BatchId = BatchIdSel; } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs index 68395b3..4bc151a 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs @@ -21,6 +21,15 @@ namespace NKC_WF.WebUserControls { /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDetail; + /// + /// Controllo cmp_batchDetail. + /// + /// + /// 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_batchDetail cmp_batchDetail; + /// /// Controllo grView. ///