예제 #1
0
 public static NoteDTO ToNoteDTO(BaseNote note, SourceType sourceType)
 {
     return(new NoteDTO(sourceType)
     {
         ID = note.ID,
         ParentID = note.GetParentID(),
         CorrespondenceType = note.CorrespondenceType,
         CorrespondenceName = note.CorrespondenceName,
         Comments = note.Comments,
         FollowupDate = note.FollowupDate,
         RequiresFollowup = note.RequiresFollowup,
         Tasks = note.GetTasks()?.Select(m => ToNoteTaskDTO(m, sourceType))
     });
 }
예제 #2
0
 public static NoteDetailsDTO ToNoteDetailsDTO(BaseNote note, SourceType sourceType)
 {
     return(new NoteDetailsDTO(sourceType)
     {
         ID = note.ID,
         ParentID = note.GetParentID(),
         CorrespondenceType = note.CorrespondenceType,
         CorrespondenceName = note.CorrespondenceName,
         EntryDate = note.EntryDate,
         EnteredByUserID = note.EnteredByUserID,
         Comments = note.Comments,
         FollowupComments = note.FollowupComment,
         IsActive = note.RequiresFollowup && !note.FollowupComplete,
         TaskItems = note.GetTasks()?.Select(m => ToNoteTaskDTO(m, sourceType))
     });
 }