コード例 #1
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (IdeasService.Build().CreateOrUpdate(UpdateEntityFromEntries(EntityDto)) > 0)
     {
         DisplayAlert("Sucesso!", "Ideia cadastrada", "Ok");
         Navigation.PushAsync(new IdeasPage());
     }
 }
コード例 #2
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (IdeasService.Build().Update(UpdateEntityFromEntries(EntityDto)) > 0)
     {
         DisplayAlert("Sucesso!", "Brainstorming salvo", "Ok");
         Navigation.PopAsync();
     }
 }
コード例 #3
0
        private async void Delete(object sender, EventArgs e)
        {
            int     id        = Convert.ToInt32(((Image)sender).ClassId);
            IdeaDTO entityDto = entityDtos.Find(x => x.Id == id);
            string  confirm   = await DisplayActionSheet("Tem certeza que deseja excluir este item?", "Voltar", null, "Sim", "Não");

            if (confirm == "Sim")
            {
                if (IdeasService.Build().Delete(entityDto) > 0)
                {
                    await DisplayAlert("Sucesso", "Ideia " + entityDto.Description + " deletada", "Ok");

                    entityDtos.Remove(entityDto);
                    RefreshList();
                }
            }
        }
コード例 #4
0
 private async void GetIdeas()
 {
     entityDtos = await IdeasService.Build().GetAll();
 }