public IActionResult AddNote(int id) { var model = new NoteProfileFullToAddViewModel { StudentId = id }; return(this.View(model)); }
public IActionResult AddNote(NoteProfileFullToAddViewModel noteProfileToAdd, int id) { var noteProfileServiceModelToAdd = new NoteProfileFullServiceModel { StudentId = id, SubjectId = (int)noteProfileToAdd.Subject, Title = noteProfileToAdd.Title, Comment = noteProfileToAdd.Comment, DateReceived = noteProfileToAdd.DateReceived, TeacherId = 25, StatusNote = (int)noteProfileToAdd.StatusNote, }; this.noteService.AddNewNoteProfileToStudentByStudentId(noteProfileServiceModelToAdd); return(this.RedirectToAction("NoteApproved", new { id = id })); }