public virtual object Save(WizardInputModel model)
        {
            //TODO: add configuration
            //TODO: add configuration checking

            return(ProcessWizard(model, true));
        }
        protected override object ProcessWizard(object inputModel, bool isSave = false)
        {
            var model = new WizardInputModel(inputModel);

            string groupKey  = $"{WizardPrefix}";
            string screenKey = string.IsNullOrWhiteSpace(model.Screen) ? "Screen_Start" : model.Screen;

            //screenKey = "Screen_DoesNotExist";

            /*
             * switch (model.Section)
             * {
             *  case 0:
             *      groupKey = $"{WizardPrefix}_0";
             *      break;
             *  case 1:
             *      if (model.Step < 1)
             *          groupKey = $"{WizardPrefix}_1.1";
             *
             *      if (isSave)
             *      {
             *          model.Validate(ValidationOptions.PersonalInfo);
             *      }
             *      break;
             *  case 3:
             *      if (isSave)
             *      {
             *          model.Validate(ValidationOptions.ApplicationOptions);
             *      }
             *
             *      break;
             *  case 4:
             *      if (model.Step < 1)
             *          groupKey = $"{WizardPrefix}_4";
             *      break;
             * }
             */
            //var fields = DataRepository.GetFieldData(groupKey);


            return(WizardFactory.CreateWizardScreenContent(groupKey, screenKey, model));
        }
Exemple #3
0
        public virtual object Index(WizardInputModel model)
        {
            //TODO: add configuration

            return(ProcessWizard(model, false));
        }