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
- INIZIA + Richiesta
- Spedibile + Iniziata
+ 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.