private IHistoryModel GetHistoryModel(IJobStatusLogModel log, IDayAssign dayAssign, IJob job) { var summarizedReportedTime = GetSummarizedReportedTime(log); return(new HistoryModel { JobCreationDate = job.CreationDate, JobStatus = log.StatusId, ChangeStatusComment = log.Comment, ChangeStatusDate = log.Date, Title = new string(job.Title.Take(200).ToArray()), JobComment = dayAssign.Comment, ResidentName = dayAssign.ResidentName, DayAssignId = dayAssign.Id, JobId = job.Id, JobHousingDepartmentId = dayAssign.DepartmentId, UserNameWhoChangedStatus = GetMemberName(log.MemberId), ReportedHours = summarizedReportedTime.Hours, ReportedMinutes = summarizedReportedTime.Minutes, Address = job.GetAddress(dayAssign.DepartmentId), UploadedFiles = GetUploadedFiles(dayAssign, log), CancellationReason = log.CancelingReason }); }