@using BlazorScheduler.Data
@inject
WeatherForecastService ForecastService
private
WeatherForecast[]? forecasts;
protected override async Task OnInitializedAsync()
{
forecasts = await
ForecastService.GetForecastAsync(DateTime.Now);
foreach (var
forecast in forecasts)
{
var appointment = new AppointmentData
{
Id = forecast.GetHashCode(),
Subject = forecast.Subject,
Location = "",
StartTime = forecast.StartTime,
EndTime = forecast.EndTime,
Description = "",
IsAllDay = false,
RecurrenceRule = "",
RecurrenceException = "",
RecurrenceID = null
};
Appointments.Add(appointment);
}
}
|