コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }