Exemplo n.º 1
0
        public ConstructionsPage()
        {
            InitializeComponent();
            List <ConstructionDTO> constructions = ConstructionService.Build().GetAll();

            ConstructionsListView.ItemsSource = new ObservableCollection <ConstructionDTO>(constructions);
        }
Exemplo n.º 2
0
 private async void CreateConstructionBtn_Clicked(object sender, EventArgs e)
 {
     try
     {
         ConstructionDTO constr = UpdateDtoFromEntries(Construction);
         constr.Id = ConstructionService.Build().Create(constr);
         if (UpdateClientDebt(constr))
         {
             await DisplayAlert("Sucesso!", "Construção atualizada!", "Ok");
         }
     }
     catch (Exception ex)
     {
         await DisplayAlert("ERRO!", "Aconteceu algo errado, detalhes: " + ex.Message, "Ok");
     }
 }