Aggiunto init x chiavi di rete
This commit is contained in:
@@ -327,3 +327,4 @@ _UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
|
||||
.ionide/symbolCache.db
|
||||
|
||||
@@ -37,6 +37,12 @@ namespace EgtBEAMWALL.DataLayer
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Metodo di init standard per DB locale
|
||||
/// </summary>
|
||||
/// <param name="server">Indirizzo del server (tipicamente localhost/127.0.0.1)</param>
|
||||
/// <param name="nKey">Numero chiave</param>
|
||||
/// <param name="sKey">Codice/pwd associato a chaive</param>
|
||||
public static void InitDb(string server, string nKey, string sKey)
|
||||
{
|
||||
DATABASE_SERV = server;
|
||||
@@ -48,6 +54,24 @@ namespace EgtBEAMWALL.DataLayer
|
||||
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None;CHARSET=utf8";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metodo di init standard per DB in rete con Master_Key
|
||||
/// </summary>
|
||||
/// <param name="server">Indirizzo del server (tipicamente indirizzo di rete)</param>
|
||||
/// <param name="nKey">Numero chiave</param>
|
||||
/// <param name="sKey">Codice/pwd associato a chaive</param>
|
||||
/// <param name="masterKey">Numero di chiave master con cui è creato il DB</param>
|
||||
public static void InitDb(string server, string nKey, string sKey, string masterKey)
|
||||
{
|
||||
DATABASE_SERV = server;
|
||||
DATABASE_NAME = $"EgtBwDb_{masterKey}";
|
||||
DATABASE_USER = $"user_{nKey}";
|
||||
DATABASE_PWD = $"pwd_{sKey}";
|
||||
CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None";
|
||||
// stringa admin con utente root egalware...
|
||||
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None;CHARSET=utf8";
|
||||
}
|
||||
|
||||
public static bool CheckUser(string nKey, string sKey)
|
||||
{
|
||||
// esecuzione script di install locale
|
||||
|
||||
Reference in New Issue
Block a user