public void SetDefaultScheme() { var keyProfitWordDB = new KeyProfitWordDB(sqlconnection); var SMSDB = new SMSDB(sqlconnection); var res = GetDefaultScheme(); if (res != null) { return; } var model = new SettingsSchemaModel() { SchemaName = "Default Schema", ShowAllMessages = true, //BankName = "Bank Name", Use = true, PatternForAmount = @"Suma:\s+(-?\d+(?:\.\d+)?)\sUAH", UserSchema = false, KeyProfitWords = new List <KeyProfitWordModel>() { new KeyProfitWordModel() { Name = "Popovnennya" }, new KeyProfitWordModel() { Name = "Zarahuvannia" } } }; sqlconnection.InsertWithChildren(model, recursive: true); }
private DBHelper() { var sqlconnection = DependencyService.Get <ISQLite>().GetConnection(); SettingsSchemaDB = new SettingsSchemaDB(sqlconnection); KeyProfitWordDB = new KeyProfitWordDB(sqlconnection); SMSDB = new SMSDB(sqlconnection); UserDB = new UserDB(sqlconnection); AddressesDB = new AddressesDB(sqlconnection); }