Example #1
0
        public ActionResult Login(string returnUrl)
        {
            var context = new Context();
            var log     = new SysLogModel(context: context);

            if (Sessions.LoggedIn())
            {
                if (QueryStrings.Bool("new"))
                {
                    Authentications.SignOut();
                }
                log.Finish(context: context);
                return(base.Redirect(Locations.Top()));
            }
            var html = UserUtilities.HtmlLogin(
                context: context,
                returnUrl: returnUrl,
                message: Request.QueryString["expired"] == "1" && !Request.IsAjaxRequest()
                    ? Messages.Expired().Text
                    : string.Empty);

            ViewBag.HtmlBody = html;
            log.Finish(context: context, responseSize: html.Length);
            return(View());
        }
Example #2
0
 public string Do()
 {
     if (Parameters.BackgroundTask.Enabled)
     {
         if (QueryStrings.Bool("NoLog"))
         {
             return(BackgroundTasks.Do());
         }
         else
         {
             var log  = new SysLogModel();
             var html = BackgroundTasks.Do();
             log.Finish(html.Length);
             return(html);
         }
     }
     else
     {
         return(null);
     }
 }
Example #3
0
 public string Remind()
 {
     if (Parameters.Reminder.Enabled)
     {
         if (QueryStrings.Bool("NoLog"))
         {
             return(ReminderScheduleUtilities.Remind());
         }
         else
         {
             var log  = new SysLogModel();
             var json = ReminderScheduleUtilities.Remind();
             log.Finish(json.Length);
             return(json);
         }
     }
     else
     {
         return(null);
     }
 }
Example #4
0
        public string Remind()
        {
            var context = new Context();

            if (Parameters.Reminder.Enabled)
            {
                if (QueryStrings.Bool("NoLog"))
                {
                    return(ReminderScheduleUtilities.Remind(context: context));
                }
                else
                {
                    var log  = new SysLogModel(context: context);
                    var json = ReminderScheduleUtilities.Remind(context: context);
                    log.Finish(context: context, responseSize: json.Length);
                    return(json);
                }
            }
            else
            {
                return(null);
            }
        }
Example #5
0
        public string Do()
        {
            var context = new Context();

            if (Parameters.BackgroundTask.Enabled)
            {
                if (QueryStrings.Bool("NoLog"))
                {
                    return(BackgroundTasks.Do(context));
                }
                else
                {
                    var log  = new SysLogModel(context: context);
                    var html = BackgroundTasks.Do(context: context);
                    log.Finish(context: context, responseSize: html.Length);
                    return(html);
                }
            }
            else
            {
                return(null);
            }
        }