Esempio n. 1
0
        public ActionResult Index()
        {
            var context = new ProcessorContext(_step.OnLoad.Processor, OrderSession.Current);
            context.Success += ProcessorOnSuccess;
            context.Failure += ProcessorOnFailure;
            context.Error += ProcessorOnError;
            context.Complete += ProcessorOnComplete;

            context.Process();

            return View(_step.View, _model);
        }
Esempio n. 2
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);
        }