Example #1
0
        public static async Task <int> SubmitZeroActivityReminderAsync(Guid userId, int period)
        {
            var startTime = await DalZeroActivity.FetchStartTimeOfZeroActivityAsync(period);

            DateTime startDateTime;

            if (!DateTime.TryParse(startTime, out startDateTime))
            {
                return(-2);
            }
            else if (DateTime.Now >= startDateTime)
            {
                return(-3);
            }
            if (await DalZeroActivity.HasZeroActivityReminderSubmittedAsync(userId, period))
            {
                return(-1);
            }
            return(await DalZeroActivity.SubmitZeroActivityReminderAsync(userId, period));
        }
Example #2
0
 public static async Task <bool> HasZeroActivityReminderSubmittedAsync(Guid userId, int period)
 {
     return(await DalZeroActivity.HasZeroActivityReminderSubmittedAsync(userId, period));
 }