Esempio n. 1
0
 /// <summary>
 /// Saves a single <see cref="NoteComment"/>
 /// </summary>
 /// <param name="noteComment"></param>
 public void Save(NoteComment noteComment)
 {
     using (var repo = new NoteCommentRepository())
     {
         repo.AddOrUpdate(noteComment);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Add a new <see cref="NoteComment"/>
 /// </summary>
 /// <param name="comment"></param>
 public void Add(int note, int userId, NoteCommentType type, string description)
 {
     using (var repo = new NoteCommentRepository())
     {
         repo.AddOrUpdate(new NoteComment()
         {
             LogType    = type.ToString(),
             LogComment = description,
             Datestamp  = DateTime.Now,
             NoteId     = note,
             UserId     = userId
         });
     }
 }