diff --git a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
index f4ef48fe..a48c6749 100644
--- a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.cs
@@ -160,6 +160,7 @@ namespace MP_MAG.WebUserControls
grView.DataBind();
}
+#if false
///
/// Avvia stampa report pedana
///
@@ -170,6 +171,7 @@ namespace MP_MAG.WebUserControls
// lancio il report x l'elenco pedane + contenuto
MagDataLayerObj.taPJQ.insertQuery($"{tipoDocumento.docPackList}", $"{PackListID}", ddlPost.SelectedValue);
}
+#endif
///
/// comando reset
@@ -213,6 +215,8 @@ 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();
diff --git a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
index 6932d038..2881a1bd 100644
--- a/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
+++ b/MP-MAG/WebUserControls/cmp_elencoPedane.ascx.designer.cs
@@ -41,15 +41,6 @@ namespace MP_MAG.WebUserControls
///
protected global::System.Web.UI.WebControls.LinkButton lbtSetCompleted;
- ///
- /// Controllo lbtPrintReport.
- ///
- ///
- /// 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.LinkButton lbtPrintReport;
-
///
/// Controllo divAddNew.
///
@@ -131,24 +122,6 @@ namespace MP_MAG.WebUserControls
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsPedaneSingle;
- ///
- /// Controllo ddlPost.
- ///
- ///
- /// 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.DropDownList ddlPost;
-
- ///
- /// Controllo odsPedaneList.
- ///
- ///
- /// 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 odsPedaneList;
-
///
/// Controllo cmp_numRow.
///
diff --git a/MP-MAG/WebUserControls/cmp_listODL.ascx.cs b/MP-MAG/WebUserControls/cmp_listODL.ascx.cs
index e0aa619d..e61ea12e 100644
--- a/MP-MAG/WebUserControls/cmp_listODL.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_listODL.ascx.cs
@@ -10,14 +10,19 @@ namespace MP_MAG.WebUserControls
{
public partial class cmp_listODL : BaseUserControl
{
- protected void Page_Load(object sender, EventArgs e)
+ #region Private Methods
+
+ private void resetSelezione()
{
- if (!Page.IsPostBack)
- {
- grView.PageSize = 5;
- }
+ grView.SelectedIndex = -1;
+ grView.DataBind();
+ raiseReset();
}
+ #endregion Private Methods
+
+ #region Protected Methods
+
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// recupero ODL
@@ -28,7 +33,11 @@ namespace MP_MAG.WebUserControls
// salvo in cookie i dati idxODL, idxMacchina e QtaUdc x successivo impiego
string IdxMacchina = ddlMacchina.SelectedValue;
- int QtaUdc = 1; // default...
+ int QtaUdc = QtaUdcByOdl(IdxODL);
+ if (QtaUdc <= 0)
+ {
+ QtaUdc = 100;
+ }
bool isFinito = false;
string ArtCod = "";
string ArtDesc = "";
@@ -76,8 +85,8 @@ namespace MP_MAG.WebUserControls
string tgtPage = "printCartOdl";
Response.Redirect($"~/SMART/{tgtPage}");
}
-
}
+
///
/// comando reset
///
@@ -87,11 +96,34 @@ namespace MP_MAG.WebUserControls
{
resetSelezione();
}
- private void resetSelezione()
+
+ protected void Page_Load(object sender, EventArgs e)
{
- grView.SelectedIndex = -1;
- grView.DataBind();
- raiseReset();
+ if (!Page.IsPostBack)
+ {
+ grView.PageSize = 5;
+ }
}
+
+ protected int QtaUdcByOdl(int idxOdl)
+ {
+ int answ = 1;
+ string codGrp = "IMB";
+ string codVal = "NUM_PZ_CONT";
+ // recupero dato da scheda tecnica della quantità per UDC
+ var tabSTAR = DataLayerObj.taSTAR.getByGrpOdlLbl(codGrp, codVal, idxOdl);
+ if (tabSTAR.Rows.Count > 0)
+ {
+ try
+ {
+ int.TryParse(tabSTAR[0].Value, out answ);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ #endregion Protected Methods
}
}
\ No newline at end of file
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx b/MP-MAG/WebUserControls/cmp_packList.ascx
index 1f3feb18..49f929a8 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx
@@ -3,7 +3,7 @@
<%@ Register Src="~/WebUserControls/cmp_OrderList.ascx" TagPrefix="uc1" TagName="cmp_OrderList" %>
-
+
BOZZA
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx.cs b/MP-MAG/WebUserControls/cmp_packList.ascx.cs
index 70130d03..a89f830a 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx.cs
@@ -43,32 +43,34 @@ namespace MP_MAG.WebUserControls
private void showAction(bool showAction)
{
- divAction.Visible = showAction;
// calcolo cosa mostro da status corrente
var tabPackList = MagData.MagDataLayer.man.taPList.getByKey(PackListID);
- lbtSetDraft.Visible = false;
- lbtSetRequest.Visible = false;
- lbtSendPack.Visible = false;
- if (tabPackList != null && tabPackList.Count > 0)
+ lbtSendPack.CssClass = "btn btn-block btn-outline-secondary disabled";
+ lbtSetDraft.CssClass = "btn btn-block btn-outline-secondary disabled";
+ lbtSetRequest.CssClass = "btn btn-block btn-outline-secondary disabled";
+ if (showAction)
{
- int currStatus = tabPackList[0].PackStatus;
- switch (currStatus)
+ if (tabPackList != null && tabPackList.Count > 0)
{
- case 0:
- lbtSetRequest.Visible = true;
- break;
+ int currStatus = tabPackList[0].PackStatus;
+ switch (currStatus)
+ {
+ case 0:
+ lbtSetRequest.CssClass = "btn btn-block btn-success";
+ break;
- case 1:
- lbtSetDraft.Visible = true;
- break;
+ case 1:
+ lbtSetDraft.CssClass = "btn btn-block btn-info";
+ break;
- case 3:
- lbtSetRequest.Visible = true;
- lbtSendPack.Visible = true;
- break;
+ case 3:
+ lbtSetDraft.CssClass = "btn btn-block btn-info";
+ lbtSendPack.CssClass = "btn btn-block btn-warning";
+ break;
- default:
- break;
+ default:
+ break;
+ }
}
}
}
diff --git a/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
index 09cc342e..d7513b02 100644
--- a/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
+++ b/MP-MAG/WebUserControls/cmp_packList.ascx.designer.cs
@@ -14,15 +14,6 @@ namespace MP_MAG.WebUserControls
public partial class cmp_packList
{
- ///
- /// Controllo divAction.
- ///
- ///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAction;
-
///
/// Controllo lbtSetDraft.
///
diff --git a/MP-MAG/WebUserControls/cmp_packListMgmt.ascx.cs b/MP-MAG/WebUserControls/cmp_packListMgmt.ascx.cs
index 697755eb..878d1ac2 100644
--- a/MP-MAG/WebUserControls/cmp_packListMgmt.ascx.cs
+++ b/MP-MAG/WebUserControls/cmp_packListMgmt.ascx.cs
@@ -63,6 +63,8 @@ namespace MP_MAG.WebUserControls
{
cmp_packListNew.CodCliente = ddlElencoCli.SelectedValue;
cmp_packList.CodCliente = ddlElencoCli.SelectedValue;
+ cmp_packList.resetSelezione();
+ cmp_OrderList.Visible = false;
}
protected void lbtAddNew_Click(object sender, EventArgs e)
diff --git a/MP-MAG/WebUserControls/cmp_packListNew.ascx b/MP-MAG/WebUserControls/cmp_packListNew.ascx
index 21998c84..23939d3e 100644
--- a/MP-MAG/WebUserControls/cmp_packListNew.ascx
+++ b/MP-MAG/WebUserControls/cmp_packListNew.ascx
@@ -5,10 +5,10 @@
Creazione Packing List