public OpapDateResults GetDrawByDateResults(string game, string drawDate) { string url = "http://applications.opap.gr/DrawsRestServices/" + game + "/drawDate/" + drawDate + ".json"; string response = jsonClient.GET(url); if (string.IsNullOrEmpty(response)) { return(null); } OpapDateResults opapResults = null; opapResults = JsonConvert.DeserializeObject <OpapDateResults>(response); return(opapResults); }
private void drawByDateButton_Click(object sender, RoutedEventArgs e) { if (SelectedGame != null) { if (!string.IsNullOrEmpty(DrawDate.Text)) { OpapDateResults = opapResultsClient.GetDrawByDateResults(SelectedGame.Name, DrawDate.Text.Trim()); if (OpapDateResults != null && OpapDateResults.draws != null && OpapDateResults.draws.draw != null) { drawByDateResultsPanel.Visibility = Visibility.Visible; } else { drawByDateResultsPanel.Visibility = Visibility.Collapsed; } } } }