Ejemplo n.º 1
0
 // Load data for the ViewModel Items
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     DBController lst = new DBController();
     allNotes.ItemsSource = lst.WPNotes.ToList();
     personal.ItemsSource = lst.GetFeaturedNotes();
     work.ItemsSource = lst.GetCategoryNotes("Trabajo");
     personal.ItemsSource = lst.GetCategoryNotes("Personal");
 }
Ejemplo n.º 2
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            List<NoteModel> allList = new List<NoteModel>();
            List<NoteModel> featuredList = new List<NoteModel>();
            List<NoteModel> workList = new List<NoteModel>();
            List<NoteModel> personalList = new List<NoteModel>();

            DBController lst = new DBController();

            personalList = lst.GetCategoryNotes("Personal");
            personal.ItemsSource = personalList;

            workList = lst.GetCategoryNotes("Trabajo");
            work.ItemsSource = workList;

            featuredList = lst.GetFeaturedNotes();
            featured.ItemsSource = featuredList;

            allList = lst.WPNotes.ToList();
            allNotes.ItemsSource = allList;
        }