/vs2010/Chapter9/Chapter9_JQueryMobile/Controllers/HomeController.cs

https://bitbucket.org/alaurosancsoft/mobilemvc-succinctly · C# · 44 lines · 38 code · 6 blank · 0 comment · 0 complexity · 20b0f6bb3e00247e6caabe68e6effe3a MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using Chapter9_jQueryMobile.Models;
  7. namespace Chapter9_JQueryMobile.Controllers
  8. {
  9. public class HomeController : Controller
  10. {
  11. public ActionResult Index()
  12. {
  13. ViewBag.Message = "Modify this template to kick-start your ASP.NET MVC application.";
  14. return View();
  15. }
  16. public ActionResult Lists()
  17. {
  18. List<Movie> MovieList = new List<Movie>();
  19. MovieList.Add(new Movie(1, "Alien vs. Terminator", "Who would win this battle? Bet on Arnold.", "Action", 2004, "Director.png"));
  20. MovieList.Add(new Movie(2, "The Hunger Games of Kataan", "Fad vs. Fad", "Action", 2012, "Director.png"));
  21. MovieList.Add(new Movie(3, "Raiders of the Lost Phone", "Couches will be destroyed", "Adventure", 2007, "Director.png"));
  22. return View(MovieList);
  23. }
  24. public ActionResult About()
  25. {
  26. ViewBag.Message = "Your app description page.";
  27. return View();
  28. }
  29. public ActionResult Details()
  30. {
  31. return View();
  32. }
  33. public ActionResult Purchase()
  34. {
  35. return View();
  36. }
  37. }
  38. }