// GET: Filmek/Random public ViewResult Random() { var film = new Film() { Cim = "Star Wars" }; var kolcsonzok = new List <Kolcsonzo>() { new Kolcsonzo() { Nev = "Géza" }, new Kolcsonzo() { Nev = "Lacika" }, new Kolcsonzo() { Nev = "Zsuzsanna" }, new Kolcsonzo() { Nev = "Peti" }, new Kolcsonzo() { Nev = "Lacika" }, new Kolcsonzo() { Nev = "Lacika" }, }; var rfvm = new RandomFilmViewModel() { Film = film, Kolcsonzok = kolcsonzok }; return(View(rfvm)); //Adat átdobásra: //-View-ban () a modell dolgokat //-ViewData dictionary-ban //-viewbag //return View(film); //ViewData["Film"] = film; //ViewBag.Film = film; //return Content(""); //return HTTPNotFound(); //return new EmptyResult(); //return RedirectToAction(); }
public ViewResult Random() { var film = new Film() { Cim = "Kill Bill" }; var kolcsonzok = new List <Ugyfel>() { new Ugyfel() { Nev = "Géza" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Lacika" }, new Ugyfel() { Nev = "Zsuzsanna" } }; var rfvm = new RandomFilmViewModel() { Film = film, Kolcsonzok = kolcsonzok }; return(View(rfvm)); }
// GET: Filmek public ActionResult Random() { var film = new Film() { Cim = "Nincs ilyen" }; var kolcsonzok = new List <Kolcsonzo>() { new Kolcsonzo() { Nev = "Ricsi" }, new Kolcsonzo() { Nev = "Lacika" }, new Kolcsonzo() { Nev = "Sajt" }, new Kolcsonzo() { Nev = "Sajt" }, new Kolcsonzo() { Nev = "Sajt" } }; var rfvm = new RandomFilmViewModel() { Film = film, Kolcsonzok = kolcsonzok }; //ViewData["Film"] = film; //ViewBag.Film = film; return(View(rfvm)); //return Content("szeretem a tejet"); //return HttpNotFound(); //return RedirectToAction("About","Home", new { oldal=1, rendezes= "cim"}); }
// GET: Filmek public ActionResult Random() { var film = new Film() { Cim = "Kill Bill" }; //ViewData["Film"] = film; //ViewBag.Film = film; var kolcsonzok = new List <Kolcsonzok>() { new Kolcsonzok() { Nev = "Géza" }, new Kolcsonzok() { Nev = "Laci" }, new Kolcsonzok() { Nev = "Anna" } }; var rfvm = new RandomFilmViewModel() { Film = film, Kolcsonzok = kolcsonzok }; return(View(rfvm)); //return Content("Szeretem a cicákat"); //return HttpNotFound(); //return new EmptyResult(); //return RedirectToAction("Index","Home", new {oldal = 1, rendezes = "cica" }); }
// GET: Films public ActionResult Random() { var film = new Film { Name = "A View To A Kill" }; var customers = new List <Customer> { new Customer { Name = "Smeagol" }, new Customer { Name = "Sharkey" } }; var viewModel = new RandomFilmViewModel { Film = film, Customers = customers }; return(View(viewModel)); }