コード例 #1
0
ファイル: PlanTask.cs プロジェクト: Powerlight2017/catplanner
        public PlanTaskDto ToDto()
        {
            var result = new PlanTaskDto()
            {
                Title            = Title,
                CompleteDate     = CompleteDate.ToLocalTime(),
                CreatedDate      = CreatedDate.ToLocalTime(),
                Creator          = Creator.ToDto(),
                Deadline         = Deadline.ToLocalTime(),
                Description      = Description,
                Id               = Id,
                IsTask           = IsTask,
                SelectedForToday = SelectedForToday,
                Status           = this.Status,
                RemindAt         = RemindAt.ToLocalTime(),
                ReminderSent     = ReminderSent,
                PlannedBeginDate = PlannedBeginDate.ToLocalTime(),
                AccessRights     = (AccessRights == null ? new List <ACLEntryDto>()
                                : AccessRights.Select(x => x.ToDto())).ToList(),
                IsShared             = IsShared,
                PlannedDateProcessed = PlannedDateProcessed
            };


            if (Parent != null)
            {
                result.ParentTaskId = Parent.Id;
                result.Parent       = Parent.ToDto();
            }

            return(result);
        }
コード例 #2
0
ファイル: Note.cs プロジェクト: Powerlight2017/catplanner
        public Dto.NoteDto ToDto()
        {
            var result = new Dto.NoteDto()
            {
                Title       = Title,
                CreatedDate = CreatedDate.ToLocalTime(),
                Creator     = Creator.ToDto(),
                Id          = Id,
                noteType    = noteType,
                text        = text
            };

            if (Parent != null)
            {
                result.ParentNoteId = Parent.Id;
                result.Parent       = Parent.ToDto();
            }

            return(result);
        }
コード例 #3
0
ファイル: AtsExam.cs プロジェクト: januszmarcinik/EduNurse
 public Exam ToDomainModel()
 {
     return(new Exam(Guid.Parse(RowKey), Name, (ExamType)Type, Category, CreatedBy, CreatedDate.ToLocalTime(), IsConfirmed));
 }