Wait For (myAPI.ExecuteCRUD("action", "select00", "myDatabase", params)) Complete (result As Map)
If result.Get("status") = "success" Then
Dim count As Int = result.Get("count")
Log($"Eventi caricati: ${count}"$)
For i = 0 To count - 1
Dim orario_da As Long = DateTime.DateTimeParse(result.Get("data"), result.Get("ora_da"))
Dim orario_a As Long = DateTime.DateTimeParse(result.Get("data"), result.Get("ora_a"))
ASScheduler_DayView1.API.CreateAppointment(ASSchedulerUtils.CreateASScheduler_Appointment(0, "IN ATTESA",m.Get("id_appuntamento")&"|"&m.Get("data"),xui.Color_RGB(239, 186, 0),False,orario_da,orario_a))
Next
Else
Log("Errore nel caricamento eventi")
End If