public ActionResult DdlSubmit() { var items = new List<SelectListItem> { new SelectListItem {Text = "Drugi", Value = "0"}, new SelectListItem {Text = "Seznam", Value = "1"}, new SelectListItem {Text = "Kategorij", Value = "2", Selected = true} }; ViewBag.MovieType = items; var cs = new TestniKomitent(); return View("Index", cs.FillTestData()); }
public ActionResult Index() { var items = new List<SelectListItem> { new SelectListItem {Text = "Action", Value = "0"}, new SelectListItem {Text = "Drama", Value = "1"}, new SelectListItem {Text = "Comedy", Value = "2", Selected = true}, new SelectListItem {Text = "Science Fiction", Value = "3"} }; ViewBag.MovieType = items; var cs = new TestniKomitent(); return View(cs.FillTestData()); }
public ActionResult Isci(string searchString) { var cs = new TestniKomitent(); var komitenti = cs.FillTestData(); if (!string.IsNullOrEmpty(searchString)) { komitenti = komitenti.Where(w => w.LastName.Contains(searchString)).ToList(); } if (komitenti.Count == 1) { return PartialView("_EnKomitent", komitenti.First()); } else { return PartialView("_VsiKomitenti", komitenti); } }
public ActionResult Isci(string searchString) { var cs = new TestniKomitent(); var komitenti = cs.FillTestData(); if (!string.IsNullOrEmpty(searchString)) { komitenti = komitenti.Where(w => w.LastName.Contains(searchString)).ToList(); } // Če je samo en rezultat prikaži view EnKomitent, če več VsiKomitenti. if (komitenti.Count == 1) { return View("EnKomitent", komitenti.First()); } else { return View("VsiKomitenti", komitenti); } }
public ActionResult VsiKomitenti() { var cs = new TestniKomitent(); return PartialView("_VsiKomitenti", cs.FillTestData()); }
public ActionResult VsiKomitenti() { var cs = new TestniKomitent(); return View(cs.FillTestData()); }