Exemple #1
0
 protected void listElem_OnAction(string actionName, object actionArgument)
 {
     switch (actionName)
     {
     case "delete":
         var stateID = ValidationHelper.GetInteger(actionArgument, 0);
         if (stateID > 0)
         {
             if (mCanRemoveAutomationProcesses)
             {
                 var stateInfo = AutomationStateInfoProvider.GetAutomationStateInfo(stateID);
                 AutomationStateInfoProvider.DeleteAutomationStateInfo(stateInfo);
             }
         }
         break;
     }
 }
 protected void listElem_OnAction(string actionName, object actionArgument)
 {
     switch (actionName)
     {
     case "delete":
         var stateID = ValidationHelper.GetInteger(actionArgument, 0);
         if (stateID > 0)
         {
             var stateInfo = AutomationStateInfoProvider.GetAutomationStateInfo(stateID);
             if ((stateInfo != null) && WorkflowStepInfoProvider.CanUserRemoveAutomationProcess(CurrentUser, SiteInfoProvider.GetSiteName(stateInfo.StateSiteID)))
             {
                 AutomationStateInfoProvider.DeleteAutomationStateInfo(stateInfo);
             }
         }
         break;
     }
 }