|
@@ -1,6 +1,7 @@
|
|
|
using InABox.Core;
|
|
|
using InABox.Database;
|
|
|
using InABox.DynamicGrid;
|
|
|
+using InABox.Wpf;
|
|
|
using InABox.WPF;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -57,16 +58,16 @@ namespace PRSServer.Forms
|
|
|
if (!rows.Any())
|
|
|
return false;
|
|
|
|
|
|
- var result = MessageBox.Show(
|
|
|
+ var recover = MessageWindow.ShowYesNo(
|
|
|
"Are you sure you wish to recover these records?",
|
|
|
- "Confirm Recover", MessageBoxButton.YesNo);
|
|
|
- if(result == MessageBoxResult.Yes)
|
|
|
+ "Confirm Recover");
|
|
|
+ if(recover)
|
|
|
{
|
|
|
foreach(var row in rows)
|
|
|
{
|
|
|
DbFactory.Provider.Recover(row.ToObject<Deletion>());
|
|
|
}
|
|
|
- MessageBox.Show("Records recovered");
|
|
|
+ MessageWindow.ShowMessage("Records recovered", "Records recovered");
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
@@ -79,7 +80,7 @@ namespace PRSServer.Forms
|
|
|
return;
|
|
|
else if (rows.Count > 1)
|
|
|
{
|
|
|
- MessageBox.Show("Please select only one row");
|
|
|
+ MessageWindow.ShowMessage("Please select only one row", "Error");
|
|
|
return; ;
|
|
|
}
|
|
|
|
|
@@ -108,10 +109,10 @@ namespace PRSServer.Forms
|
|
|
if (!rows.Any())
|
|
|
return;
|
|
|
|
|
|
- var result = MessageBox.Show(
|
|
|
+ var delete = MessageWindow.ShowYesNo(
|
|
|
"Are you sure you wish to permanently delete these records?\n(This cannot be undone.)",
|
|
|
- "Confirm Permanent Delete", MessageBoxButton.YesNo);
|
|
|
- if(result == MessageBoxResult.Yes)
|
|
|
+ "Confirm Permanent Delete");
|
|
|
+ if(delete)
|
|
|
{
|
|
|
DeleteItems(rows);
|
|
|
SelectedRows = Array.Empty<CoreRow>();
|