protected override void OnLoad(EventArgs e) { ExTraceGlobals.TasksCallTracer.TraceDebug((long)this.GetHashCode(), "EditTask.OnLoad"); base.OnLoad(e); this.task = base.Initialize <Task>(false, TaskUtilities.TaskPrefetchProperties); if (this.task != null) { if (this.task.StartDate != null) { this.startDate = this.task.StartDate.Value; } if (this.task.DueDate != null) { this.dueDate = this.task.DueDate.Value; } if (this.task.CompleteDate != null) { this.completeDate = this.task.CompleteDate.Value; } object obj = this.task.TryGetProperty(ItemSchema.ReminderDueBy); if (obj is ExDateTime) { this.reminderDate = (ExDateTime)obj; } this.SetWorkTime(); TaskUtilities.RenderInfobarMessages(this.task, this.infobar); this.recurrenceUtilities = new RecurrenceUtilities(this.task.Recurrence, base.Response.Output); } else { int workDayStartTimeInWorkingHoursTimeZone = base.UserContext.WorkingHours.WorkDayStartTimeInWorkingHoursTimeZone; this.recurrenceUtilities = new RecurrenceUtilities(null, base.Response.Output); } this.toolbar = new EditTaskToolbar(base.IsEmbeddedItem, base.UserCanDeleteItem); }
protected override void OnLoad(EventArgs e) { ExTraceGlobals.TasksCallTracer.TraceDebug((long)this.GetHashCode(), "ReadTask.OnLoad"); base.OnLoad(e); this.task = base.Initialize <Task>(TaskUtilities.TaskPrefetchProperties); TaskUtilities.RenderInfobarMessages(this.task, this.infobar); if (!this.IsAssignedTask && !this.IsPreview) { this.infobar.AddMessage(2078257811, InfobarMessageType.Informational); } }