コード例 #1
0
ファイル: HomeController.cs プロジェクト: IdeaFortune/Epimen
        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);
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: IdeaFortune/Epimen
        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);
        }