Update Stunde.cs
This commit is contained in:
@@ -129,12 +129,14 @@ namespace Jugenddienst_Stunden.Models {
|
||||
//Hours = hours;
|
||||
return daytimes;
|
||||
}
|
||||
|
||||
public event EventHandler<string> AlertEvent;
|
||||
public static async Task<DayTime> LoadEntry(int id) {
|
||||
|
||||
var tokendata = new TokenData(apiKey);
|
||||
|
||||
var data = await Auth.GetApiDataWithAuthAsync(tokendata.url + "?id=" + id, tokendata.apiKey);
|
||||
if(String.IsNullOrEmpty(data))
|
||||
AlertEvent?.Invoke(this, "Auswahl enthält keine Daten");
|
||||
|
||||
//DayTime hours = Hours.daytime.Find(x => x.id == id);
|
||||
DayTime hours = JsonConvert.DeserializeObject<DayTime>(data);
|
||||
|
||||
Reference in New Issue
Block a user