// GET: Store public ActionResult Index() { var maneger = new StoreMenager(); List <Store> stores = maneger.GetAllStore(); return(View(stores)); }
private void LoadDropDwon() { StoreMenager storeMenager = new StoreMenager(); List <Store> stores = storeMenager.GetAllStore(); ViewBag.Stores = new SelectList(stores, "StoreId", "StoreName"); MovieManeger movieManeger = new MovieManeger(); List <Movie> movies = movieManeger.GetAllMovies(); ViewBag.MovieTitle = new SelectList(movies, "ID", "Title"); }
public ActionResult Create() { StoreMenager maneger = new StoreMenager(); List <Store> stores = maneger.GetAllStore(); ViewBag.Store = new SelectList(stores, "StoreId", "StoreName"); MovieManeger movieManeger = new MovieManeger(); List <Movie> movies = movieManeger.GetAllMovies(); ViewBag.Movie = new SelectList(movies, "ID", "Title"); return(View()); }