Exemple #1
0
 public void AddUrdmsUser <TCollectionRelationship>(ICurtinUser user, TCollectionRelationship role)
 {
     if (user.CurtinId != Manager.UserId)
     {
         UrdmsUsers.AddUrdmsUser(user, role);
     }
 }
Exemple #2
0
 public void AddUrdmsUser <T>(ICurtinUser user, T role)
 {
     if (PrincipalInvestigator == null || user.CurtinId != PrincipalInvestigator.UserId)
     {
         UrdmsUsers.AddUrdmsUser(user, role);
     }
 }
Exemple #3
0
 public static bool IsPrincipalInvestigatorFor(this ICurtinUser user, Project entity)
 {
     return(entity.Parties.Any(o => o.Party.UserId.Equals(user.CurtinId, StringComparison.InvariantCultureIgnoreCase) && o.Relationship == ProjectRelationship.PrincipalInvestigator));
 }
Exemple #4
0
 public static void AddUrdmsUser <T>(this IList <UrdmsUserViewModel> urdmsUsers, ICurtinUser user, T role)
 {
     if (user != null && !string.IsNullOrWhiteSpace(user.FullName) && !urdmsUsers.Any(o => o.UserId == user.CurtinId))
     {
         urdmsUsers.Add(new UrdmsUserViewModel
         {
             FullName     = user.FullName,
             UserId       = user.CurtinId,
             Relationship = (int)Convert.ChangeType(role, typeof(int))
         });
     }
 }