private void PreencherServicos() { cbServices.Items.Clear(); servicoCollectionDTO = new ServicoCollectionDTO(); servicoCollectionDTO = servicoBLL.ReadName(string.Empty); foreach (ServicoDTO item in servicoCollectionDTO) { cbServices.Items.Add(item.DescricaoServico); } }
/// <summary> /// Preenche lista de serviços. /// </summary> private void FillServicesList() { servicoCollectionDTO = new ServicoCollectionDTO(); servicoCollectionDTO = servicoBLL.ReadName(string.Empty); dataGridService.ItemsSource = null; dataGridService.ItemsSource = servicoCollectionDTO; dataGridStuff.ItemsSource = null; dataGridAddStuff.ItemsSource = null; }
/// <summary> /// Lista todos os serviços /// </summary> private void ListServices() { try { servicoCollectionDTO = new ServicoCollectionDTO(); servicoCollectionDTO = servicoBLL.ReadName(string.Empty); dataGridAddService.ItemsSource = null; dataGridAddService.ItemsSource = servicoCollectionDTO; } catch (Exception ex) { MessageBox.Show(ex.Message, "Erro", MessageBoxButton.OK, MessageBoxImage.Error); } }