Beispiel #1
0
        private async Task BuildSFQueuesAsync()
        {
            SFSpinner.StartSpinning();
            bool success;

            string[] sfQueues = default(string[]);
            try
            {
                sfQueues = await Task.Run(() => ConnectionChecker.TryNTimesAsync <string[]>(SFConnector.Instance.GetCasesQueues, 1, "Generating SalesForce Queues"));

                success = true;
            }
            catch (Exception ex)
            {
                LoggerController.Log(ex);
                success = false;
            }
            sfQueue.ItemsSource = sfQueues;
            SFSpinner.StopSpinning(success);
        }
Beispiel #2
0
        private async void sfQueue_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox  = sender as ComboBox;
            var      selection = (string)comboBox.SelectedItem;
            bool     success;

            SFSpinner.StartSpinning();
            try
            {
                LoggerController.Log("Building SF Cases");
                await MainCaseController.BuildSFCasesAsync(selection);

                success = true;
            }
            catch (Exception ex)
            {
                LoggerController.Log(ex);
                success = false;
            }
            SFSpinner.StopSpinning(success);
        }