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(); }
public void Save() { var config = new DbConfigDto { SourceFolderPath = SourceFolderPath, TargetFolderPath = TargetFolderPath }; _database.SaveConfig(config); }
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); }