Esempio n. 1
0
        private void NewTask_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new NewTask(null);

            dialog.Title = "Новая задача";
            if (dialog.ShowDialog() == true)
            {
                ReloadTasks();
            }
        }
Esempio n. 2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new NewTask(Task);

            dialog.Title = "Редактировать задачу";
            if (dialog.ShowDialog() == true)
            {
                using (var db = new OrganizerContext())
                {
                    db.Tasks.AddOrUpdateExtension(Task);
                    db.SaveChanges();
                    ParentWindow.ReloadTasks();
                }
            }
        }