public ActionResult Edit(SubSubSubCategoryViewModel subSubSubCategoryViewModel)
        {
            if (ModelState.IsValid)
            {
                SubSubSubCategoryServices.Update(subSubSubCategoryViewModel);
                return(RedirectToAction("Index"));
            }

            return(View(subSubSubCategoryViewModel));
        }
        public ActionResult Create(SubSubSubCategoryViewModel subSubSubCategoryViewModel)
        {
            if (ModelState.IsValid)
            {
                SubSubSubCategoryServices.Create(subSubSubCategoryViewModel);
                return(RedirectToAction("Index"));
            }

            loadAll();
            return(View(subSubSubCategoryViewModel));
        }
Esempio n. 3
0
        public void Create(SubSubSubCategoryViewModel SubSubSubCategoryViewModel)
        {
            var SubSubSubCategory = new SubSubSubCategory
            {
                SubSubSubCategoryName = SubSubSubCategoryViewModel.SubSubSubCategoryName,
                SubSubCategoryId      = SubSubSubCategoryViewModel.SubSubCategoryId,
                SubCategoryId         = SubSubSubCategoryViewModel.SubCategoryId,
                CategoryId            = SubSubSubCategoryViewModel.CategoryId
            };

            unitOfWork.SubSubSubCategoryRepository.Insert(SubSubSubCategory);
            unitOfWork.Save();
        }
        // GET: SubSubSubCategory/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SubSubSubCategoryViewModel subSubSubCategoryViewModel = SubSubSubCategoryServices.GetByID(id);

            if (subSubSubCategoryViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(subSubSubCategoryViewModel));
        }