private async void PodioUpload(object sender, RoutedEventArgs e) { Loading.IsActive = true; try { var context = new FormContext(); await PodioService.Upload2017Interviews(context.Interviews.ToList()); Loading.IsActive = false; await Notify("Your interviews are now saved in Podio.", "Upload Complete"); } catch (Exception ex) { Loading.IsActive = false; await Notify("We encountered an issue uploading to Podio.", "Error"); } }
private async void PodioDownload(object sender, RoutedEventArgs e) { if (await NotifyYesNo("This will clear the existing database of both applicants and interviews. Are you sure you want to continue?", "Warning")) { Loading.IsActive = true; try { var applicants = await PodioService.GetApplicants(); await ProcessApplicants(applicants); loadApplicants(); Loading.IsActive = false; await Notify("Download complete.", "Success"); } catch (Exception ex) { Loading.IsActive = false; await Notify("We encountered an issue downloading applicants from Podio.", "Error"); } } }