Beispiel #1
0
 private void btnExcluir_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ServicoController servicoController = new ServicoController();
         var idExclusão = Convert.ToInt32(txtId.Text);
         servicoController.Excluir(idExclusão);
         MessageBox.Show("Excluido com sucesso");
         servicoController.ListarTodos();
         //listServico.ItemsSource = servicoController.ListarTodos();
     }
     catch
     {
         MessageBox.Show("Não é possivel efetuar a exclusão");
     }
 }
Beispiel #2
0
        private void listaServicoAluno_Initialized(object sender, EventArgs e)
        {
            ServicoController servicoController = new ServicoController();

            listaServicoAluno.ItemsSource = servicoController.ListarTodos();
        }
Beispiel #3
0
        private void cbServico_Loaded(object sender, RoutedEventArgs e)
        {
            ServicoController servicoController = new ServicoController();

            cbServico.ItemsSource = servicoController.ListarTodos();
        }
Beispiel #4
0
 //preneche a lista depois de clicar em gravar
 public void  ListaServicos(ServicoController servicoController)
 {
     listServico.ItemsSource = servicoController.ListarTodos();
 }