protected void rptMovies_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            WatchListMovie watchListMovie = new WatchListMovie();
            int            id             = Convert.ToInt32(e.CommandArgument);

            if (e.CommandName == "Add")
            {
                if (Session["Id"] == null)
                {
                    return;
                }
                else
                {
                    var movieModel = _movieManager.Get(id);
                    watchListMovie.MovieId  = movieModel.Id;
                    watchListMovie.UserId   = Convert.ToInt32(Session["Id"]);
                    watchListMovie.IsActive = true;
                    _watchListMovie.Add(watchListMovie);
                }
            }
        }
Exemple #2
0
 public void Update(WatchListMovie watchListMovieModel)
 {
     _watchListMovieDal.Update(watchListMovieModel);
 }
Exemple #3
0
 public void Add(WatchListMovie watchListMovieModel)
 {
     _watchListMovieDal.Add(watchListMovieModel);
 }