void Salvar_Clicked(object sender, System.EventArgs e)
        {
            var contato = new Contato
            {
                Id       = int.Parse(txtID.Text),
                Nome     = txtNome.Text,
                Email    = txtEmail.Text,
                Telefone = txtTelefone.Text
            };

            using (var dados = new AcessoDados())
            {
                dados.Update(contato);
            }

            Navigation.PopModalAsync();
        }
Esempio n. 2
0
        void savar_Clicked(object sender, System.EventArgs e)
        {
            var contato = new Contato
            {
                Nome     = txtNome.Text,
                Telefone = txtTelefone.Text,
                Id       = int.Parse(txtId.Text),
                Email    = txtEmail.Text
            };

            using (var dados = new AcessoDados())
            {
                dados.Update(contato);
            }
            Navigation.PopModalAsync();
            Navigation.PopModalAsync();
            Navigation.PushModalAsync(new NavigationPage(new MyPage()));
        }