private void NotesListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { note selectedNote = notesList[e.Position]; IList <string> noteExtra = new List <string>(); noteExtra.Add(selectedNote.Title); noteExtra.Add(selectedNote.Id.ToString()); var intent = new Intent(this, typeof(NodeActivity)); intent.PutStringArrayListExtra("Title and ID", noteExtra); StartActivity(intent); }
public static int GetNumChildren(note parent) { int children = 0; foreach (note n in conn.Table <note>().ToList()) { if (n.ParentId == parent.Id) { children++; } } return(children); }
public static void DeleteRecursive(string title) { note target = GetNoteFromTitle(title); List <note> notesList = GetAllNotes(); foreach (note n in notesList.ToArray()) { if (n.ParentId == target.Id) { DeleteRecursive(n.Title); } } DeleteNote(title); }
public static note GetNoteFromTitle(string title) { note note = conn.Table <note>().Where(x => x.Title == title).FirstOrDefault(); return(note); }