private void btnUpdateTask_Click(object sender, RoutedEventArgs e) { var task = projectTaskViewSource.View.CurrentItem as task; FormTask form = new FormTask(task, context); form.ShowDialog(); projectTaskViewSource.View.Refresh(); }
private void btnNewTask_Click(object sender, RoutedEventArgs e) { var project = projectViewSource.View.CurrentItem as project; if (project == null) { MessageBox.Show("No project selected."); return; } FormTask form = new FormTask(project, context); form.ShowDialog(); projectTaskViewSource.View.Refresh(); }