public void DeleteClient() { IsClientEditVisible = false; if (EditedClient != null && EditedClient.ID != 0) { _clientsManager.DeleteClient(EditedClient); RefreshClients(); } }
public void DeleteClient() { try { var buttons = MessageBoxButton.YesNo; var question = MessageBoxImage.Question; if (MessageBox.Show("Czy na pewno chcesz usunac klienta?", "Potwierdzenie usuniecia", buttons, question) == MessageBoxResult.Yes) { IsClientEditVisible = false; if (EditedClient != null && EditedClient.ID != 0) { _clientsManager.DeleteClient(EditedClient); RefreshClients(); } } } catch { MessageBox.Show("Błąd przy usuwaniu klienta!!!"); } }
public async Task <IActionResult> DeleteClient(Guid siteId, string clientId) { await clientsManager.DeleteClient(siteId.ToString(), clientId); return(RedirectToAction("Index")); }