public ActionResult Delete(sifProjectUserRole userRole)
        {
            try
            {
                var userRoleToDelete = db.sifProjectUserRoles.Where(p => p.idUserRole == userRole.idUserRole).First();

                Project activeProject = Session["project"] as Project;

                var existsUserWithRole = from n in db.sif_ProjectUsers
                                         join s in db.sifProjectUserRoles on n.idUserRole equals s.idUserRole
                                         where s.idProject == activeProject.idProject && s.idUserRole == userRoleToDelete.idUserRole
                                         select n;

                if (existsUserWithRole.Count() == 0)
                {
                    // ne postoji netko to ima tu user rolu
                    db.sifProjectUserRoles.DeleteOnSubmit(userRoleToDelete);
                    db.SubmitChanges();
                    return RedirectToAction("Index");
                }
                else
                {
                    return Redirect("../ErrorOnDelete");
                }
            }
            catch
            {
                return View();
            }
        }
        public ActionResult Create(sifProjectUserRole userRole)
        {
            try
            {
                var activeProject = Session["project"] as Project;
                sifProjectUserRole newUserRole = new sifProjectUserRole();

                newUserRole.idProject = activeProject.idProject;
                newUserRole.idUserRole = userRole.idUserRole;
                newUserRole.userRoleDescription = userRole.userRoleDescription;

                db.sifProjectUserRoles.InsertOnSubmit(newUserRole);
                db.SubmitChanges();

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
 partial void DeletesifProjectUserRole(sifProjectUserRole instance);
 partial void UpdatesifProjectUserRole(sifProjectUserRole instance);
 partial void InsertsifProjectUserRole(sifProjectUserRole instance);
 public ActionResult Edit(sifProjectUserRole userRole)
 {
     try
     {
         var userRoleToEdit = db.sifProjectUserRoles.Where(p => p.idUserRole == userRole.idUserRole).First();
         userRoleToEdit.userRoleDescription = userRole.userRoleDescription;
         db.SubmitChanges();
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }