Ejemplo n.º 1
0
        public IActionResult PrikaziUcesnikeNaProjektu(int Id)
        {
            ProjektUcesniciVM model = new ProjektUcesniciVM
            {
                ProjektId = Id,
                rows      = _db.ProjektniTim.Where(x => x.ProjektId == Id).Select(x => new ProjektUcesniciVM.row
                {
                    Id          = x.Id,
                    ImeIPrezime = x.Korisnik.Ime + " " + x.Korisnik.Prezime,
                    vjestine    = _db.VjestinaKorisnik.Where(x => x.KorisnikID == x.Id).Select(x => x.Vjestina.Naziv)
                })
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult ProjektDodajUcesnike(int Id)
        {
            ProjektUcesniciVM model = new ProjektUcesniciVM
            {
                ProjektId = Id,
                rows      = _db.Korsinik.Except(_db.ProjektniTim.Where(x => x.Projekt.DatumZavrsetka == null).Select(x => x.Korisnik)).ToList().Select(x => new ProjektUcesniciVM.row
                {
                    Id          = x.Id,
                    ImeIPrezime = x.Ime + " " + x.Prezime,
                    vjestine    = _db.VjestinaKorisnik.Include(y => y.Vjestina).Where(y => y.KorisnikID == x.Id).Select(y => y.Vjestina.Naziv),
                    Role        = _db.RoleNaProjektu.Where(y => string.Compare(y.Rola, "Product Owner") != 0).Select(s => new SelectListItem
                    {
                        Text  = s.Rola,
                        Value = s.Id.ToString()
                    })
                })
            };

            return(View(model));
        }