public AddTaskViewModel(AddTaskWindow ThisWindow) { AddCommand = new RelayCommand(o => { ThisWindow.Close(); }); }
public void AddTask(AddTaskWindow newTask) //action for AddTaskWindow { try { Controller.AddTask(Email, Title, Description, DueDate); MessageBox.Show("Task added successfully!"); newTask.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }