Exemplo n.º 1
0
        private void Submit_Clicked(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(Name.Text) ||
                String.IsNullOrWhiteSpace(Text.Text))
            {
                return;
            }

            EditedNote.Name       = Name.Text;
            EditedNote.Text       = Text.Text;
            EditedNote.ModifyDate = DateTime.Now;

            // Update
            Notes.SaveNote(EditedNote).Wait();

            Navigation.PopAsync();
            App.MainPage.Update();
        }
Exemplo n.º 2
0
        private void Submit_Clicked(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(Name.Text) ||
                String.IsNullOrWhiteSpace(Text.Text))
            {
                return;
            }

            DateTime currDate = DateTime.Now;

            Note newNote = new Note
            {
                Name       = Name.Text,
                Text       = Text.Text,
                CreateDate = currDate,
                ModifyDate = currDate
            };

            // Update
            Notes.SaveNote(newNote).Wait();

            Navigation.PopAsync();
            App.MainPage.Update();
        }