Exemplo n.º 1
0
 public void EditNote(NOTE note, onQueryComplete onComplete)
 {
     ctx.UpdateObject(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
Exemplo n.º 2
0
        private async void SaveNoteButton_Click(object sender, RoutedEventArgs e)
        {

            NOTE note = new NOTE();
            note.TITLE = this.noteTitle.Text;
            note.CONTENT = this.noteContent.Text;
            note.LESSON_ID = allLessons[selectLessonComboBox.SelectedIndex].ID;
            note.CUSTOMER_ID = Constants.User.ID;
            note.DATE = DateTime.Now;
            note.SHARE = sharableCheckBox.IsChecked ?? false;

            if (note == null)
            {
                System.Diagnostics.Debug.WriteLine("note is null!");
            }

            ctx.AddToNOTE(note);
            ctx.BeginSaveChanges(onNoteSaved, null);

            this.addNotePopup.IsOpen = false;
            ClearNote();
            MessageDialog md = new MessageDialog("Note Saved", "Your note have been saved!");
            await md.ShowAsync();
            //md.Content = "Your note have been saved!";



        }
Exemplo n.º 3
0
 public void InsertNote(NOTE note, onQueryComplete onComplete)
 {
     ctx.AddToNOTE(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deletes the note.
 /// </summary>
 /// <param name="note">The note.</param>
 /// <param name="onComplete">The on complete.</param>
 public void DeleteNote(NOTE note, OnQueryComplete onComplete)
 {
     ctx.DeleteObject(note);
     this.onUQC = onComplete;
     ctx.BeginSaveChanges(onQueryComplete2, null);
 }