Utility class for wizard related queries and operations
Esempio n. 1
0
        public static void RegisterCurrentStepInfo(Controller controller, int stepIndex, String stepName)
        {
            IRailsEngineContext context = controller.Context;
            String wizardName           = WizardUtils.ConstructWizardNamespace(controller);

            context.Session[wizardName + "currentstepindex"] = stepIndex;
            context.Session[wizardName + "currentstep"]      = stepName;
        }
Esempio n. 2
0
        public static bool HasPreviousStep(Controller controller)
        {
            IRailsEngineContext context = controller.Context;

            String wizardName = WizardUtils.ConstructWizardNamespace(controller);

            int currentIndex = (int)context.Session[wizardName + "currentstepindex"];

            return(currentIndex > 0);
        }
Esempio n. 3
0
        public static bool HasNextStep(Controller controller)
        {
            IRailsEngineContext context = controller.Context;

            String wizardName = WizardUtils.ConstructWizardNamespace(controller);

            IList stepList = (IList)context.UnderlyingContext.Items["wizard.step.list"];

            int currentIndex = (int)context.Session[wizardName + "currentstepindex"];

            return((currentIndex + 1) < stepList.Count);
        }
Esempio n. 4
0
        public static String GetNextStepName(Controller controller)
        {
            IRailsEngineContext context = controller.Context;

            String wizardName = WizardUtils.ConstructWizardNamespace(controller);

            int curIndex = (int)context.Session[wizardName + "currentstepindex"];

            IList stepList = (IList)context.UnderlyingContext.Items["wizard.step.list"];

            if ((curIndex + 1) < stepList.Count)
            {
                return((String)stepList[curIndex + 1]);
            }

            return(null);
        }