|
|
@@ -114,8 +114,7 @@ namespace PRSDesktop
|
|
|
|
|
|
private void CompleteTask(ITaskControl control, RoutedEventArgs e, DateTime completed)
|
|
|
{
|
|
|
- if (MessageBox.Show($"Are you sure you want to complete the selected tasks?", "Confirm Completion",
|
|
|
- MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
|
|
+ if (!MessageWindow.ShowYesNo("Are you sure you want to complete the selected tasks?", "Confirm Completion"))
|
|
|
return;
|
|
|
var tasks = (((FrameworkElement)e.Source).Tag as IEnumerable<TaskModel>)!;
|
|
|
Progress.ShowModal("Completing Tasks", progress =>
|
|
|
@@ -139,8 +138,7 @@ namespace PRSDesktop
|
|
|
private void ChangeStatus_Click(Tuple<ITaskControl, TaskModel[], KanbanStatus> obj)
|
|
|
{
|
|
|
var (control, tasks, status) = obj;
|
|
|
- if (MessageBox.Show($"Are you sure you want to mark the selected tasks as {status}?", "Confirm Change Status",
|
|
|
- MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
|
|
+ if (!MessageWindow.ShowYesNo($"Are you sure you want to mark the selected tasks as {status}?", "Confirm Change Status"))
|
|
|
return;
|
|
|
Progress.ShowModal("Changing Status", progress =>
|
|
|
{
|
|
|
@@ -239,14 +237,14 @@ namespace PRSDesktop
|
|
|
|
|
|
menu.AddItem("Create Setout from Task", null, models.First(), task =>
|
|
|
{
|
|
|
- if (MessageBox.Show("This will convert this task into a Setout.\n\nDo you wish to continue?", "Confirmation", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
|
|
+ if (!MessageWindow.ShowYesNo("This will convert this task into a Setout.\n\nDo you wish to continue?", "Confirmation"))
|
|
|
return;
|
|
|
|
|
|
ManufacturingTemplate? template = new Client<ManufacturingTemplate>()
|
|
|
.Load(new Filter<ManufacturingTemplate>(x => x.Code).IsEqualTo("PRS")).FirstOrDefault();
|
|
|
if (template == null)
|
|
|
{
|
|
|
- MessageBox.Show("[Pressing] Template does not exist!");
|
|
|
+ MessageWindow.ShowMessage("[Pressing] Template does not exist!", "No template");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -278,7 +276,7 @@ namespace PRSDesktop
|
|
|
kanban = tables["Kanban"].Rows.FirstOrDefault()?.ToObject<Kanban>();
|
|
|
if (kanban == null)
|
|
|
{
|
|
|
- MessageBox.Show("Task does not exist!");
|
|
|
+ MessageWindow.ShowMessage("Task does not exist!", "No task");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -446,7 +444,7 @@ namespace PRSDesktop
|
|
|
kanban.Title += $" (Requi #{result.Number})";
|
|
|
new Client<Kanban>().Save(kanban, "Converted to Requisition", (_, __) => { });
|
|
|
});
|
|
|
- MessageBox.Show(String.Format("Created Requisition {0}", result.Number));
|
|
|
+ MessageWindow.ShowMessage($"Created Requisition {result.Number}", "Success");
|
|
|
control.Refresh();
|
|
|
}
|
|
|
});
|
|
|
@@ -533,8 +531,7 @@ namespace PRSDesktop
|
|
|
{
|
|
|
menu.AddItem(models.Length > 1 ? "Archive Tasks" : "Archive Task", null, models, tasks =>
|
|
|
{
|
|
|
- if (MessageBox.Show("Are you sure you want to remove the selected tasks from the list?", "Confirm removal",
|
|
|
- MessageBoxButton.YesNo) != MessageBoxResult.Yes)
|
|
|
+ if (!MessageWindow.ShowYesNo("Are you sure you want to remove the selected tasks from the list?", "Confirm removal"))
|
|
|
return;
|
|
|
|
|
|
Progress.ShowModal("Closing Kanbans", progress =>
|