Ejemplo n.º 1
0
 private void OnSaveExecute()
 {
     Busy       = true;
     dataClient = ContainerProvider.GetInstance.Resolve <DataServiceClient>();
     if (SelectedItem == null)
     {
         selectedDetachment = new Detachment()
         {
             Description = Description,
             Name        = Key
         };
         dataClient.AddDetachmentCompleted += AddDetachmentCompleted;
         dataClient.AddDetachmentAsync(selectedDetachment);
     }
     else
     {
         oldObject = SelectedItem;
         SelectedItem.Description              = Description;
         dataClient.UpdateDetachmentCompleted += UpdateDetachmentCompleted;
         dataClient.UpdateDetachmentAsync(SelectedItem);
     }
 }