本文整理汇总了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();
}
}
示例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;
}
示例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)
{
}
}