/// <summary> /// Handles action performed event for right HeaderActions. /// </summary> protected void RightHeaderActions_ActionPerformed(object sender, CommandEventArgs args) { switch (args.CommandName) { case TASKS_RESTART_TIMER: // Check "modify" permission if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RestartTimer(SiteInfo.SiteName); break; case TASKS_RUN: // Check "modify" permission if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RunSchedulerASAP(SiteInfo.SiteName); SchedulingTimer.SchedulerRunImmediatelySiteName = SiteInfo.SiteName; break; } pnlUpdate.Update(); }
/// <summary> /// Handles action performed event for right HeaderActions. /// </summary> protected void rightHeaderActions_ActionPerformed(object sender, CommandEventArgs args) { switch (args.CommandName) { case TASKS_RESTART_TIMER: // Check "modify" permission if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RestartTimer(si.SiteName); break; case TASKS_RUN: // Check "modify" permission if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RunSchedulerASAP(si.SiteName); SchedulingTimer.SchedulerRunImmediatelySiteName = si.SiteName; break; } }
protected void btnRestart_Click(object sender, EventArgs e) { // Check "modify" permission if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RestartTimer(si.SiteName); }
/// <summary> /// Handles action performed event for right HeaderActions. /// </summary> protected void RightHeaderActions_ActionPerformed(object sender, CommandEventArgs args) { switch (args.CommandName) { case TASKS_RESET: // Pass 0 for global tasks TaskInfoProvider.ResetAllTasks((SiteID > 0) ? SiteID : 0); string url = UIContextHelper.GetElementUrl("CMS.ScheduledTasks", GetElementName("Tasks"), true); url = URLHelper.AddParameterToUrl(url, "siteid", SiteID.ToString()); url = URLHelper.AddParameterToUrl(url, "reseted", "1"); URLHelper.Redirect(url); break; case TASKS_RESTART_TIMER: // Check "modify" permission if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RestartTimer(SiteInfo.SiteName); break; case TASKS_RUN: // Check "modify" permission if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RunSchedulerASAP(SiteInfo.SiteName); SchedulingTimer.SchedulerRunImmediatelySiteName = SiteInfo.SiteName; break; } pnlUpdate.Update(); }
/// <summary> /// Handles action performed event for right HeaderActions. /// </summary> protected void rightHeaderActions_ActionPerformed(object sender, CommandEventArgs args) { switch (args.CommandName) { case TASKS_RESET: int resetSiteId = (SiteID > 0) ? SiteID : SelectedSiteID; // Pass 0 for global tasks TaskInfoProvider.ResetAllTasks((resetSiteId > 0) ? resetSiteId : 0); URLHelper.Redirect("Tab_Tasks.aspx?" + GetSiteOrSelectedSiteQuery() + "&reseted=1"); break; case TASKS_RESTART_TIMER: // Check "modify" permission if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RestartTimer(si.SiteName); break; case TASKS_RUN: // Check "modify" permission if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.ScheduledTasks", "Modify")) { RedirectToAccessDenied("CMS.ScheduledTasks", "Modify"); } SchedulingTimer.RunSchedulerASAP(si.SiteName); SchedulingTimer.SchedulerRunImmediatelySiteName = si.SiteName; break; } }