public StatAvgAppointmentDurationActor( Hospital hospital ) { _hospital = hospital; _subscriptions = new HashSet<IActorRef>(); Processing(); }
public StatEstimatedTimeToSeeADoctorActor( Hospital hospital ) { _hospital = hospital; _subscriptions = new HashSet<IActorRef>(); Processing(); }
public HospitalCoordinatorActor( Hospital hospital, IActorRef dashboardActor ) { _hospital = hospital; _dashboardActor = dashboardActor; _hospitalStatActors = new Dictionary<StatisticType, IActorRef>(); Processing(); }
public HospitalEventFetcherActor( Hospital hospital ) { _hospital = hospital; _subscriptions = new HashSet<IActorRef>(); _diseases = new Dictionary<DiseaseType, Disease>(); Paused(); }
public static IEnumerable<Hospital> FindHospitals() { var hospitals = new List<Hospital>(); var sql = "SELECT Id, Name, AssignedDoctors FROM Hospital ORDER BY Name"; try { using ( var conn = new SqlConnection( ConnectionString ) ) { conn.Open(); using ( var cmd = new SqlCommand( sql, conn ) ) { cmd.CommandType = CommandType.Text; var dr = cmd.ExecuteReader(); while ( dr.Read() ) { var h = new Hospital { Id = dr.GetInt32( 0 ), Name = dr.GetString( 1 ), AssignedDoctors = dr.GetInt32( 2 ) }; hospitals.Add( h ); } } conn.Close(); } } catch ( Exception ex ) { s_logger.Error( "ERROR: {0}", ex.Message ); } return hospitals; }