public async Task createProcrastinateCalendarEvent(TilerUser user) { DateTimeOffset now = Utility.ProcrastinateStartTime; CalendarEvent procrastinateCalEvent = ProcrastinateCalendarEvent.generateProcrastinateAll(now, user, TimeSpan.FromSeconds(1), null, "UTC"); dbContext.CalEvents.Add(procrastinateCalEvent); await dbContext.SaveChangesAsync().ConfigureAwait(false); }
public DB_ProcrastinateAllSubCalendarEvent(TilerUser user, TilerUserGroup group, string timeZone, TimeLine timeLine, EventID calendarEventId, TilerElements.Location location, ProcrastinateCalendarEvent calendarEvent, bool isEnabled, bool isCompleted) : base(user, group, timeZone, timeLine, calendarEventId, location, calendarEvent) { this._TimeZone = timeZone; updateStartTime(timeLine.Start); updateEndTime(timeLine.End); this._RigidSchedule = true; this.UniqueID = calendarEventId; this._Creator = user; this._Users = group; this._Enabled = isEnabled; this._Complete = isCompleted; this._ProfileOfNow = new NowProfile(); this._ProfileOfProcrastination = new Procrastination(new DateTimeOffset(), new TimeSpan()); _isProcrastinateEvent = true; this._calendarEvent = calendarEvent; }