mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-16 18:47:28 -05:00
More cleanup and fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using ChrisKaczor.Wpf.Validation;
|
||||
using System.Windows;
|
||||
using FeedCenter.Data;
|
||||
|
||||
namespace FeedCenter.Options
|
||||
{
|
||||
@@ -29,8 +30,16 @@ namespace FeedCenter.Options
|
||||
|
||||
private void HandleOkayButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var transaction = Database.Entities.BeginTransaction();
|
||||
|
||||
if (!this.IsValid())
|
||||
{
|
||||
transaction.Rollback();
|
||||
return;
|
||||
}
|
||||
|
||||
transaction.Commit();
|
||||
Database.Entities.Refresh();
|
||||
|
||||
// Dialog is good
|
||||
DialogResult = true;
|
||||
|
||||
Reference in New Issue
Block a user