diff --git a/MP-MAG/SMART/gestPedane.aspx.cs b/MP-MAG/SMART/gestPedane.aspx.cs
index 0ba2cd4b..2bddaca6 100644
--- a/MP-MAG/SMART/gestPedane.aspx.cs
+++ b/MP-MAG/SMART/gestPedane.aspx.cs
@@ -83,6 +83,7 @@ namespace MP_MAG.SMART
{
// scambio visualizzazione e selezione...
showDetail = !showDetail;
+ ddlElencoPL.DataBind();
fixDisplay();
}
diff --git a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx
index 48832874..d797f704 100644
--- a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx
+++ b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx
@@ -11,12 +11,13 @@
Nuova Pedana
+
Spedibile
<%--
REPORT Dettaglio --%>
@@ -34,7 +35,7 @@
-
+
@@ -57,9 +58,9 @@
+
-
<%----%>
diff --git a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
index 47761dc9..25b61d04 100644
--- a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
@@ -55,7 +55,7 @@ namespace MP_MAG.WebUserControls
{
hfPackListID.Value = $"{value}";
doUpdate();
- checkBtn();
+ checkStatus();
}
}
@@ -63,19 +63,33 @@ namespace MP_MAG.WebUserControls
#region Private Methods
- private void checkBtn()
+ private void checkStatus()
{
// verifica buttons secondo stato PackList...
var tabPL = MagDataLayerObj.taPList.getByKey(PackListID);
- bool showStart = false;
- bool showEnd = false;
- if (tabPL.Rows.Count > 0)
+ lblStatus01.Visible = false;
+ lblStatus02.Visible = false;
+ lblStatus03.Visible = false;
+ if (tabPL != null && tabPL.Rows.Count > 0)
{
- showStart = (tabPL[0].PackStatus == 1);
- showEnd = (tabPL[0].PackStatus == 2);
+ switch (tabPL[0].PackStatus)
+ {
+ case 1:
+ lblStatus01.Visible = true;
+ break;
+
+ case 2:
+ lblStatus02.Visible = true;
+ break;
+
+ case 3:
+ lblStatus03.Visible = true;
+ break;
+
+ default:
+ break;
+ }
}
- lbtSetStarted.Visible = showStart;
- lbtSetCompleted.Visible = showEnd;
}
private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e)
@@ -195,9 +209,12 @@ namespace MP_MAG.WebUserControls
MagDataLayer.man.taEAL.insertQuery(DateTime.Today, "PED", currCodOpr, txtDescr.Text.Trim(), PackListID, TaraAL);
// nascondo add...
toggleAddNew();
+#if false
// aggiorno packList a iniziata...
MagDataLayerObj.taPList.updateStatus(PackListID, 2);
- checkBtn();
+
+#endif
+ checkStatus();
// update!!!
grView.DataBind();
}
@@ -225,20 +242,6 @@ namespace MP_MAG.WebUserControls
resetSelezione();
}
- protected void lbtSetCompleted_Click(object sender, EventArgs e)
- {
- MagDataLayerObj.taPList.updateStatus(PackListID, 3);
- checkBtn();
- resetSelezione();
- }
-
- protected void lbtSetStarted_Click(object sender, EventArgs e)
- {
- MagDataLayerObj.taPList.updateStatus(PackListID, 2);
- checkBtn();
- resetSelezione();
- }
-
///
/// Mostra btn add new
///
@@ -262,11 +265,9 @@ namespace MP_MAG.WebUserControls
grView.PageSize = cmp_numRow.numRow;
divAddNew.Visible = false;
lastCmd = "";
- lbtSetStarted.DataBind();
- lbtSetCompleted.DataBind();
}
cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh;
- checkBtn();
+ checkStatus();
}
#endregion Protected Methods
diff --git a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
index b7eaa7ef..53c60899 100644
--- a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
+++ b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
@@ -24,22 +24,31 @@ namespace MP_MAG.WebUserControls
protected global::System.Web.UI.WebControls.LinkButton lbtShowAdd;
///
- /// lbtSetStarted control.
+ /// lblStatus01 control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.LinkButton lbtSetStarted;
+ protected global::System.Web.UI.WebControls.Label lblStatus01;
///
- /// lbtSetCompleted control.
+ /// lblStatus02 control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.LinkButton lbtSetCompleted;
+ protected global::System.Web.UI.WebControls.Label lblStatus02;
+
+ ///
+ /// lblStatus03 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblStatus03;
///
/// divAddNew control.
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx b/MP-MAG/WebUserControls/cmp_packList.ascx
index 5b6ed325..7f7e7f39 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx
@@ -12,9 +12,10 @@
Invia RICHIESTA
-
Trasferisci
+
Trasferisci
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx.cs b/MP-MAG/WebUserControls/cmp_packList.ascx.cs
index b18a4f1f..965fcd81 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx.cs
@@ -47,6 +47,7 @@ namespace MP_MAG.WebUserControls
var tabPackList = MagData.MagDataLayer.man.taPList.getByKey(PackListID);
lbtSendPack.CssClass = "btn btn-block btn-outline-secondary disabled";
lbtSetDraft.CssClass = "btn btn-block btn-outline-secondary disabled";
+ lbtSplitSped.CssClass = "btn btn-block btn-outline-secondary disabled";
lbtSetRequest.CssClass = "btn btn-block btn-outline-secondary disabled";
if (showAction)
{
@@ -63,6 +64,11 @@ namespace MP_MAG.WebUserControls
lbtSetDraft.CssClass = "btn btn-block btn-info";
break;
+ case 2:
+ lbtSetDraft.CssClass = "btn btn-block btn-info";
+ lbtSplitSped.CssClass = "btn btn-block btn-warning";
+ break;
+
case 3:
lbtSetDraft.CssClass = "btn btn-block btn-info";
lbtSendPack.CssClass = "btn btn-block btn-warning";
@@ -127,6 +133,13 @@ namespace MP_MAG.WebUserControls
resetSelezione();
}
+ protected void lbtSplitSped_Click(object sender, EventArgs e)
+ {
+ MagData.MagDataLayer.man.taPList.splitLoaded(PackListID);
+ showAction(false);
+ resetSelezione();
+ }
+
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
index d7513b02..94ce7112 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-//
-// Codice generato da uno strumento.
+//
+// This code was generated by a tool.
//
-// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
-// il codice viene rigenerato.
-//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
//------------------------------------------------------------------------------
namespace MP_MAG.WebUserControls
@@ -15,65 +15,74 @@ namespace MP_MAG.WebUserControls
{
///
- /// Controllo lbtSetDraft.
+ /// lbtSetDraft control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.LinkButton lbtSetDraft;
///
- /// Controllo lbtSetRequest.
+ /// lbtSetRequest control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.LinkButton lbtSetRequest;
///
- /// Controllo lbtSendPack.
+ /// lbtSplitSped control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtSplitSped;
+
+ ///
+ /// lbtSendPack control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.LinkButton lbtSendPack;
///
- /// Controllo grView.
+ /// grView control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.GridView grView;
///
- /// Controllo ods.
+ /// ods control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
///
- /// Controllo hfCodCli.
+ /// hfCodCli control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.HiddenField hfCodCli;
///
- /// Controllo hfMaxStatus.
+ /// hfMaxStatus control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.HiddenField hfMaxStatus;
}
diff --git a/MagData/DS_PackList.Designer.cs b/MagData/DS_PackList.Designer.cs
index 7c14d137..06f96967 100644
--- a/MagData/DS_PackList.Designer.cs
+++ b/MagData/DS_PackList.Designer.cs
@@ -2415,7 +2415,7 @@ namespace MagData.DS_PackListTableAdapters {
[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[7];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT PackListID, PackDescr, ModDate, CodCliente, DescCliente, PackStatus, DescS" +
@@ -2449,17 +2449,23 @@ namespace MagData.DS_PackListTableAdapters {
this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 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_PackList_transfer";
+ this._commandCollection[5].CommandText = "dbo.stp_PackList_splitLoaded";
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("@PackListID", 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_PackList_updateStatus";
+ this._commandCollection[6].CommandText = "dbo.stp_PackList_transfer";
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("@PackListID", 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, "", "", ""));
+ this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[7].Connection = this.Connection;
+ this._commandCollection[7].CommandText = "dbo.stp_PackList_updateStatus";
+ this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PackListID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[7].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()]
@@ -2591,7 +2597,7 @@ namespace MagData.DS_PackListTableAdapters {
[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 transfer(global::System.Nullable PackListID) {
+ public virtual int splitLoaded(global::System.Nullable PackListID) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
if ((PackListID.HasValue == true)) {
command.Parameters[1].Value = ((int)(PackListID.Value));
@@ -2619,7 +2625,7 @@ namespace MagData.DS_PackListTableAdapters {
[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 updateStatus(global::System.Nullable PackListID, global::System.Nullable Status) {
+ public virtual int transfer(global::System.Nullable PackListID) {
global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
if ((PackListID.HasValue == true)) {
command.Parameters[1].Value = ((int)(PackListID.Value));
@@ -2627,6 +2633,34 @@ namespace MagData.DS_PackListTableAdapters {
else {
command.Parameters[1].Value = global::System.DBNull.Value;
}
+ 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 updateStatus(global::System.Nullable PackListID, global::System.Nullable Status) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
+ if ((PackListID.HasValue == true)) {
+ command.Parameters[1].Value = ((int)(PackListID.Value));
+ }
+ else {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
if ((Status.HasValue == true)) {
command.Parameters[2].Value = ((int)(Status.Value));
}
diff --git a/MagData/DS_PackList.xsd b/MagData/DS_PackList.xsd
index 399d3ac0..df35632f 100644
--- a/MagData/DS_PackList.xsd
+++ b/MagData/DS_PackList.xsd
@@ -76,6 +76,17 @@
+
+
+
+ dbo.stp_PackList_splitLoaded
+
+
+
+
+
+
+
@@ -256,7 +267,7 @@
-
+
@@ -295,7 +306,7 @@
-
+
@@ -334,7 +345,7 @@
-
+