예제 #1
0
        public IActionResult CreatePropertyName(PropertyName name)
        {
            if (!ModelState.IsValid)
            {
                ViewBag.Group    = propertyService.GetPropertyGroupForAddNames();
                ViewBag.Catrgory = categoryService.GetCategoryForAdd();
                return(View(name));
            }
            bool res = propertyService.AddPropertyName(name);

            TempData["res"] = res ? "success" : "faild";
            return(RedirectToAction(nameof(PropertyList)));
        }