From 39f6b536c19450d2a43279b6704625e486f5fd5c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 5 Jan 2021 15:00:20 +0100 Subject: [PATCH] completata gestione editing COPY/PASTE x Scheda Tecn ADM --- Jenkinsfile | 2 +- MP-ADM/WebUserControls/cmp_ST_preview.ascx | 2 +- MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs | 21 +++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a9da4fe..65cfd5da 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=1358']) { + withEnv(['NEXT_BUILD_NUMBER=1359']) { // env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.12.${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-ADM/WebUserControls/cmp_ST_preview.ascx b/MP-ADM/WebUserControls/cmp_ST_preview.ascx index 9d1b29a6..ea283621 100644 --- a/MP-ADM/WebUserControls/cmp_ST_preview.ascx +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx @@ -8,7 +8,7 @@

Scheda Tecnica Articolo

- + PASTE
diff --git a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs index aa283e50..15c84f6c 100644 --- a/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_ST_preview.ascx.cs @@ -46,6 +46,7 @@ namespace MP_ADM.WebUserControls { hfIdxST.Value = $"{value}"; repGroup.DataBind(); + checkClipboard(); } } @@ -55,8 +56,14 @@ namespace MP_ADM.WebUserControls private void checkClipboard() { + // Tabella ST selezionata + var tabCurrSTAR = DataLayerObj.taSTAR.getByST(IdxST); bool showPaste = false; - // verifico ci sia qualcosa + bool checkSource = false; + bool checkDest = false; + // verifico condizioni COPY + lbtCopy.Visible = (tabCurrSTAR.Rows.Count > 0); + // verifico condizioni PASTE if (!string.IsNullOrEmpty(clipboard)) { // verifico sia tipo clipboard valida @@ -65,13 +72,19 @@ namespace MP_ADM.WebUserControls //verifico sia intero valido if (clipbIdxST > 0) { - // verifico SIA una ST esistente... - var tabSTA = DataLayerObj.taSTA.getByKey(clipbIdxST); - showPaste = (tabSTA.Rows.Count > 0); + // verifico le condizioni: si parte da una una ST esistente... + var tabSrcSTA = DataLayerObj.taSTA.getByKey(clipbIdxST); + checkSource = tabSrcSTA.Rows.Count > 0; + checkDest = tabCurrSTAR.Rows.Count == 0; + // verifica status visibilità x PASTE + showPaste = checkSource && checkDest; } } } + // verifica x stile copy + lbtCopy.CssClass = checkSource ? "btn btn-block btn-light" : "btn btn-block btn-outline-light"; lbtPaste.Visible = showPaste; + lbtPaste.DataBind(); } #endregion Private Methods