예제 #1
0
        public void OnSwiped(object s, EventArgs e)
        {
            this.IsVisible = false;
            ContactDatabase db = new ContactDatabase(dbPath);

            DependencyService.Get <IToast>().Toasts("deleteContact", db.DeleteContact(Convert.ToInt32(this.contactId.Text)));
            MessagingCenter.Send <App>((App)Application.Current, "OnContactDeleted");
        }
예제 #2
0
        public void Delete(int id)
        {
            ContactDatabase contactDatabase = new ContactDatabase();
            bool            IsDeleted       = contactDatabase.DeleteContact(id);

            if (IsDeleted)
            {
                Console.WriteLine("Contact Deleted");
            }
            else
            {
                Console.WriteLine("Contact cant be deleted");
            }
        }