void GetDetachmentsCompleted(object sender, GetDetachmentsCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         Detachments        = e.Result;
         SelectedDetachment = Detachments.FirstOrDefault(c => c.ID == LoginInit.user.DetachmentID);
         if (LoginInit.user.Roles.Any(c => c.Name == "Master"))
         {
             Visibility = System.Windows.Visibility.Visible;
         }
     }
     else
     {
         ErrorProvider.ShowError(e.Error, Navigator);
     }
     dataClient.GetDetachmentsCompleted -= GetDetachmentsCompleted;
     if (busyCount == 0)
     {
         Busy = false;
     }
     else
     {
         busyCount--;
     }
 }
Beispiel #2
0
 void GetDetachmentsCompleted(object sender, GetDetachmentsCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         Items = e.Result;
     }
     else
     {
         ErrorProvider.ShowError(e.Error, Navigator);
     }
     dataClient.GetDetachmentsCompleted -= GetDetachmentsCompleted;
     Busy = false;
 }