public void SaveConfig(DbConfigDto config)
        {
            var database = GetConnection();
            var model    = database.Table <DbConfigModel>().FirstOrDefault() ?? new DbConfigModel();

            model.TargetFolderPath = config.TargetFolderPath;
            model.SourceFolderPath = config.SourceFolderPath;
            database.Update(model);
            database.Commit();
        }
Exemple #2
0
        public void Save()
        {
            var config = new DbConfigDto
            {
                SourceFolderPath = SourceFolderPath,
                TargetFolderPath = TargetFolderPath
            };

            _database.SaveConfig(config);
        }
Exemple #3
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            var addr = txtAddr.Text.Trim();

            var usrname = txtUsrname.Text.Trim();

            var pass = txtPasswd.Text.Trim();

            dbConfig = new DbConfigDto
            {
                Address  = addr,
                Username = usrname,
                Password = pass
            };

            DatabaseList = GenerateManager.GetAllDatabase(dbConfig);
        }