void GetMostRecommendedFilms() { clsMostRecommendedFilmsCollection AllMostRecommendedFilms = new clsMostRecommendedFilmsCollection(); foreach (clsMostRecommendedFilms aMostRecommendedFilm in AllMostRecommendedFilms.AllMostRecommendedFilms) { pnlMostRecommendedFilms.Controls.Add(anImdbApi.GetImdbInformationWithOptions(aMostRecommendedFilm.FilmId, "", 0, favourite, displayOverlay)); } pnlMostRecommendedFilms.Visible = true; }
void DisplayWatchLaterFilms(Int32 userId) { try { clsDataConnection DB = new clsDataConnection(); DB.AddParameter("@UserId", userId); DB.Execute("sproc_tblWatchList_FilterByUserId"); Int32 recordCount = DB.Count; Int32 index = 0; Int32 filmId = 0; string title; if (recordCount == 0) { clsDynamicPanel aDynamicPanel = new clsDynamicPanel(); pnlWatchList.Controls.Add(aDynamicPanel.GenerateEmptyListPanel("watch list")); } else { bool favourite = false; bool displayOverlay = true; while (index < recordCount) { filmId = Convert.ToInt32(DB.DataTable.Rows[index]["FilmId"]); title = DB.DataTable.Rows[index]["Title"].ToString(); pnlWatchList.Controls.Add(anImdbApi.GetImdbInformationWithOptions(filmId, title, userId, favourite, displayOverlay)); index++; } } pnlWatchList.Visible = true; } catch { pnlError.Visible = true; } }