Exemplo n.º 1
0
        public ActionResult AddCategory(CategoryDTO model)
        {
            if (ModelState.IsValid)
            {
                CategoryDTO CategoryDto = new CategoryDTO()
                {
                    CategoryDtoId          = model.CategoryDtoId,
                    NameCategoryDto        = model.NameCategoryDto,
                    SeoCategoryDTO         = model.SeoCategoryDTO,
                    DescriptionCategoryDto = model.DescriptionCategoryDto,
                    CreatedDateDto         = DateTime.Now,
                    CreatedUserNameDto     = "burak.coskun",
                    ModifiedDateDto        = DateTime.Now,
                    ModifiedUserNameDto    = "burak.coskun"
                };

                CategoryUIService.Kayit(CategoryDto);
                ViewBag.islemDurum = "5";
            }

            else
            {
                ViewBag.islemDurum = "6";
            }

            return(View());
        }