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; }
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); }
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); }
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); }