public void AddUrdmsUser <TCollectionRelationship>(ICurtinUser user, TCollectionRelationship role) { if (user.CurtinId != Manager.UserId) { UrdmsUsers.AddUrdmsUser(user, role); } }
public void AddUrdmsUser <T>(ICurtinUser user, T role) { if (PrincipalInvestigator == null || user.CurtinId != PrincipalInvestigator.UserId) { UrdmsUsers.AddUrdmsUser(user, role); } }
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)); }
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)) }); } }