public ActionResult Pretraga() { RacunRacuniViewModel rrvm = new RacunRacuniViewModel(); rrvm.Racun = new Racun(); rrvm.Racuni = RacunRepo.GetAll(); return(View(rrvm)); }
public ActionResult Index() { RacunRacuniViewModel rrvm = new RacunRacuniViewModel(); Racun racun = new Racun(); rrvm.Racun = racun; rrvm.Racuni = RacunRepo.GetAll(); return(View(rrvm)); }
public ActionResult Index(RacunRacuniViewModel rrvm) { if (ModelState.IsValid) { int idRac = RacunRepo.Create(rrvm.Racun); if (idRac > 0) { return(RedirectToAction("Index")); } } rrvm.Racuni = RacunRepo.GetAll(); return(View(rrvm)); }
public ActionResult Pretraga(RacunRacuniViewModel rrvm) { rrvm.Racuni = RacunRepo.GetAll(); return(View(rrvm)); }