当前位置: 首页>>代码示例>>C#>>正文


C# ParseObject.DeleteAsync方法代码示例

本文整理汇总了C#中Parse.ParseObject.DeleteAsync方法的典型用法代码示例。如果您正苦于以下问题:C# ParseObject.DeleteAsync方法的具体用法?C# ParseObject.DeleteAsync怎么用?C# ParseObject.DeleteAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parse.ParseObject的用法示例。


在下文中一共展示了ParseObject.DeleteAsync方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BorrarPacTra

 private async void BorrarPacTra(object sender, RoutedEventArgs e)
 {
     Esperar.Visibility = Visibility.Visible;
     try {
         var query = from UsuarioSelected in ParseObject.GetQuery("MedPac")
                     where UsuarioSelected.Get<string>("Medico") == medico.Id
                     where UsuarioSelected.Get<string>("Paciente") == usu.Id
                     select UsuarioSelected;
         ParseObject trata = await query.FirstAsync();
         await trata.DeleteAsync();
         Medico.data.Remove(usu);
         Medico.data1.Add(usu);
         var query2 = from UsuarioSelected in ParseObject.GetQuery("Notificacion")
                     where UsuarioSelected.Get<string>("Medico") == medico.Id
                     where UsuarioSelected.Get<string>("Paciente") == usu.Id
                     select UsuarioSelected;
         ParseObject trata2 = await query2.FirstAsync();
         await trata2.DeleteAsync();
         for (int i=0; i<tratas1.Count; i++)
     {
         var trata1 = new ParseObject("Tratamiento");
         trata1.ObjectId = tratas1.ElementAt(i).Id;
         await trata1.DeleteAsync();
     }
         Esperar.Visibility = Visibility.Collapsed;
         rootFrame.GoBack();
     }
     catch (Exception ex)
     {
         Esperar.Visibility = Visibility.Collapsed;
         var dialog = new Windows.UI.Popups.MessageDialog("Ha ocurrido un error, no se ha borrado este paciente");
         dialog.Commands.Add(new Windows.UI.Popups.UICommand("OK") { });
         var result = await dialog.ShowAsync();
     }
 }
开发者ID:davidguzman1693,项目名称:W10TreatSelf,代码行数:35,代码来源:AddPacTra.xaml.cs

示例2: deleteMessageAsync

 private IEnumerator deleteMessageAsync(ParseObject message)
 {
     Task task = message.DeleteAsync();
     task.ContinueWith(t =>
     {
         Debug.Log("message delete successful? " + !t.IsFaulted);
     });
     while (!task.IsCompleted) yield return null;
 }
开发者ID:LudusExtremus,项目名称:Trainingspartner-Kraftwerk,代码行数:9,代码来源:Messaging.cs

示例3: borrarTratamientodePaci

        private async void borrarTratamientodePaci(object sender, RoutedEventArgs e)
        {
            try { 
            var trata = new ParseObject("Tratamiento");
            trata.ObjectId = tratar.Id;
            await trata.DeleteAsync();
            tratas1.Remove(tratar);
            }catch(Exception ex)
            {

            }
            
        }
开发者ID:davidguzman1693,项目名称:W10TreatSelf,代码行数:13,代码来源:AddPacTra.xaml.cs


注:本文中的Parse.ParseObject.DeleteAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。