private void OnChangesSubmitted(object s, AsyncCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         errorCallback.Invoke(e.Error, e.Error.Message);
         return;
     }
     successCallback.Invoke();
 }
Exemple #2
0
 private void OnRetrieverGotNextPage(object sender, RetrieverGotPageEventArgs e)
 {
     if (e.Page.Count == 0) // no more
     {
         completeCallback.Invoke();
         return;
     }
     PickFromDatasets(e.Page);
 }
 private void VehicleInformationSetRetrieved(
     IList <VehicleInformation> infos)
 {
     foreach (PsaDataset dataset in source)
     {
         ProcessDataset(dataset, infos.FirstOrDefault(c => c.Vin == dataset.GetVin()));
     }
     successCallback.Invoke();
 }
Exemple #4
0
 private void SingleFetchedCallback(AnalyticRuleSettings item)
 {
     if (item != null)
     {
         alreadyExistsCallback.Invoke();
     }
     else
     {
         PersistItem(settingsToCreate);
     }
 }
Exemple #5
0
 private void ServiceOnSubmitAnalyticRuleSettingsCompleted(object sender,
                                                           AsyncCompletedEventArgs e)
 {
     service.SubmitAnalyticRuleSettingsCompleted -= ServiceOnSubmitAnalyticRuleSettingsCompleted;
     if (e.Error != null)
     {
         errorCallback.Invoke(e.Error, e.Error.Message);
     }
     else
     {
         successCallback.Invoke();
     }
 }
Exemple #6
0
        private void OnVehiclesAssociated(object s, AsyncCompletedEventArgs e)
        {
            VtsWebServiceClient cl = s as VtsWebServiceClient;

            cl.AssociateVehiclesWithUserCompleted -= OnVehiclesAssociated;
            if (e.Error != null)
            {
                errorCallback.Invoke(e.Error, e.Error.Message);
            }
            else
            {
                successCallback.Invoke();
            }
            cl.CloseAsync();
        }
Exemple #7
0
 private void OnUserRegistered(object s, AsyncCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         errorCallback.Invoke(e.Error, e.Error.Message);
     }
     else
     {
         if (OnSuccess != null)
         {
             OnSuccess.Invoke(this, EventArgs.Empty);
         }
         successCallback.Invoke();
     }
 }