예제 #1
0
 public void Delete(Movie movie)
 {
     if (this.movies.ContainsKey(movie.ID))
     {
         this.movies.Remove(movie.ID);
     }
 }
예제 #2
0
        // Delete
        protected void DeleteButton_Click(object sender, EventArgs e)
        {
            IApplicationContext ctx = ContextRegistry.GetContext();
            IMovieService movieService = ctx.GetObject("MovieService") as IMovieService;

            Movie movie = new Movie(
                Int32.Parse(this.DeleteIdTextBox.Text),
                "NotUsed");

            movieService.Delete(movie);

            UpdateCacheContent();
        }