public Transport[] GetTransports()
 {
     TransportEntity[] entities = new CriticalResultsEntityManager().GetAllTransports();
     List<Transport> transports = new List<Transport>();
     foreach (TransportEntity entity in entities)
     {
         Transport transport = new Transport(entity);
         transport.ResolveLevels();
         transports.Add(transport);
     }
     return transports.ToArray();
 }
 public bool ResolveTransport()
 {
     if (_Entity == null)
     {
         return false;
     }
     if (_Entity.Transport == null)
     {
         return false;
     }
     _Transport = new Transport(_Entity.Transport);
     return true;
 }
 public Transport CreateTransport(string name, string transportUri, string friendlyName)
 {
     TransportEntity entity = new CriticalResultsEntityManager().CreateTransport(name, transportUri, friendlyName);
     Transport transport = new Transport(entity);
     AddUsersToTransport(transport.Name);
     return transport;
 }
 public Transport UpdateTransport(string origName, string origUri, string newName, string newUri, string friendlyName)
 {
     TransportEntity entity = new CriticalResultsEntityManager().UpdateTransport(origName, origUri, newName, newUri, friendlyName);
     Transport transport = new Transport(entity);
     return transport;
 }
 public Transport[] GetTransportsForLevel(string levelUuid)
 {
     Guid level = new Guid(levelUuid);
     TransportEntity [] entities = new CriticalResultsEntityManager().GetTransportsForLevel(level);
     List<Transport> transports = new List<Transport>();
     foreach (TransportEntity e in entities)
     {
         Transport t = new Transport(e);
         t.ResolveLevels();
         transports.Add(t);
     }
     return transports.ToArray();
 }
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 /// <remarks>
 /// Change: 2009-05-31, Jeremy R.
 ///		Mandatory flag was added to TransportLevelEntity.  This change has been propagated by adding a bool? Mandatory flag to the Transport and Level.
 ///		The mandatory flag from the TransportLevelEntity is applied to either of these objects to hide the changes to the Entities and avoid changing the object model.
 ///		
 /// Change: 2009-06-01, John M., Jeremy R.
 ///		Mandatory flag removed from Level.cs and replaced with _MandatoryTransports List.
 /// </remarks>
 public bool ResolveTransports()
 {
     if (_Entity == null)
         return false;
     if (_Entity.TransportLevels == null)
         return false;
     _Transports = new List<Transport>();
     _MandatoryTransports = new List<Transport>();
     foreach (TransportLevelEntity e in _Entity.TransportLevels)
     {
         Transport t = new Transport(e.Transport);
         if (e.Mandatory)
         {
             _MandatoryTransports.Add(t);
         }
         _Transports.Add(t);
     }
     return true;
 }
 public virtual void ExtendUserFromExternalDirectory(User user, Transport[] transports, Level[] levels, string email, string[] proxyAddresses)
 {
 }