Merge branch 'develop' into SDK
This commit is contained in:
Vendored
+1
-1
@@ -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}')
|
||||
|
||||
@@ -409,32 +409,6 @@ namespace NKC_SDK
|
||||
/// Path x folder dei vari SVG offline order da mostrare
|
||||
/// </summary>
|
||||
public string DrawingPath { get; set; } = "";
|
||||
#if false
|
||||
/// <summary>
|
||||
/// ID dell'ordine offlien da processare
|
||||
/// </summary>
|
||||
public string OffOrderID { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Num di fogli nello stack
|
||||
/// </summary>
|
||||
public int NumSheet
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (SheetList != null)
|
||||
{
|
||||
answ = SheetList.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Elenco Sheet previsti
|
||||
/// </summary>
|
||||
public List<NestSheet> SheetList { get; set; }
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Oggetto errore da poter rispondere con chiamate x stima/nesting
|
||||
|
||||
@@ -152,5 +152,16 @@ namespace NKC_WF
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Converte obja intero
|
||||
/// </summary>
|
||||
/// <param name="valore"></param>
|
||||
/// <returns></returns>
|
||||
public int obj2int(object valore)
|
||||
{
|
||||
int answ = 0;
|
||||
int.TryParse(valore.ToString(), out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<uc1:cmp_errorDetail runat="server" ID="cmp_errorDetail" />
|
||||
</asp:Content>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-13
@@ -7,29 +7,20 @@
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.site
|
||||
namespace NKC_WF.ErrorPages
|
||||
{
|
||||
|
||||
|
||||
public partial class ErrorPage
|
||||
public partial class _404
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtTryReset.
|
||||
/// Controllo cmp_errorDetail.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtTryReset;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo UpdateProgressDisplay.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
|
||||
protected global::NKC_WF.WebUserControls.cmp_errorDetail cmp_errorDetail;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,8 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="Oops.aspx.cs" Inherits="NKC_WF.ErrorPages.Oops" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4 text-center">
|
||||
<h2>Error raised</h2>
|
||||
<asp:HyperLink runat="server" ID="hlDefault" NavigateUrl="~/Default" CssClass="btn btn-block btn-success"><i class="fa fa-home" aria-hidden="true"></i> Return to home page</asp:HyperLink>
|
||||
<i>Error log recorded</i><BR />
|
||||
developer <asp:HyperLink runat="server" ID="hlElmah" NavigateUrl="~/elmah.axd" Target="_blank">detailed information about errors here</asp:HyperLink>.
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
</div>
|
||||
<%@ Register Src="~/WebUserControls/cmp_errorDetail.ascx" TagPrefix="uc1" TagName="cmp_errorDetail" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<uc1:cmp_errorDetail runat="server" id="cmp_errorDetail" />
|
||||
</asp:Content>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+11
-20
@@ -11,25 +11,16 @@ namespace NKC_WF.ErrorPages
|
||||
{
|
||||
|
||||
|
||||
public partial class Oops
|
||||
{
|
||||
public partial class Oops
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlDefault.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlDefault;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlElmah.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlElmah;
|
||||
}
|
||||
/// <summary>
|
||||
/// Controllo cmp_errorDetail.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_errorDetail cmp_errorDetail;
|
||||
}
|
||||
}
|
||||
|
||||
+16
-8
@@ -288,6 +288,7 @@
|
||||
<Content Include="Core\Compression\Snappy\lib\win\snappy64.dll" />
|
||||
<Content Include="Core\Compression\Zstandard\lib\win\libzstd.dll" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="ErrorPages\404.aspx" />
|
||||
<Content Include="ErrorPages\Oops.aspx" />
|
||||
<Content Include="export\BunkDetail.aspx" />
|
||||
<Content Include="Home.aspx" />
|
||||
@@ -405,7 +406,6 @@
|
||||
</Content>
|
||||
<Content Include="site\DBG_QRCode_Unload.aspx" />
|
||||
<Content Include="site\DevUtils.aspx" />
|
||||
<Content Include="site\ErrorPage.aspx" />
|
||||
<Content Include="site\ErrorsLog.aspx" />
|
||||
<Content Include="site\ForceReload.aspx" />
|
||||
<Content Include="site\GlobalSearch.aspx" />
|
||||
@@ -442,6 +442,7 @@
|
||||
<Content Include="WebUserControls\cmp_BP_bunkList.ascx" />
|
||||
<Content Include="WebUserControls\cmp_BP_sheetList.ascx" />
|
||||
<Content Include="WebUserControls\cmp_devUtils.ascx" />
|
||||
<Content Include="WebUserControls\cmp_errorDetail.ascx" />
|
||||
<Content Include="WebUserControls\cmp_ErrorsLog.ascx" />
|
||||
<Content Include="WebUserControls\cmp_fileUpload.ascx" />
|
||||
<Content Include="WebUserControls\cmp_home.ascx" />
|
||||
@@ -654,6 +655,13 @@
|
||||
<Compile Include="Empty.Master.designer.cs">
|
||||
<DependentUpon>Empty.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ErrorPages\404.aspx.cs">
|
||||
<DependentUpon>404.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ErrorPages\404.aspx.designer.cs">
|
||||
<DependentUpon>404.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ErrorPages\Oops.aspx.cs">
|
||||
<DependentUpon>Oops.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -731,13 +739,6 @@
|
||||
<Compile Include="site\DevUtils.aspx.designer.cs">
|
||||
<DependentUpon>DevUtils.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\ErrorPage.aspx.cs">
|
||||
<DependentUpon>ErrorPage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="site\ErrorPage.aspx.designer.cs">
|
||||
<DependentUpon>ErrorPage.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\ErrorsLog.aspx.cs">
|
||||
<DependentUpon>ErrorsLog.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1008,6 +1009,13 @@
|
||||
<Compile Include="WebUserControls\cmp_devUtils.ascx.designer.cs">
|
||||
<DependentUpon>cmp_devUtils.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_errorDetail.ascx.cs">
|
||||
<DependentUpon>cmp_errorDetail.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_errorDetail.ascx.designer.cs">
|
||||
<DependentUpon>cmp_errorDetail.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_ErrorsLog.ascx.cs">
|
||||
<DependentUpon>cmp_ErrorsLog.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+15
-1
@@ -15,7 +15,7 @@ namespace NKC_WF
|
||||
// faccio refresh pagina...
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta vilibilità componente search globale
|
||||
/// Imposta visibilità componente search globale
|
||||
/// </summary>
|
||||
public bool showSearch
|
||||
{
|
||||
@@ -28,5 +28,19 @@ namespace NKC_WF
|
||||
cmp_menuTop.showSearch = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta abilitazione anonymous (senza fare auth)
|
||||
/// </summary>
|
||||
public bool enableAnonym
|
||||
{
|
||||
get
|
||||
{
|
||||
return cmp_menuTop.enableAnonym;
|
||||
}
|
||||
set
|
||||
{
|
||||
cmp_menuTop.enableAnonym = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace NKC_WF
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta vilibilità componente search globale
|
||||
/// Imposta visibilità componente search globale
|
||||
/// </summary>
|
||||
public bool showSearch
|
||||
{
|
||||
@@ -22,5 +22,19 @@ namespace NKC_WF
|
||||
((SiteMaster)Master).showSearch = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta abilitazione anonymous (senza fare auth)
|
||||
/// </summary>
|
||||
public bool enableAnonym
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((SiteMaster)Master).enableAnonym;
|
||||
}
|
||||
set
|
||||
{
|
||||
((SiteMaster)Master).enableAnonym = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -38,9 +38,11 @@
|
||||
<!--Nascondo gli erroracci-->
|
||||
<!--<customErrors mode="On" defaultRedirect="~/site/Default"/>-->
|
||||
<!--<customErrors mode="On" defaultRedirect="~/"/>-->
|
||||
<!--<customErrors mode="On" defaultRedirect="~/site/ErrorsLog"/>-->
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPages/Oops.aspx">
|
||||
<error statusCode="404" redirect="~/ErrorPages/404.aspx"/>
|
||||
</customErrors>
|
||||
<!--Mostro gli erroracci-->
|
||||
<customErrors mode="Off"/>
|
||||
<!--<customErrors mode="Off"/>-->
|
||||
</system.web>
|
||||
<appSettings>
|
||||
<!--Configurazioni generali-->
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_errorDetail.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_errorDetail" %>
|
||||
<div class="card" style="width: 100%;">
|
||||
<h4 class="card-header py-1 bg-secondary text-light"><%: traduci("ErrorPage") %></h4>
|
||||
<div class="card-body py-1">
|
||||
<div class="row mt-3 mb-5">
|
||||
<div class="col-12">
|
||||
<h4>
|
||||
<asp:Label runat="server" ID="lblErrorTitle" /></h4>
|
||||
<asp:Label runat="server" ID="lblErrorExpl" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12 col-lg-6">
|
||||
<b>Error log recorded</b><br />
|
||||
<asp:HyperLink runat="server" ID="hlElmah" NavigateUrl="~/elmah.axd" Target="_blank">detailed info</asp:HyperLink>
|
||||
(server access only).
|
||||
</div>
|
||||
<div class="col-12 col-lg-6">
|
||||
<asp:LinkButton runat="server" ID="lbtTryReset" CssClass="btn btn-success btn-block" OnClick="lbtTryReset_Click"><i class="fa fa-home" aria-hidden="true"></i> <%: traduci("TryReset") %> <i class="fa fa-refresh" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server">
|
||||
<ProgressTemplate>
|
||||
<div class="btn btn-lg btn-warning btn-block text-center textBig">
|
||||
<i class="fa fa-download" aria-hidden="true"></i><%: traduci("TaskRunning") %> <i class="fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 text-left">
|
||||
<b>User</b>:
|
||||
<asp:Label runat="server" ID="lblUserName" />
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<b><%:traduci("LastError") %></b>: <%: LastErrorCode %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_errorDetail
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblErrorTitle.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblErrorTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblErrorExpl.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblErrorExpl;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlElmah.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlElmah;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtTryReset.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtTryReset;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo UpdateProgressDisplay.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblUserName.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblUserName;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_menuTop.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_menuTop" %>
|
||||
|
||||
<asp:HiddenField runat="server" ID="hfAnonym" />
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-light py-1 mb-1">
|
||||
<%--<asp:LinkButton runat="server" ID="lbnUpdate" Text="---" OnClick="lbnUpdate_Click" CssClass="navbar-brand" ToolTip="HOME">Sauder NKC <i class="fa fa-object-group" aria-hidden="true"></i></asp:LinkButton>--%>
|
||||
<a class="navbar-brand" href="../">Sauder NKC <i class="fa fa-object-group" aria-hidden="true"></i></a>
|
||||
|
||||
@@ -21,9 +21,13 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
private void checkAuth()
|
||||
{
|
||||
if (!Page.User.Identity.IsAuthenticated)
|
||||
// in primis SOLO SE non è permesso login anonymous...
|
||||
if (!enableAnonym)
|
||||
{
|
||||
Response.Redirect("default");
|
||||
if (!Page.User.Identity.IsAuthenticated)
|
||||
{
|
||||
Response.Redirect("default");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +45,22 @@ namespace NKC_WF.WebUserControls
|
||||
divSearch.Visible = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Abilitazione esecuzione anonima
|
||||
/// </summary>
|
||||
public bool enableAnonym
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
bool.TryParse(hfAnonym.Value, out answ);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfAnonym.Value = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtSearch_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
@@ -84,19 +104,27 @@ namespace NKC_WF.WebUserControls
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -106,7 +134,11 @@ namespace NKC_WF.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,15 @@ namespace NKC_WF.WebUserControls
|
||||
public partial class cmp_menuTop
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfAnonym.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfAnonym;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo menu.
|
||||
/// </summary>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="row my-2">
|
||||
<div class="col">
|
||||
<asp:LinkButton runat="server" ID="lbtMakeCnc" CssClass="btn btn-success btn-block" Visible='<%# Eval("OrdStatus").ToString()=="0" %>' OnClick="lbtMakeCnc_Click" OnClientClick='return confirm("Send to CAM?")'><i class="fa fa-laptop" aria-hidden="true"></i> <%: traduci ("MakeCncProg") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtMakeCnc" CssClass="btn btn-success btn-block" Visible='<%# obj2int(Eval("OrdStatus")) <= 0 %>' OnClick="lbtMakeCnc_Click" OnClientClick='return confirm("Send to CAM?")'><i class="fa fa-laptop" aria-hidden="true"></i> <%: traduci ("MakeCncProg") %></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col">
|
||||
<%--<asp:LinkButton runat="server" ID="lbtPrintLabels" CssClass="btn btn-info btn-block" Visible='<%# Eval("OrdStatus").ToString()!="0" %>' OnClick="lbtPrintLabels_Click"><i class="fa fa-print" aria-hidden="true"></i> PRINT LABELS</asp:LinkButton>--%>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="ErrorPage.aspx.cs" Inherits="NKC_WF.site.ErrorPage" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
|
||||
<div class="card text-center" style="width: 100%;">
|
||||
<h4 class="card-header p-1 bg-secondary text-light"><%: traduci("ErrorPage") %></h4>
|
||||
<div class="card-body py-1">
|
||||
<div class="row">
|
||||
<div class="col-6 text-left">
|
||||
<b>User</b><br />
|
||||
<%: User.Identity.Name %>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<b><%:traduci("LastError") %></b><br />
|
||||
<%: LastError %>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col-4">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<asp:LinkButton runat="server" ID="lbtTryReset" CssClass="btn btn-success btn-block" OnClick="lbtTryReset_Click"><i class="fa fa-refresh" aria-hidden="true"></i> <%: traduci("TryReset") %><i class="fa fa-refresh" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server">
|
||||
<ProgressTemplate>
|
||||
<div class="btn btn-lg btn-warning btn-block text-center textBig">
|
||||
<i class="fa fa-download" aria-hidden="true"></i> <%: traduci("TaskRunning") %> <i class="fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user