private void webClient_DownloadTicketPricesCompleted(object sender, DownloadStringCompletedEventArgs e) { try { string json = e.Result; if (!string.IsNullOrEmpty(json)) { RootPriceObject rootPriceObj = JsonConvert.DeserializeObject <RootPriceObject>(json); priceList = rootPriceObj.RESULTS.priceList; if (priceList != null) { setTicketPrices(); } } } catch (Exception ex) { RadMessageBox.ShowAsync("AW SNAP :-(", MessageBoxButtons.OK, "We are having trouble downloading data due to temporary server unavailability at the moment."); } }
private void webClient_DownloadTicketPricesCompleted(object sender, DownloadStringCompletedEventArgs e) { try { string json = e.Result; if (!string.IsNullOrEmpty(json)) { RootPriceObject rootPriceObj = JsonConvert.DeserializeObject <RootPriceObject>(json); priceList = rootPriceObj.RESULTS.priceList; if (priceList != null) { setTicketPrices(); } } } catch (Exception ex) { MessageBox.Show("Connection has timed out!"); } }