private Reminder CreateReminder(LoginUser loginUser, int taskID, string taskName, DateTime reminderDate, bool isDismissed, int userID) { Reminders reminderHelper = new Reminders(loginUser); Reminder reminder = reminderHelper.AddNewReminder(); reminder.DateCreated = DateTime.UtcNow; reminder.Description = taskName; DateTime reminderDueDate = DateTime.Now; if (reminderDate != null) { reminderDueDate = (DateTime)reminderDate; } reminder.DueDate = reminderDueDate; reminder.IsDismissed = isDismissed; reminder.RefType = ReferenceType.Tasks; reminder.RefID = taskID; reminder.HasEmailSent = false; reminder.UserID = userID; reminder.CreatorID = loginUser.UserID; reminder.OrganizationID = loginUser.OrganizationID; reminderHelper.Save(); return(reminder); }