예제 #1
0
        public ActionResult addmovietype(TypeOfMovie x)
        {
            if (ModelState.IsValid)
            {
                // save in database
                db.TYPESS.Add(x);
                db.SaveChanges();

                return(RedirectToAction("showallmovies", "Admin"));
            }
            else
            {
                return(View());
            }
        }
예제 #2
0
 private static Movie BuildMovie(TypeOfMovie priceCode, string title)
 {
     return(new Movie {
         PriceCode = priceCode, Title = title
     });
 }
예제 #3
0
 private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented)
 {
     return(new Rental {
         Movie = BuildMovie(priceCode, title), DaysRented = daysRented
     });
 }
예제 #4
0
 public static void GetRentalInformation(string title, TypeOfMovie priceCodesOfMovie, int daysRented)
 {
     Titles             = new[] { title };
     PriceCodesOfMovies = new[] { priceCodesOfMovie };
     DaysRented         = new[] { daysRented };
 }
예제 #5
0
 private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented)
 {
     return new Rental {Movie = BuildMovie(priceCode, title), DaysRented = daysRented};
 }
예제 #6
0
 private static Movie BuildMovie(TypeOfMovie priceCode, string title)
 {
     return new Movie { PriceCode = priceCode, Title = title };
 }
예제 #7
0
 public static void GetRentalInformation(string[] titles, TypeOfMovie[] priceCodesOfMovies, int[] daysRented)
 {
     Titles = titles;
     PriceCodesOfMovies = priceCodesOfMovies;
     DaysRented = daysRented;
 }
예제 #8
0
 public static void GetRentalInformation(string title, TypeOfMovie priceCodesOfMovie, int daysRented)
 {
     Titles = new[] { title };
     PriceCodesOfMovies = new[] { priceCodesOfMovie };
     DaysRented = new[] { daysRented };
 }