public ActionResult Create([Bind(Include = "Id,Text,TextDate")] NewsContent newsContent)
        {
            if (ModelState.IsValid)
            {
                db.NewsContents.Add(newsContent);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(newsContent));
        }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Id,Text,Path")] HomeImageSlider homeImageSlider)
        {
            if (ModelState.IsValid)
            {
                db.HomeImageSliders.Add(homeImageSlider);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(homeImageSlider));
        }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,Name,Path")] Menu menu)
        {
            if (ModelState.IsValid)
            {
                db.Menus.Add(menu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(menu));
        }
        public ActionResult Create([Bind(Include = "Id,UserName,Password,Email")] Login login)
        {
            if (ModelState.IsValid)
            {
                db.Logins.Add(login);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(login));
        }
        public ActionResult Create([Bind(Include = "Id,Name,ClickPath,IconPath")] SubjectPrograms subjectPrograms)
        {
            if (ModelState.IsValid)
            {
                db.SubjectPrograms.Add(subjectPrograms);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(subjectPrograms));
        }
        public ActionResult Create([Bind(Include = "Id,Name,LogoPath,ClickPath")] PartnersAcademy partnersAcademy)
        {
            if (ModelState.IsValid)
            {
                db.PartnersAcademies.Add(partnersAcademy);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(partnersAcademy));
        }
        public ActionResult Create([Bind(Include = "Id,Name,JobPosition,Text,ImagePath")] CommentSlider commentSlider)
        {
            if (ModelState.IsValid)
            {
                db.CommentSliders.Add(commentSlider);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(commentSlider));
        }