FIX lettura conf da DB / file x ADM

This commit is contained in:
Samuele E. Locatelli
2018-10-19 10:39:33 +02:00
parent 41427b6f69
commit ca683cd633
7 changed files with 47 additions and 48 deletions
+31 -31
View File
@@ -4,39 +4,39 @@ using System.Web.Services;
namespace MoonProAdmin.WS
{
/// <summary>
/// servizi per AutoCompletamento oggetti
/// </summary>
[WebService(Namespace = "http://www.steamware.net/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class AutoCompletamento : System.Web.Services.WebService
{
/// <summary>
/// servizi per AutoCompletamento oggetti
/// </summary>
[WebService(Namespace = "http://www.steamware.net/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class AutoCompletamento : System.Web.Services.WebService
{
/// <summary>
/// elenco articoli per ricerca interattiva
/// </summary>
/// <returns></returns>
[WebMethod(Description = "elenco articoli per ricerca interattiva")]
public string[] elencoArticoli(string prefixText, int count)
/// <summary>
/// elenco articoli per ricerca interattiva
/// </summary>
/// <returns></returns>
[WebMethod(Description = "elenco articoli per ricerca interattiva")]
public string[] elencoArticoli(string prefixText, int count)
{
// inizializzo risposta
List<string> suggerimenti = new List<string>();
// proseguo SOLO SE min "MinCharAutocomplete" char...
if (count >= memLayer.ML.CRI("MinCharAutocomplete"))
{
// elenco candidati
MapoDb.DS_Utility.v_selArticoliDataTable tabDati = MapoDb.DataLayer.obj.taSelArt.getByConditio(prefixText);
// aggiungo ogni riga...
foreach (MapoDb.DS_Utility.v_selArticoliRow riga in tabDati)
{
// inizializzo risposta
List<string> suggerimenti = new List<string>();
// proseguo SOLO SE min "MinCharAutocomplete" char...
if (count >= memLayer.ML.confReadInt("MinCharAutocomplete"))
{
// elenco candidati
MapoDb.DS_Utility.v_selArticoliDataTable tabDati = MapoDb.DataLayer.obj.taSelArt.getByConditio(prefixText);
// aggiungo ogni riga...
foreach (MapoDb.DS_Utility.v_selArticoliRow riga in tabDati)
{
suggerimenti.Add(riga.value);
}
}
return suggerimenti.ToArray();
suggerimenti.Add(riga.value);
}
}
return suggerimenti.ToArray();
}
}
}
+5 -5
View File
@@ -3,9 +3,9 @@ using System.Web.UI;
public partial class AjaxSimple : System.Web.UI.MasterPage
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.CRS("_titoloPagina");
}
}
@@ -346,7 +346,7 @@ namespace MoonProAdmin.WebUserControls
/// <returns></returns>
public string formattaUrlOdl(object idx)
{
string answ = String.Format(memLayer.ML.confReadString("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
return answ;
}
@@ -290,7 +290,7 @@ namespace MoonPro_site.WebUserControls
/// <returns></returns>
public string formattaUrlOdl(object idx)
{
string answ = String.Format(memLayer.ML.confReadString("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx);
return answ;
}
+5 -5
View File
@@ -118,7 +118,7 @@ public partial class mod_login : SteamWare.ApplicationUserControl
bool _allowForceUser = false;
try
{
_allowForceUser = SteamWare.memLayer.ML.confReadBool("_allowForceUser");
_allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser");
}
catch
{
@@ -144,7 +144,7 @@ public partial class mod_login : SteamWare.ApplicationUserControl
else
{
lblMessage.Text = String.Format("{0}<br>key not allowed for operation!! operation logged!!", user_std.UtSn.Traduci("AccessFail"));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp"))));
string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
if (Login_Error != null)
@@ -155,7 +155,7 @@ public partial class mod_login : SteamWare.ApplicationUserControl
}
else
{
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp"))));
string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
if (Login_Error != null)
@@ -185,7 +185,7 @@ public partial class mod_login : SteamWare.ApplicationUserControl
bool _allowForceUser = false;
try
{
_allowForceUser = SteamWare.memLayer.ML.confReadBool("_allowForceUser");
_allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser");
}
catch
{
@@ -214,7 +214,7 @@ public partial class mod_login : SteamWare.ApplicationUserControl
}
else
{
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp"))));
string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}", Page.User.Identity.Name, ddlStdUser.SelectedValue);
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
if (Login_Error != null)
+3 -4
View File
@@ -83,7 +83,7 @@ namespace MoonPro_site.WebUserControls
if (user_std.UtSn.isAuth)
{
//lnkShowHide.Text = user_std.UtSn.Traduci("lnkShowHide");
//lblTitle.Text = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("titleApp"));
//lblTitle.Text = user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("titleApp"));
if (_titleString != "")
{
//// traduzione di tutti i termini
@@ -96,8 +96,8 @@ namespace MoonPro_site.WebUserControls
}
else
{
//string titolo = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("welcomeApp"));
//lblMessUtente.Text = string.Format("{0} - {1}", titolo, memLayer.ML.confReadString("SiteName"));
//string titolo = user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("welcomeApp"));
//lblMessUtente.Text = string.Format("{0} - {1}", titolo, memLayer.ML.CRS("SiteName"));
//lblMessUtenteEn.Text = "";
Session["SessionUpdateMenu"] = false;
}
@@ -114,7 +114,6 @@ namespace MoonPro_site.WebUserControls
/// </summary>
private void setTimer()
{
//Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
}
protected void lnkShowHide_Click(object sender, EventArgs e)
{
@@ -39,7 +39,7 @@ namespace MoonProAdmin.WebUserControls
{
Response.Redirect("~/login");
}
lblTitolo.Text = memLayer.ML.confReadString("appName");
lblTitolo.Text = memLayer.ML.CRS("appName");
}
/// <summary>
/// salva in variabile pagina il nome della pagina corrente