Exemple #1
0
        public IActionResult Create(ConfigueSectionAGetModel configueSectionAGetModel)
        {
            var model = new ConfigureSectionsModel
            {
                ConfigueSectionAGetModel = configueSectionAGetModel
            };

            if (ModelState.IsValid)
            {
                var id = _configureService.AddConfigueSectionAModel(configueSectionAGetModel);
                return(Redirect($"Update/{id}"));
            }

            return(View("Index", model));
        }
Exemple #2
0
        public ConfigureSectionsModel GetDefaultModel()
        {
            var model = new ConfigureSectionsModel
            {
                ConfigueSectionAGetModel = new ConfigueSectionAGetModel()
            };

            model.ConfigueSectionAGetModel.PartTypeItems = new List <SelectListItem>
            {
                new SelectListItem {
                    Value = "LL1", Text = "LL1"
                },
                new SelectListItem {
                    Value = "LL2", Text = "LL2"
                },
                new SelectListItem {
                    Value = "LL3", Text = "LL3"
                }
            };

            return(model);
        }