Esempio n. 1
0
        private void Delete_lesson(object sender, RoutedEventArgs e)
        {
            MessageBoxResult resoult = MessageBox.Show("Are you sure?", "Statment", MessageBoxButton.YesNo);

            if (resoult == MessageBoxResult.Yes)
            {
                _lessonRepository.DeleteLesson(_lesson);
                File.Delete($"{Directory.GetCurrentDirectory()}/Lessons/{_lesson.Name}.txt");
            }
        }
Esempio n. 2
0
        private async void DeleteLessonAction(Lesson obj)
        {
            var confirm = await _dialog.ShowConfirmation("Confirm", "Are you sure to delete this lesson?");

            if (confirm)
            {
                var response = await _lessonHandler.DeleteLesson(obj.Id, CurrentCourse.Id);

                ShowResponse(response);
            }
        }