Exemplo n.º 1
0
        public void OnGet()
        {
            Appointments = appointmentData.GetAppointmentForUser(this.User.Identity.Name);

            var check4 = this.User.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role", "Administator");

            if (!Appointments.Any())
            {
                Message = "You don't have any appointments";
            }
        }
Exemplo n.º 2
0
 public bool HasAppointment(int id, DateTime apptDate)
 {
     if (Appointments.Count == 0)
     {
         return(false);
     }
     else
     {
         if (id > 0)
         {
             return(Appointments.Any(a => a.AppointmentDate == apptDate && a.Id != id));
         }
         else
         {
             return(Appointments.Any(a => a.AppointmentDate == apptDate));
         }
     }
 }
Exemplo n.º 3
0
        private bool CheckForUpcomingAppointment()
        {
            var beginReminderInterval = DateTime.Now;
            var endReminderInterval   = DateTime.Now.AddMinutes(15);

            if (Appointments == null)
            {
                return(false);
            }

            if (Appointments.Any())
            {
                foreach (var appointment in Appointments)
                {
                    if (appointment.Start > beginReminderInterval && appointment.Start < endReminderInterval && appointment.UserId == LoggedInUser.Id)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Exemplo n.º 4
0
 public virtual bool IsEmpty()
 {
     return(!Appointments.Any() &&
            HealthRecords.All(h => h.IsEmpty()));
 }