private void ListarFiliais() { try { filialCollectionDTO = new FilialCollectionDTO(); filialCollectionDTO = filialBLL.ReadName(string.Empty); cbFilial.Items.Clear(); foreach (FilialDTO item in filialCollectionDTO) { cbFilial.Items.Add(item.Pessoa.NomePessoa); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Erro", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void ListarFiliais() { try { filialCollectionDTO = new FilialCollectionDTO(); filialCollectionDTO = filialBLL.ReadName(string.Empty); dataGridFilial.ItemsSource = null; dataGridFilial.ItemsSource = filialCollectionDTO; } catch (Exception ex) { MessageBox.Show(ex.Message, "Erro", MessageBoxButton.OK, MessageBoxImage.Error); } }