Пример #1
0
        private void RefreshVisitors()
        {
            var visitors = _esClinicContext.Visitors.Include("Patient").ToList();

            Visitors.Clear();
            foreach (var visitor in visitors)
            {
                Visitors.Add(visitor);
            }
        }
Пример #2
0
 private void UpdateVisitorList()
 {
     Visitors.Clear();
     using (var db = new VisitContext())
     {
         var query = from b in db.Visitors
                     orderby b.Visitor.LastName, b.Visitor.FirstName, b.Visitor.CompanyName
         select b;
         foreach (var b in query)
         {
             Visitors.Add(b);
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Checks if the movie is over, if so it stops playing and everybody who was in the cinema at the time will return to their rooms.
 /// </summary>
 private void Screening()
 {
     if (Timer < ScreeningTime)
     {
         Timer++;
     }
     else
     {
         Img         = Resources.Cinema1;
         Timer       = 0;
         IsScreening = false;
         foreach (Guest visitor in Visitors)
         {
             visitor.NeedMovie = false;
             visitor.Busy      = false;
             if (!visitor.Evacuating)
             {
                 visitor.Go_Back();
             }
         }
         Visitors.Clear();
     }
 }