private void MovieAddClick(object sender, RoutedEventArgs e) { MovieManageWindow movieEditWindow = new MovieManageWindow(); movieEditWindow.Option = AdminControlOption.Add; movieEditWindow.ShowDialog(); }
private void DeleteMovieClick(object sender, RoutedEventArgs e) { MovieManageWindow movieEditWindow = new MovieManageWindow(); movieEditWindow.CurrentMovie = lb_AllMovies.SelectedItem as Movie; movieEditWindow.Option = AdminControlOption.Delete; movieEditWindow.ShowDialog(); }
private void MovieEditClick(object sender, RoutedEventArgs e) { if (lb_AllMovies.SelectedItem == null) { MessageBox.Show("Please Select a Movie", "Movie Selection Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } MovieManageWindow movieEditWindow = new MovieManageWindow(); movieEditWindow.CurrentMovie = lb_AllMovies.SelectedItem as Movie; movieEditWindow.Option = AdminControlOption.Edit; movieEditWindow.ShowDialog(); }