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"; } }
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)); } } }
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); }
public virtual bool IsEmpty() { return(!Appointments.Any() && HealthRecords.All(h => h.IsEmpty())); }