Пример #1
0
        public async Task <IActionResult> Create([Bind("ID,firstYearImage,firstYearText")] FirstYear_Service_Messages firstYear_Service_Messages)
        {
            if (ModelState.IsValid)
            {
                _context.Add(firstYear_Service_Messages);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(firstYear_Service_Messages));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("ID,Staff_Image,Name,Level,Postion,email,Director")] Staff_Panel staff_Panel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(staff_Panel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(staff_Panel));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("ID,EventTitle,What,When,Where,Info")] Events events)
        {
            if (ModelState.IsValid)
            {
                _context.Add(events);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(events));
        }
Пример #4
0
        public async Task <IActionResult> Create([Bind("LinkID,Image,Title,Message")] Link link)
        {
            if (ModelState.IsValid)
            {
                _context.Add(link);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(link));
        }
Пример #5
0
        public async Task <IActionResult> Create([Bind("ID,TypeOfList,LiTest")] List_Item list_Item)
        {
            if (ModelState.IsValid)
            {
                _context.Add(list_Item);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(list_Item));
        }
Пример #6
0
        public async Task <IActionResult> Create([Bind("ID,founderImage,founderSubTetxt")] Founder_Message founder_Message)
        {
            if (ModelState.IsValid)
            {
                _context.Add(founder_Message);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(founder_Message));
        }
        public async Task <IActionResult> Create([Bind("ID,MessageImage,MessageHeader,Message")] Services_Message services_Message)
        {
            if (ModelState.IsValid)
            {
                _context.Add(services_Message);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(services_Message));
        }
Пример #8
0
        public async Task <IActionResult> Create([Bind("id,date,title,image,imageBlurb,articleText")] Youth_Story youth_Story)
        {
            if (ModelState.IsValid)
            {
                _context.Add(youth_Story);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(youth_Story));
        }
Пример #9
0
        public async Task <IActionResult> Create([Bind("ID,Content_Type,Content_Text")] Help_Panel help_Panel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(help_Panel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(help_Panel));
        }
Пример #10
0
        public async Task <IActionResult> Create([Bind("ID,ArticleText")] introArticle introArticle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(introArticle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(introArticle));
        }
Пример #11
0
        public async Task <IActionResult> Create([Bind("ID,Title,Time,Image,SubTitle,Content_Text")] Media media)
        {
            if (ModelState.IsValid)
            {
                _context.Add(media);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(media));
        }
Пример #12
0
        public async Task <IActionResult> Create([Bind("ID,Doner_Type,Doner_Name,Doner_year")] Doners doners)
        {
            if (ModelState.IsValid)
            {
                _context.Add(doners);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(doners));
        }
Пример #13
0
        public async Task <IActionResult> Create([Bind("ID,Title,Subtitle,BackgroundImage,SubheaderContent")] HomeTitle homeTitle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(homeTitle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(homeTitle));
        }
Пример #14
0
        public async Task <IActionResult> Create([Bind("PurposeID,Title,Message,Content")] Purpose purpose)
        {
            if (ModelState.IsValid)
            {
                _context.Add(purpose);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(purpose));
        }