Aggiunto init x chiavi di rete
This commit is contained in:
@@ -327,3 +327,4 @@ _UpgradeReport_Files/
|
|||||||
Backup*/
|
Backup*/
|
||||||
UpgradeLog*.XML
|
UpgradeLog*.XML
|
||||||
|
|
||||||
|
.ionide/symbolCache.db
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ namespace EgtBEAMWALL.DataLayer
|
|||||||
|
|
||||||
#region Public Methods
|
#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)
|
public static void InitDb(string server, string nKey, string sKey)
|
||||||
{
|
{
|
||||||
DATABASE_SERV = server;
|
DATABASE_SERV = server;
|
||||||
@@ -48,12 +54,30 @@ namespace EgtBEAMWALL.DataLayer
|
|||||||
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None;CHARSET=utf8";
|
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)
|
/// <summary>
|
||||||
{
|
/// Metodo di init standard per DB in rete con Master_Key
|
||||||
// esecuzione script di install locale
|
/// </summary>
|
||||||
return Controllers.DbController.man.checkCreateUser(DATABASE_USER, DATABASE_PWD);
|
/// <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";
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
public static bool CheckUser(string nKey, string sKey)
|
||||||
}
|
{
|
||||||
|
// esecuzione script di install locale
|
||||||
|
return Controllers.DbController.man.checkCreateUser(DATABASE_USER, DATABASE_PWD);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Methods
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user