diff --git a/Jenkinsfile b/Jenkinsfile
index 9fea8194..8a8a0c0f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,7 +17,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
- withEnv(['NEXT_BUILD_NUMBER=820']) {
+ withEnv(['NEXT_BUILD_NUMBER=822']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx b/MP-Admin/WebUserControls/mod_gestPromODL.ascx
index 4a0fa6c0..f678f6c7 100644
--- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx
+++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx
@@ -47,11 +47,9 @@
-
-
-
-
+
+
+
@@ -118,8 +116,8 @@
-
-
+
+
diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs
index 306e4f25..71386ca4 100644
--- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs
+++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs
@@ -46,6 +46,16 @@ namespace MoonProAdmin.WebUserControls
{
resetSelezione();
}
+
+ ///
+ /// salvo comando
+ ///
+ ///
+ ///
+ protected void lbt_Command(object sender, CommandEventArgs e)
+ {
+ SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument);
+ }
///
/// gestione cambio selezione valore
///
@@ -54,14 +64,39 @@ namespace MoonProAdmin.WebUserControls
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo in session il valore selezionato...
- SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
- // mostro edit quantità...
- divEditQta.Visible = true;
- btnNewPromOdl.Visible = true;
- mod_newPromessaODL.Visible = false;
- var riga = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0];
- numPz = riga.NumPezzi;
- pzPallet = riga.PzPallet;
+ memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
+ bool doClone = false;
+ // gestione buttons richieste
+ string _comando = "";
+ if (memLayer.ML.isInSessionObject("nextObjCommand"))
+ {
+ _comando = memLayer.ML.StringSessionObj("nextObjCommand");
+ memLayer.ML.emptySessionVal("nextObjCommand");
+ }
+ switch (_comando)
+ {
+ case "Clona":
+ doClone = true;
+ break;
+ default:
+ break;
+ }
+ if (doClone)
+ {
+ memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false);
+ showAddNewPODL();
+ mod_newPromessaODL.doSelPODL();
+ }
+ else
+ {
+ // mostro edit quantità...
+ divEditQta.Visible = true;
+ btnNewPromOdl.Visible = true;
+ mod_newPromessaODL.Visible = false;
+ var riga = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0];
+ numPz = riga.NumPezzi;
+ pzPallet = riga.PzPallet;
+ }
}
///
/// traduce gli header delle colonne
@@ -275,6 +310,11 @@ namespace MoonProAdmin.WebUserControls
///
///
protected void btnNewPromOdl_Click(object sender, EventArgs e)
+ {
+ showAddNewPODL();
+ }
+
+ private void showAddNewPODL()
{
// mostro controllo creazione ODL
mod_newPromessaODL.Visible = true;
@@ -283,6 +323,7 @@ namespace MoonProAdmin.WebUserControls
grView.SelectedIndex = -1;
grView.DataBind();
}
+
///
/// formatot url x stampa ODL
///
diff --git a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx
index d30f33f1..ffa67507 100644
--- a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx
+++ b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx
@@ -73,7 +73,7 @@
Commessa / Ordine Ext
@@ -117,7 +117,6 @@
-
@@ -144,11 +143,6 @@
- <%--
-
-
-
- --%>
@@ -169,7 +163,6 @@
- <%--
--%>
diff --git a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.cs b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.cs
index 2837e633..7ad15feb 100644
--- a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.cs
+++ b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.cs
@@ -1,4 +1,5 @@
-using SteamWare;
+using MapoDb;
+using SteamWare;
using System;
using System.Web.UI;
@@ -13,6 +14,42 @@ namespace MoonProAdmin.WebUserControls
setDefaults();
}
}
+ public void doSelPODL()
+ {
+ // se ho una promessa da clonare copio dati da quella...
+ if (memLayer.ML.isInSessionObject("idxProm2Clone"))
+ {
+ int idxProm = memLayer.ML.IntSessionObj("idxProm2Clone");
+ var tPODL = DataLayer.obj.taPODL.getByKey(idxProm);
+ if (tPODL.Rows.Count > 0)
+ {
+ var rPODL = tPODL[0];
+ txtSearch.Text = rPODL.CodArticolo;
+ ddlArticolo.DataBind();
+ txtNumPz.Text = rPODL.NumPezzi.ToString();
+ txtPzPallet.Text = rPODL.PzPallet.ToString();
+ txtPrio.Text = rPODL.Priorita.ToString();
+ int min = 0;
+ int sec = 0;
+ string TC_MinSec = "";
+ try
+ {
+ // cerco di convertire in min/sec
+ min = Convert.ToInt32(Math.Floor(Convert.ToDouble(rPODL.TCAssegnato)));
+ sec = Convert.ToInt32((Convert.ToDouble(rPODL.TCAssegnato) - min) * 60);
+ TC_MinSec = string.Format("{0}:{1:00}", min, sec);
+ }
+ catch
+ { }
+ txtTC.Text = TC_MinSec;
+ ddlGruppi.SelectedValue = rPODL.CodGruppo;
+ ddlMacchine.SelectedValue = rPODL.IdxMacchina;
+ txtKeyExt.Text = rPODL.KeyRichiesta;
+ // svuoto...
+ memLayer.ML.emptySessionVal("idxProm2Clone");
+ }
+ }
+ }
private void setDefaults()
{
@@ -60,7 +97,7 @@ namespace MoonProAdmin.WebUserControls
CodArticolo = ddlArticolo.SelectedValue;
Gruppo = ddlGruppi.SelectedValue;
IdxMacchina = ddlMacchine.SelectedValue;
- KeyReq = txKeyExt.Text.Trim();
+ KeyReq = txtKeyExt.Text.Trim();
//IdxMacchina = txtMacchina.Text.Trim();
// se IdxMacchina è vuoto metto null...
if (IdxMacchina == "")
diff --git a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.designer.cs b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.designer.cs
index d8699cb8..33c76535 100644
--- a/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.designer.cs
+++ b/MP-Admin/WebUserControls/mod_newPromessaODL.ascx.designer.cs
@@ -94,13 +94,13 @@ namespace MoonProAdmin.WebUserControls {
protected global::System.Web.UI.WebControls.TextBox txtTC;
///
- /// Controllo txKeyExt.
+ /// Controllo txtKeyExt.
///
///
/// 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.TextBox txKeyExt;
+ protected global::System.Web.UI.WebControls.TextBox txtKeyExt;
///
/// Controllo txtPrio.