/// <summary> /// Fills the movie listbox with a list of titles for all movies in the database. /// </summary> private void FillMovieList() { //Variable Declarations. DataSet movieTitles; //AccessRepository repository = new AccessRepository(); LimelightBusiness business = new LimelightBusiness(repository); //Get the movie titles from the database. //using (repositoy) //{ // movieTitles = repository.GetAllMovieTitles(); //} movieTitles = business.GetAllMovieTitles(); lstMovieList.DataSource = movieTitles.Tables[0]; lstMovieList.ValueMember = "MovieID"; lstMovieList.DisplayMember = "Title"; }
/// <summary> /// Fills the movie listbox with a list of titles for all movies in the database. /// </summary> private void FillMovieList() { //Variable Declarations. DataSet movieTitles; LimelightBusiness business = new LimelightBusiness(repository); //Get the movie titles from the database. try { movieTitles = business.GetAllMovieTitles(); } catch (Exception ex) { ApplicationUtilities.CatchExceptions(ex); return; } //Fill the movie listbox with the movie titles. lstMovieList.DataSource = movieTitles.Tables[0]; lstMovieList.ValueMember = "MovieID"; lstMovieList.DisplayMember = "Title"; }