From c2e7a88efe6e068edf4e006723829b8d3ce925df Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:45:31 +0200 Subject: [PATCH 1/6] new rel --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4447488..e9b96d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=338']) { + withEnv(['NEXT_BUILD_NUMBER=339']) { // env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.versionNumberBeta = VersionNumber(versionNumberString : '1.1.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2019-07-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') From 7ebf251427298282ad1e574c170bd2643384ebf4 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:46:00 +0200 Subject: [PATCH 2/6] Fix gestione errori da OfflineOrder in risp --- NKC_SDK/Objects.cs | 26 ----------------------- NKC_WF/BaseUserControl.cs | 11 ++++++++++ NKC_WF/Controllers/BatchProcController.cs | 19 ++++++++++++----- 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/NKC_SDK/Objects.cs b/NKC_SDK/Objects.cs index 509f224..13d1a6e 100644 --- a/NKC_SDK/Objects.cs +++ b/NKC_SDK/Objects.cs @@ -409,32 +409,6 @@ namespace NKC_SDK /// Path x folder dei vari SVG offline order da mostrare /// public string DrawingPath { get; set; } = ""; -#if false - /// - /// ID dell'ordine offlien da processare - /// - public string OffOrderID { get; set; } = ""; - - /// - /// Num di fogli nello stack - /// - public int NumSheet - { - get - { - int answ = 0; - if (SheetList != null) - { - answ = SheetList.Count; - } - return answ; - } - } - /// - /// Elenco Sheet previsti - /// - public List SheetList { get; set; } -#endif } /// /// Oggetto errore da poter rispondere con chiamate x stima/nesting diff --git a/NKC_WF/BaseUserControl.cs b/NKC_WF/BaseUserControl.cs index d1acd09..3af62a6 100644 --- a/NKC_WF/BaseUserControl.cs +++ b/NKC_WF/BaseUserControl.cs @@ -152,5 +152,16 @@ namespace NKC_WF } return answ; } + /// + /// Converte obja intero + /// + /// + /// + public int obj2int(object valore) + { + int answ = 0; + int.TryParse(valore.ToString(), out answ); + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/Controllers/BatchProcController.cs b/NKC_WF/Controllers/BatchProcController.cs index 2012476..fb645ec 100644 --- a/NKC_WF/Controllers/BatchProcController.cs +++ b/NKC_WF/Controllers/BatchProcController.cs @@ -293,11 +293,20 @@ namespace NKC_WF.Controllers } else { - string nestBasePath = memLayer.ML.CRS("nestBasePath").ToLower(); - string servBasePath = memLayer.ML.CRS("servBasePath").ToLower(); - string fixPath = rispNest.DrawingPath.ToLower().Replace(nestBasePath, servBasePath); - // segno offline order come processato registrando il disegno e segno ogni PART come lavorata da OffOrd2Item (status 992) - DataLayer.man.taOffOL.updateDrawing(Math.Abs(rispNest.BatchID), fixPath); + // verifica PRELIMINARE se fosse in stato errore... + if (rispNest.ProcessStatus == procStatus.error) + { + // status -1 --> ERRORE!!! + DataLayer.man.taOffOL.updateStatus(Math.Abs(rispNest.BatchID), -1); + } + else + { + string nestBasePath = memLayer.ML.CRS("nestBasePath").ToLower(); + string servBasePath = memLayer.ML.CRS("servBasePath").ToLower(); + string fixPath = rispNest.DrawingPath.ToLower().Replace(nestBasePath, servBasePath); + // segno offline order come processato registrando il disegno e segno ogni PART come lavorata da OffOrd2Item (status 992) + DataLayer.man.taOffOL.updateDrawing(Math.Abs(rispNest.BatchID), fixPath); + } } } } From e397f62c0ca409429e2a6b2d56fe092a81a6acb2 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:46:16 +0200 Subject: [PATCH 3/6] fix visualizzazione send to offline order --- NKC_WF/WebUserControls/cmp_offOrderDetail.ascx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx index 736fbfc..94f1368 100644 --- a/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_offOrderDetail.ascx @@ -21,7 +21,7 @@
- <%: traduci ("MakeCncProg") %> + <%: traduci ("MakeCncProg") %>
<%-- PRINT LABELS--%> From 999027e40e25e1a8b44c4d14b896074df5eb8399 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:46:31 +0200 Subject: [PATCH 4/6] nuove pag x errori --- NKC_WF/ErrorPages/404.aspx | 7 ++ NKC_WF/ErrorPages/404.aspx.cs | 22 +++++ .../404.aspx.designer.cs} | 17 +--- NKC_WF/ErrorPages/Oops.aspx | 16 +--- NKC_WF/ErrorPages/Oops.aspx.cs | 16 +++- NKC_WF/ErrorPages/Oops.aspx.designer.cs | 31 +++--- NKC_WF/WebUserControls/cmp_errorDetail.ascx | 44 +++++++++ .../WebUserControls/cmp_errorDetail.ascx.cs | 96 +++++++++++++++++++ .../cmp_errorDetail.ascx.designer.cs | 71 ++++++++++++++ NKC_WF/site/ErrorPage.aspx | 37 ------- NKC_WF/site/ErrorPage.aspx.cs | 49 ---------- 11 files changed, 273 insertions(+), 133 deletions(-) create mode 100644 NKC_WF/ErrorPages/404.aspx create mode 100644 NKC_WF/ErrorPages/404.aspx.cs rename NKC_WF/{site/ErrorPage.aspx.designer.cs => ErrorPages/404.aspx.designer.cs} (55%) create mode 100644 NKC_WF/WebUserControls/cmp_errorDetail.ascx create mode 100644 NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs delete mode 100644 NKC_WF/site/ErrorPage.aspx delete mode 100644 NKC_WF/site/ErrorPage.aspx.cs diff --git a/NKC_WF/ErrorPages/404.aspx b/NKC_WF/ErrorPages/404.aspx new file mode 100644 index 0000000..8988f9e --- /dev/null +++ b/NKC_WF/ErrorPages/404.aspx @@ -0,0 +1,7 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="404.aspx.cs" Inherits="NKC_WF.ErrorPages._404" %> + +<%@ Register Src="~/WebUserControls/cmp_errorDetail.ascx" TagPrefix="uc1" TagName="cmp_errorDetail" %> + + + + diff --git a/NKC_WF/ErrorPages/404.aspx.cs b/NKC_WF/ErrorPages/404.aspx.cs new file mode 100644 index 0000000..297410a --- /dev/null +++ b/NKC_WF/ErrorPages/404.aspx.cs @@ -0,0 +1,22 @@ +using SteamWare; +using System; +using System.Threading; + +namespace NKC_WF.ErrorPages +{ + public partial class _404 : BasePage + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + var thisMaster = ((SiteContent)this.Master); + thisMaster.showSearch = false; + thisMaster.enableAnonym = true; + } + cmp_errorDetail.ErrorTitle = traduci("Err_404"); + cmp_errorDetail.ErrorExpl = traduci("Err404Expl"); + cmp_errorDetail.UserName = string.IsNullOrEmpty(User.Identity.Name) ? "N.A." : User.Identity.Name; + } + } +} \ No newline at end of file diff --git a/NKC_WF/site/ErrorPage.aspx.designer.cs b/NKC_WF/ErrorPages/404.aspx.designer.cs similarity index 55% rename from NKC_WF/site/ErrorPage.aspx.designer.cs rename to NKC_WF/ErrorPages/404.aspx.designer.cs index 9c15c65..25f6fcc 100644 --- a/NKC_WF/site/ErrorPage.aspx.designer.cs +++ b/NKC_WF/ErrorPages/404.aspx.designer.cs @@ -7,29 +7,20 @@ // //------------------------------------------------------------------------------ -namespace NKC_WF.site +namespace NKC_WF.ErrorPages { - public partial class ErrorPage + public partial class _404 { /// - /// Controllo lbtTryReset. + /// Controllo cmp_errorDetail. /// /// /// 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 lbtTryReset; - - /// - /// Controllo UpdateProgressDisplay. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay; + protected global::NKC_WF.WebUserControls.cmp_errorDetail cmp_errorDetail; } } diff --git a/NKC_WF/ErrorPages/Oops.aspx b/NKC_WF/ErrorPages/Oops.aspx index 9a8c877..52fde7c 100644 --- a/NKC_WF/ErrorPages/Oops.aspx +++ b/NKC_WF/ErrorPages/Oops.aspx @@ -1,14 +1,8 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="Oops.aspx.cs" Inherits="NKC_WF.ErrorPages.Oops" %> - -
-
-
-

Error raised

- Return to home page - Error log recorded
- developer detailed information about errors here. -
-
-
+<%@ Register Src="~/WebUserControls/cmp_errorDetail.ascx" TagPrefix="uc1" TagName="cmp_errorDetail" %> + + + + diff --git a/NKC_WF/ErrorPages/Oops.aspx.cs b/NKC_WF/ErrorPages/Oops.aspx.cs index f03fb9e..c9ea589 100644 --- a/NKC_WF/ErrorPages/Oops.aspx.cs +++ b/NKC_WF/ErrorPages/Oops.aspx.cs @@ -1,12 +1,22 @@ -using System; +using SteamWare; +using System; +using System.Threading; namespace NKC_WF.ErrorPages { - public partial class Oops : System.Web.UI.Page + public partial class Oops : BasePage { protected void Page_Load(object sender, EventArgs e) { - + if(!Page.IsPostBack) + { + var thisMaster = ((SiteContent)this.Master); + thisMaster.showSearch = false; + thisMaster.enableAnonym = true; + } + cmp_errorDetail.ErrorTitle = traduci("SomeErrorOccurred"); + cmp_errorDetail.ErrorExpl = string.IsNullOrEmpty(memLayer.ML.QSS("aspxerrorpath"))?"N.A.": traduci(memLayer.ML.QSS("aspxerrorpath")); + cmp_errorDetail.UserName = string.IsNullOrEmpty(User.Identity.Name) ? "N.A." : User.Identity.Name; } } } \ No newline at end of file diff --git a/NKC_WF/ErrorPages/Oops.aspx.designer.cs b/NKC_WF/ErrorPages/Oops.aspx.designer.cs index aa88583..23de660 100644 --- a/NKC_WF/ErrorPages/Oops.aspx.designer.cs +++ b/NKC_WF/ErrorPages/Oops.aspx.designer.cs @@ -11,25 +11,16 @@ namespace NKC_WF.ErrorPages { - public partial class Oops - { + public partial class Oops + { - /// - /// Controllo hlDefault. - /// - /// - /// 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.HyperLink hlDefault; - - /// - /// Controllo hlElmah. - /// - /// - /// 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.HyperLink hlElmah; - } + /// + /// Controllo cmp_errorDetail. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_errorDetail cmp_errorDetail; + } } diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx b/NKC_WF/WebUserControls/cmp_errorDetail.ascx new file mode 100644 index 0000000..ac95e02 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx @@ -0,0 +1,44 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_errorDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_errorDetail" %> +
+

<%: traduci("ErrorPage") %>

+
+
+
+

+

+ +
+
+
+
+ Error log recorded
+ detailed info + (server access only). +
+
+ <%: traduci("TryReset") %> +
+
+ + +
+ <%: traduci("TaskRunning") %> +
+
+
+
+
+
+ +
diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs new file mode 100644 index 0000000..47c165d --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.cs @@ -0,0 +1,96 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_errorDetail : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + public string ErrorTitle + { + get + { + return lblErrorTitle.Text; + } + set + { + lblErrorTitle.Text = value; + } + } + public string ErrorExpl + { + get + { + return lblErrorExpl.Text; + } + set + { + lblErrorExpl.Text = value; + } + } + + public string LastError + { + get + { + string answ = "N.A."; + if (!string.IsNullOrEmpty(memLayer.ML.QSS("aspxerrorpath"))) + { + answ = traduci(memLayer.ML.QSS("aspxerrorpath")); + } + return answ; + } + } + public string LastErrorCode + { + get + { + string answ = "N.A."; + if (!string.IsNullOrEmpty(memLayer.ML.QSS("aspxerrorpath"))) + { + answ = memLayer.ML.QSS("aspxerrorpath"); + } + return answ; + } + } + + public string UserName + { + get + { + return lblUserName.Text; + } + set + { + lblUserName.Text = value; + } + } + + protected void lbtTryReset_Click(object sender, EventArgs e) + { + // aggiorno vocabolario + DataWrap.DW.resetVocabolario(); + // reset dati in cache x DbConfig... + memLayer.ML.resetAppConf(); + // svuoto session e cache per rileggere i dati da Db + Session.RemoveAll(); + // ulteriore reset sessione + Session.Clear(); + // attendo... + Thread.Sleep(500); + // reload! + memLayer.ML.setSessionVal("nextPage", "default"); + Response.Redirect("~/default"); + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs new file mode 100644 index 0000000..cfadaa2 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_errorDetail.ascx.designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_errorDetail + { + + /// + /// Controllo lblErrorTitle. + /// + /// + /// 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.Label lblErrorTitle; + + /// + /// Controllo lblErrorExpl. + /// + /// + /// 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.Label lblErrorExpl; + + /// + /// Controllo hlElmah. + /// + /// + /// 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.HyperLink hlElmah; + + /// + /// Controllo lbtTryReset. + /// + /// + /// 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 lbtTryReset; + + /// + /// Controllo UpdateProgressDisplay. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay; + + /// + /// Controllo lblUserName. + /// + /// + /// 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.Label lblUserName; + } +} diff --git a/NKC_WF/site/ErrorPage.aspx b/NKC_WF/site/ErrorPage.aspx deleted file mode 100644 index 5fb6632..0000000 --- a/NKC_WF/site/ErrorPage.aspx +++ /dev/null @@ -1,37 +0,0 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="ErrorPage.aspx.cs" Inherits="NKC_WF.site.ErrorPage" %> - - - -
-

<%: traduci("ErrorPage") %>

-
-
-
- User
- <%: User.Identity.Name %> -
-
- <%:traduci("LastError") %>
- <%: LastError %> -
-
-
-
-
- <%: traduci("TryReset") %> -
-
-
-
- - -
- <%: traduci("TaskRunning") %> -
-
-
-
-
-
-
-
diff --git a/NKC_WF/site/ErrorPage.aspx.cs b/NKC_WF/site/ErrorPage.aspx.cs deleted file mode 100644 index d425736..0000000 --- a/NKC_WF/site/ErrorPage.aspx.cs +++ /dev/null @@ -1,49 +0,0 @@ -using SteamWare; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace NKC_WF.site -{ - public partial class ErrorPage : BasePage - { - protected void Page_Load(object sender, EventArgs e) - { - - } - - public string LastError - { - get - { - string answ = "N.A."; - if (!string.IsNullOrEmpty(memLayer.ML.QSS("LastError"))) - { - answ = traduci(memLayer.ML.QSS("LastError")); - } - return answ; - } - } - - protected void lbtTryReset_Click(object sender, EventArgs e) - { - // aggiorno vocabolario - DataWrap.DW.resetVocabolario(); - // reset dati in cache x DbConfig... - memLayer.ML.resetAppConf(); - // svuoto session e cache per rileggere i dati da Db - Session.RemoveAll(); - // ulteriore reset sessione - Session.Clear(); - // attendo... - Thread.Sleep(500); - // reload! - memLayer.ML.setSessionVal("nextPage", "default"); - Response.Redirect("~/default"); - } - } -} \ No newline at end of file From 40ee85774cf1ff6bdc16849791f3922434490a04 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:46:40 +0200 Subject: [PATCH 5/6] fix top menu x unauth --- NKC_WF/WebUserControls/cmp_menuTop.ascx | 1 + NKC_WF/WebUserControls/cmp_menuTop.ascx.cs | 58 ++++++++++++++----- .../cmp_menuTop.ascx.designer.cs | 9 +++ 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx b/NKC_WF/WebUserControls/cmp_menuTop.ascx index 83bec88..384f508 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx @@ -1,5 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_menuTop.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_menuTop" %> +
private void updateTreeMenu() { - try + // SOLO SE è permesso login anonymous --> nascondo menù! + if (enableAnonym) { - if (string.IsNullOrEmpty(user_std.UtSn.mappaSito)) - { - Response.Redirect("Default", true); - } - XmlMenu.Data = user_std.UtSn.mappaSito; - XmlMenu.XPath = "mainMenu/menu"; - XmlMenu.DataBind(); + menu.Visible = false; } - catch + else { - Response.Redirect("default", true); + try + { + if (string.IsNullOrEmpty(user_std.UtSn.mappaSito)) + { + Response.Redirect("Default", true); + } + XmlMenu.Data = user_std.UtSn.mappaSito; + XmlMenu.XPath = "mainMenu/menu"; + XmlMenu.DataBind(); + } + catch + { + Response.Redirect("default", true); + } } } /// @@ -106,7 +134,11 @@ namespace NKC_WF.WebUserControls /// protected void lbnUpdate_Click(object sender, EventArgs e) { - Response.Redirect("default"); + // SOLO SE non è permesso login anonymous... + if (!enableAnonym) + { + Response.Redirect("default"); + } } protected void lbtSearch_Click(object sender, EventArgs e) { diff --git a/NKC_WF/WebUserControls/cmp_menuTop.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_menuTop.ascx.designer.cs index 7125897..e9763d2 100644 --- a/NKC_WF/WebUserControls/cmp_menuTop.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_menuTop.ascx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls public partial class cmp_menuTop { + /// + /// Controllo hfAnonym. + /// + /// + /// 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.HiddenField hfAnonym; + /// /// Controllo menu. /// From 18ce547bb227afe735bbc8b5f61b0314e2fedab5 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Aug 2020 09:46:49 +0200 Subject: [PATCH 6/6] fix master e login x errori --- NKC_WF/NKC_WF.csproj | 24 ++++++++++++++++-------- NKC_WF/Site.Master.cs | 16 +++++++++++++++- NKC_WF/SiteContent.master.cs | 16 +++++++++++++++- NKC_WF/Web.config | 6 ++++-- NKC_WF/site/Login.aspx.cs | 2 +- 5 files changed, 51 insertions(+), 13 deletions(-) diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index befb1ab..43d5aa6 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -288,6 +288,7 @@ + @@ -405,7 +406,6 @@ - @@ -442,6 +442,7 @@ + @@ -654,6 +655,13 @@ Empty.Master + + 404.aspx + ASPXCodeBehind + + + 404.aspx + Oops.aspx ASPXCodeBehind @@ -731,13 +739,6 @@ DevUtils.aspx - - ErrorPage.aspx - ASPXCodeBehind - - - ErrorPage.aspx - ErrorsLog.aspx ASPXCodeBehind @@ -1008,6 +1009,13 @@ cmp_devUtils.ascx + + cmp_errorDetail.ascx + ASPXCodeBehind + + + cmp_errorDetail.ascx + cmp_ErrorsLog.ascx ASPXCodeBehind diff --git a/NKC_WF/Site.Master.cs b/NKC_WF/Site.Master.cs index 5e10eda..9859707 100644 --- a/NKC_WF/Site.Master.cs +++ b/NKC_WF/Site.Master.cs @@ -15,7 +15,7 @@ namespace NKC_WF // faccio refresh pagina... } /// - /// Imposta vilibilità componente search globale + /// Imposta visibilità componente search globale /// public bool showSearch { @@ -28,5 +28,19 @@ namespace NKC_WF cmp_menuTop.showSearch = value; } } + /// + /// Imposta abilitazione anonymous (senza fare auth) + /// + public bool enableAnonym + { + get + { + return cmp_menuTop.enableAnonym; + } + set + { + cmp_menuTop.enableAnonym = value; + } + } } } \ No newline at end of file diff --git a/NKC_WF/SiteContent.master.cs b/NKC_WF/SiteContent.master.cs index 6f02653..93f0b42 100644 --- a/NKC_WF/SiteContent.master.cs +++ b/NKC_WF/SiteContent.master.cs @@ -9,7 +9,7 @@ namespace NKC_WF } /// - /// Imposta vilibilità componente search globale + /// Imposta visibilità componente search globale /// public bool showSearch { @@ -22,5 +22,19 @@ namespace NKC_WF ((SiteMaster)Master).showSearch = value; } } + /// + /// Imposta abilitazione anonymous (senza fare auth) + /// + public bool enableAnonym + { + get + { + return ((SiteMaster)Master).enableAnonym; + } + set + { + ((SiteMaster)Master).enableAnonym = value; + } + } } } \ No newline at end of file diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 304b47c..179a7e4 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -38,9 +38,11 @@ - + + + - + diff --git a/NKC_WF/site/Login.aspx.cs b/NKC_WF/site/Login.aspx.cs index 5786b6e..8b83319 100644 --- a/NKC_WF/site/Login.aspx.cs +++ b/NKC_WF/site/Login.aspx.cs @@ -25,7 +25,7 @@ namespace NKC_WF private void Cmp_login_Login_Error(object sender, EventArgs e) { - Response.Redirect("ErrorPage?LastError=LoginError"); + Response.Redirect("~/ErrorPages/Oops?aspxerrorpath=Login"); } private void Cmp_login_Login_ok(object sender, EventArgs e)