public static UserAccessList getInstance() { if (uniqueInstance == null) { uniqueInstance = new UserAccessList(); } return(uniqueInstance); }
public List <Driver> GetDriverListByRole(RolesList role) { UserAccessList userAccessList = UserAccessList.getInstance(); List <UserAccess> userAccesses = userAccessList.ToList(role); if (userAccesses != null) { List <Driver> drivers = new List <Driver>(); foreach (UserAccess userAccess in userAccesses) { drivers.Add(getItem(userAccess.Driver.Id)); } return(drivers); } else { return(null); } }