void OnDelete(object sender, EventArgs e)
        {
            RelatorioInicial selectedItem = (RelatorioInicial)sender.GetType().GetProperty("CommandParameter").GetValue(sender, null);

            Puma.ModelosBanco.Relatorios relatorio = database.GetRelatorio(selectedItem.Id);
            database.DeleteRelatorio(relatorio);
            this.AtualizaLista();
        }
Exemple #2
0
        private void AtualizaHeader(int IdRelatorio)
        {
            relatorioBanco     = database.GetRelatorio(IdRelatorio);
            relatorio          = new RelatorioInicial(relatorioBanco.Id);
            relatorio.Ct       = relatorioBanco.Ct;
            relatorio.Data     = relatorioBanco.Data;
            relatorio.Endereco = relatorioBanco.Endereco;
            relatorio.Auditor  = relatorioBanco.Auditor;
            relatorio.Gerente  = relatorioBanco.Gerente;

            if (relatorio.Ct != "Preencher Ct")
            {
                CtVistoriado.Text = relatorio.Ct;
            }
            EntryGerente.Text  = relatorio.Gerente;
            EntryAuditor.Text  = relatorio.Auditor;
            EntryEndereco.Text = relatorio.Endereco;

            this.AtualizaItems();
        }
        void OnTap(object sender, ItemTappedEventArgs e)
        {
            RelatorioInicial selectedItem = (RelatorioInicial)sender.GetType().GetProperty("SelectedItem").GetValue(sender, null);

            Navigation.PushAsync(new PaginaRelatorio(selectedItem.Id, database));
        }