protected void gvOrphanedAircraft_RowCommand(object sender, CommandEventArgs e) { if (e != null && e.CommandName.CompareCurrentCultureIgnoreCase("_Delete") == 0) { AircraftUtility.DeleteOrphanAircraft(Convert.ToInt32(e.CommandArgument, CultureInfo.InvariantCulture)); } btnOrphans_Click(sender, e); }
protected async void btnDeleteAllOrphans_Click(object sender, EventArgs e) { await Task.Run(() => { foreach (DataKey dk in gvOrphanedAircraft.DataKeys) { AircraftUtility.DeleteOrphanAircraft(Convert.ToInt32(dk.Value, CultureInfo.InvariantCulture)); } }); await RefreshOrphans(); }