public WDBSQLite(string Path, string UI, WDBTraceLog.TraceLog WDBTraceLogObj) { SQLFile = Path; WDBTraceLogObj.WriteToLog(ThreadName, ObjectName, GetCurrentMethod(), "Start Call: WDBSQLite()"); this.TraceLogObj = WDBTraceLogObj; if (!File.Exists(Path)) { TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "Start of Create SQLite DB. " + Path); if (UI.ToLower() == "client") { this.conn = CreateClientDB(Path); } else if (UI.ToLower() == "uploader") { this.conn = CreateUploadDB(Path); } TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "End of Create SQLite DB." + Path); } else { TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "SQLite data source=" + Path); conn = new SQLiteConnection("data source=" + Path); conn.Open(); } TraceLogObj.WriteToLog(ThreadName, ObjectName, GetCurrentMethod(), "End Call: WDBSQLite()"); }
public WDBCommon(WDBSQLite.WDBSQLite ArgWDBSQliteObj, WDBAPI.WDBAPI WDBAPIObj, WDBTraceLog.TraceLog WDBTraceLogObj) { WDBTraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "Start Call: WDBCommon()"); this.WDBAPIObj = WDBAPIObj; TraceLogObj = WDBTraceLogObj; WDBSQLiteObj = ArgWDBSQliteObj; TraceLogObj.WriteToLog(_ThreadName, ObjectName, GetCurrentMethod(), "Start Call: WDBCommon()"); }