/*
   * save note to the database
   */
  protected void saveNote() {

    Note note = new Note();

    note.setLocation(location.getText().toString());
    note.setDate(currentDate);
    note.setTitle(title.getText().toString());
    note.setNoteContent(content.getText().toString());

    if (isEdit) {
      note.setId(noteID);
      controller.modify(noteID, note);
      Toast.makeText(getBaseContext(), "Note Modified !", Toast.LENGTH_LONG).show();
      finish();

    } else {
      note.setId(0);
      long s = controller.save(note);
      Toast.makeText(getBaseContext(), "Note  Saved !", Toast.LENGTH_LONG).show();
      finish();
    }
  }