public void DeleteClient()
 {
     IsClientEditVisible = false;
     if (EditedClient != null && EditedClient.ID != 0)
     {
         _clientsManager.DeleteClient(EditedClient);
         RefreshClients();
     }
 }
Example #2
0
        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!!!");
            }
        }
Example #3
0
        public async Task <IActionResult> DeleteClient(Guid siteId, string clientId)
        {
            await clientsManager.DeleteClient(siteId.ToString(), clientId);

            return(RedirectToAction("Index"));
        }