Beispiel #1
0
        // GET: PunetoriController/Create
        public async Task <ActionResult> CreateAsync()
        {
            ViewBag.AddError = false;
            ViewBag.KomunaId = await kompaniaRepository.LoadKomuna(null);

            ViewBag.Departamenti = await departamentiRepository.DepartamentiSelectList(null, false, false);

            ViewBag.Kompania = await kompaniaRepository.KompaniaSelectList(null, false, false);

            ViewBag.Pozita = await pozitaRepository.PozitaSelectList(null, false, false);

            ViewBag.Banka = await bankaRepository.BankaSelectList(null, false, false);

            ViewBag.Grada = await gradaRepository.GradaSelectList(null, false, false);

            return(View());
        }
Beispiel #2
0
        // GET: RaportController
        public async Task <ActionResult> IndexAsync()
        {
            string role = User.IsInRole("HR") ? "HR" : "Administrator";

            ViewBag.RaportiId = EnumsToSelectList <Raportet> .GetSelectList();

            ViewBag.KompaniaId = await kompaniaRepository.KompaniaSelectListBasedOnRole(role, user.KompaniaId);

            ViewBag.PunetoriId = new SelectList(new List <string>(), "Value", "Text");
            ViewBag.GradaId    = await gradaRepository.GradaSelectList(null, false, false);

            ViewBag.BankaId = await bankRepository.BankaSelectList(null, false, false);

            return(View());
        }