Пример #1
0
        private async void OnAddButton(Agenda contact)
        {
            await App.Current.MainPage.DisplayAlert("Registro Exitoso", "El contacto ha sido agregado  ", "OK");

            await App.Current.MainPage.Navigation.PushAsync(new HomePage());

            contact = new Agenda(Name, Number);

            Agendas.Add(contact);
        }
Пример #2
0
        public bool add(Modelo prEntity)
        {
            try
            {
                Agenda Entity = (Agenda)prEntity;

                Agendas.Add(Entity);

                return(SaveChanges() > 0);
            }
            catch (Exception e)
            {
                return(false);
            }
        }