public dtoTaskMap(Task oTask, lm.Comol.Modules.TaskList.Domain.TaskPermissionEnum Permission) { TaskID = oTask.ID; TaskName = oTask.Name; Priority = oTask.Priority; Status = oTask.Status; StartDate = (DateTime )oTask.StartDate; if (oTask.EndDate.HasValue) { EndDate = (DateTime)oTask.EndDate; } Deadline = (oTask.Deadline.HasValue) ? oTask.Deadline.Value : Deadline; TaskCompleteness = oTask.Completeness; Level = oTask.Level; this.Permission = Permission; isDeleted = oTask.MetaInfo.isDeleted; if (oTask.Level == 0) { TaskWBS = ""; } else if (isDeleted) { TaskWBS = oTask.TaskWBSstring + "x"; } else { TaskWBS = oTask.TaskWBSstring + oTask.TaskWBSindex; } }
public dtoTaskGantt(Task oTask, lm.Comol.Modules.TaskList.Domain.TaskPermissionEnum Permission) { TaskID = oTask.ID; TaskName = oTask.Name; Priority = oTask.Priority; Status = oTask.Status; StartDate = ((DateTime)oTask.StartDate).ToOADate(); EndDate = ((DateTime)oTask.EndDate).ToOADate(); Deadline = ((DateTime)oTask.Deadline).ToOADate(); TaskCompleteness = oTask.Completeness; Level = oTask.Level; this.Permission = Permission; if (oTask.Level == 0) { TaskWBS = ""; } TaskWBS = oTask.TaskWBSstring + oTask.TaskWBSindex; }