Example #1
0
        private async void fillLista()
        {
            try
            {
                UseManager           manager = new UseManager();
                IEnumerable <cultos> result  = await manager.listarCultos();

                if (result != null)
                {
                    txtCulto.ItemsSource = result.ToList();

                    Pickerlist = result.ToList();
                    Finallist  = new List <cultos>();

                    foreach (var item in Pickerlist)
                    {
                        var exit = Finallist.Where(i => i.nombre_culto == item.nombre_culto).ToList();
                        if (exit.Count == 0)
                        {
                            Finallist.Add(item);
                        }
                    }


                    //lstUsuarios.ItemsSource = result;
                }
            }
            catch (Exception e1)
            {
                await DisplayAlert("Error en Lista", "Favor vuelva a cargar Servidor no listo", "Aceptar");

                Console.WriteLine(e1.Message.ToString());
            }
        }