Exemplo n.º 1
0
        /// <summary>
        /// Preenche a lista de funcionarios
        /// </summary>
        public async Task PreencheListBox()
        {
            try
            {
                switch (selecao)
                {
                case 0:
                    funcionarios = await ClientApi.GetEmployeesAsync(true).ConfigureAwait(true);

                    break;

                case 1:
                    funcionarios = await ClientApi.GetEmployeesAsync(false).ConfigureAwait(true);

                    break;

                case 2:
                    funcionarios = await ClientApi.GetEmployeesAsync().ConfigureAwait(true);

                    break;
                }
            }
            catch (HttpRequestException e)
            {
                Console.WriteLine(e.Message);
            }

            dgFuncionarios.ItemsSource = funcionarios;
        }