Example #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());
            }
        }
Example #2
0
 private static Movie BuildMovie(TypeOfMovie priceCode, string title)
 {
     return(new Movie {
         PriceCode = priceCode, Title = title
     });
 }
Example #3
0
 private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented)
 {
     return(new Rental {
         Movie = BuildMovie(priceCode, title), DaysRented = daysRented
     });
 }
Example #4
0
 public static void GetRentalInformation(string title, TypeOfMovie priceCodesOfMovie, int daysRented)
 {
     Titles             = new[] { title };
     PriceCodesOfMovies = new[] { priceCodesOfMovie };
     DaysRented         = new[] { daysRented };
 }
Example #5
0
 private static Rental BuildRental(TypeOfMovie priceCode, string title, int daysRented)
 {
     return new Rental {Movie = BuildMovie(priceCode, title), DaysRented = daysRented};
 }
Example #6
0
 private static Movie BuildMovie(TypeOfMovie priceCode, string title)
 {
     return new Movie { PriceCode = priceCode, Title = title };
 }
Example #7
0
 public static void GetRentalInformation(string[] titles, TypeOfMovie[] priceCodesOfMovies, int[] daysRented)
 {
     Titles = titles;
     PriceCodesOfMovies = priceCodesOfMovies;
     DaysRented = daysRented;
 }
Example #8
0
 public static void GetRentalInformation(string title, TypeOfMovie priceCodesOfMovie, int daysRented)
 {
     Titles = new[] { title };
     PriceCodesOfMovies = new[] { priceCodesOfMovie };
     DaysRented = new[] { daysRented };
 }