Exemplo n.º 1
0
        private async Task LoadGenders()
        {
            var genders = await _genderService.GetGendersAsync();

            Device.BeginInvokeOnMainThread(() =>
            {
                Genders.Clear();
                foreach (Gender g in genders)
                {
                    Genders.Add(g);
                }
            });
        }
Exemplo n.º 2
0
        private async Task LoadGenders()
        {
            try
            {
                var genders = await _genderService.GetGendersAsync();

                Device.BeginInvokeOnMainThread(() =>
                {
                    Genders.Clear();
                    foreach (var g in genders)
                    {
                        Genders.Add(g);
                    }
                });
            }
            catch (Exception e)
            {
                DependencyService.Get <IMessage>().ShortAlert(AppResources.Gender);
            }
        }
Exemplo n.º 3
0
 public async Task <ActionResult> GetManyAsync([FromQuery] int?id, [FromQuery] string name, [FromQuery] string createdyBy)
 {
     return(await GetResponseAsync(async() => (await _genderService.GetGendersAsync(id, name, createdyBy))
                                   .GetMappedResponse <IEnumerable <Gender>, IEnumerable <GenderResponse> >(_mapper)));
 }