示例#1
0
        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);
        }
示例#2
0
        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);
        }