public static void LoadStationList() { try { var data = WebApiService.GetDataFromWeb("api/Stations"); ListOfStations = JsonConvert.DeserializeObject <ObservableCollection <Station> >(data); } catch (Exception e) { Console.WriteLine(e); throw; } }
public static void LoadTaskList() { try { var data = WebApiService.GetDataFromWeb("api/Tasks"); ListOfTasks = Json.TransformData(data); } catch (Exception e) { Console.WriteLine(e); throw; } }
public static void LoadMonitorList() { /* We call the Web api service class in our contructer because we want our data immediatly. * The data needs to be deserialize so that it can be displayed in the observablecollection. */ try { var data = WebApiService.GetDataFromWeb("api/Monitors"); ListOfMonitors = JsonConvert.DeserializeObject <ObservableCollection <Monitor> >(data); } catch (Exception e) { Console.WriteLine(e); throw; } }