private void FillCurrentAppointments() { var currentAppointments = AppointmentService.GetCurrentAppointments(); CurrentAppointments.Clear(); CurrentAppointments.AddRange(currentAppointments); }
private void LoadDayAppointments(Day selectedDay) { CurrentAppointments.Clear(); foreach (var app in _appointments) { var convertedAppTimeToUtc = TimeZoneInfo.ConvertTimeFromUtc(app._Start, TimeZoneInfo.Local); if (convertedAppTimeToUtc.Date == selectedDay.Date.Date) { CurrentAppointments.Add(app); } } MonthWeekLabel = selectedDay.Date.Date.ToShortDateString(); NoAppointmentLabelIsVisible = CurrentAppointments.Count > 0 ? false : true; }
private void FilterCurrentAppointments(List <Day> days) { CurrentAppointments.Clear(); days.ForEach(day => { foreach (var app in _appointments) { if (day.Date.Year == app._Start.Year && day.Date.Month == app._Start.Month && day.Date.Day == app._Start.Day) { CurrentAppointments.Add(app); } } }); if (!AppointmentIsLoading) { NoAppointmentLabelIsVisible = CurrentAppointments.Count > 0 ? false : true; } }