Beispiel #1
0
        public async Task <IActionResult> Excluir([FromServices] ExcluirCliente excluirCliente, int clienteId)
        {
            await excluirCliente.Executar(clienteId);

            NotificarSucesso();
            return(RedirectToAction(nameof(Index)));
        }
 public ClienteController(IClienteRepository clienteRepository)
 {
     _criarCliente     = new CriarCliente(clienteRepository);
     _alterarCliente   = new AlterarCliente(clienteRepository);
     _consultarCliente = new ConsultarCliente(clienteRepository);
     _excluirCliente   = new ExcluirCliente(clienteRepository);
 }
Beispiel #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            ExcluirCliente excluirCliente = new ExcluirCliente(ListaClientes);

            excluirCliente.Show();
        }