예제 #1
0
        public ActionResult Index(PageModel model)
        {
            if (ModelState.IsValid)
            {
                var context = new ProcessorContext(_step.OnSubmit.Processor, OrderSession.Current);
                context.Success += ProcessorOnSuccess;
                context.Failure += ProcessorOnFailure;
                context.Error += ProcessorOnError;
                context.Complete += this.PostComplete;

                context.Process();

                if (_model.IsComplete)
                {
                    return this.View(_step.View, new PageModel());
                }
            }

            return View(_step.View, _model);
        }
예제 #2
0
 public HomeController()
 {
     _context = new StepContext(OrderSession.Current);
     _model = new PageModel();
     _step = _context.CurrentStep();
 }