public ActionResult VratiKorisnickiNalog(int?id) { var model = new KorisnickiNaloziViewModel { KorisnickiNalog = id.HasValue ? fRepositoryFactory.KorisnickiNaloziRepository.VratiKorisnickiNalog(id.Value) : new KorisnickiNalog() { Radnik = new Radnik() }, Uloge = fRepositoryFactory.UlogeRadnikaRepository.VratiUloge() }; return(PartialView("_KorisnickiNalogCallbackPanel", model)); }
public ActionResult Index() { var vm = new KorisnickiNaloziViewModel { KorisnickiNalozi = fRepositoryFactory.KorisnickiNaloziRepository.VratiKorisnickeNaloge(), Radnici = fRepositoryFactory.RadniciRepository.VratiRadnike(), Uloge = fRepositoryFactory.UlogeRadnikaRepository.VratiUloge() }; if (Request.IsAjaxRequest()) { return(PartialView("_KorisnickiNaloziGrid", vm)); } return(View(vm)); }