public string getRecent() { NoteM nm = new NoteM(); nm.schedule_id = this.schedule_id; return(nm.getLastInsertedNotId()); }
private void delete() { NoteM nm = new NoteM(); nm.note_id = this.note_id; nm.deleteNote(); if (nm.response == "500") { this.response = "500"; } }
private void addN() { NoteM nm = new NoteM(); nm.note_title = this.note_title; nm.note = this.note; nm.schedule_id = this.schedule_id; nm.addNote(); if (nm.response == "500") { this.response = "500"; } }
private void delSch() { ScheduleM sm = new ScheduleM(); NoteM nm = new NoteM(); nm.schedule_id = this.schedule_id; sm.schedule_id = this.schedule_id; nm.deleteNoteBySchId(); sm.deleteSch(); if (sm.response == "500" || nm.response == "500") { response = "500"; } }
/* * public NoteViewerP() {} * public NoteViewerP(string i, string t, string n, string sid) * { * this.note_id = i; * this.note_title = t; * this.note = n; * this.schedule_id = sid; * } */ public NoteViewerP getNote() { NoteViewerP nmp = new NoteViewerP(); NoteM nm = new NoteM(); nm.note_id = this.note_id; nm = nm.getNoteById(); if (nm.response == "500") { nmp.response = "500"; } else { nmp.note_title = nm.note_title; nmp.note = nm.note; } return(nmp); }
public string getNoteList() { string noteList = ""; NoteM note = new NoteM(); note.schedule_id = this.id; foreach (NoteM n in note.getAllNotes()) { noteList = noteList + "<ul class='note-list'>" + "<li><a href='/view/note?nid=" + n.note_id + "'><div class='note-list-title'>" + n.note_title + "</div></a></li></ul>"; } if (note.response == "500") { return("Error!"); } else { return(noteList); } }