HelperDatabaseIsChangedDataClass Method |
Namespace: SOWIData.Database
public static bool DatabaseIsChanged<DataClass>( this IConnector<DataClass> pApp, string pConnectionString, string pUserName )
[Missing <typeparam name="DataClass"/> documentation for "M:SOWIData.Database.Helper.DatabaseIsChanged``1(SOWIData.Database.IConnector{``0},System.String,System.String)"]
/// <summary> /// App object on memory for a better performance /// </summary> private static App.Customer App = null; /// <summary> /// Data list on memory for a better performance /// </summary> private static List<Data.Customer> DataList = null;
#region --- database --- //* checks database access connection string * if (pConnectionString.Length == 0) { //* puts SOWIApp.sconfig current configuration * pConnectionString = SOWIApp.Management.Data.Settings.Database.Setting.ConnectionString; } //* checks database access user name * if (pUserName.Length == 0) { //* puts logged user name * pUserName = System.Environment.UserName; } //* do check necessary a new instance of App * lDatabaseIsChanged = App.Customer.App.DatabaseIsChanged(pConnectionString, pUserName); if (lDatabaseIsChanged) { App.Customer.App = new Customer(pConnectionString, pUserName); } //* do check necessary load data list * if (App.Customer.DataList == null) { lDatabaseIsChanged = true; } #endregion //* do check necessary reread data list * if (lDatabaseIsChanged) { App.Customer.DataList = App.Customer.App.GetList(); }