Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }