Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,firstYearImage,firstYearText")] FirstYear_Service_Messages firstYear_Service_Messages)
        {
            if (id != firstYear_Service_Messages.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(firstYear_Service_Messages);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FirstYear_Service_MessagesExists(firstYear_Service_Messages.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(firstYear_Service_Messages));
        }
Exemple #2
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Staff_Image,Name,Level,Postion,email,Director")] Staff_Panel staff_Panel)
        {
            if (id != staff_Panel.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(staff_Panel);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Staff_PanelExists(staff_Panel.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(staff_Panel));
        }
Exemple #3
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,EventTitle,What,When,Where,Info")] Events events)
        {
            if (id != events.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(events);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EventsExists(events.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(events));
        }
Exemple #4
0
        public async Task <IActionResult> Edit(int id, [Bind("LinkID,Image,Title,Message")] Link link)
        {
            if (id != link.LinkID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(link);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LinkExists(link.LinkID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(link));
        }
Exemple #5
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,TypeOfList,LiTest")] List_Item list_Item)
        {
            if (id != list_Item.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(list_Item);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!List_ItemExists(list_Item.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(list_Item));
        }
Exemple #6
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,founderImage,founderSubTetxt")] Founder_Message founder_Message)
        {
            if (id != founder_Message.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(founder_Message);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Founder_MessageExists(founder_Message.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(founder_Message));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,MessageImage,MessageHeader,Message")] Services_Message services_Message)
        {
            if (id != services_Message.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(services_Message);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Services_MessageExists(services_Message.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(services_Message));
        }
        public async Task <IActionResult> Edit(int id, [Bind("id,date,title,image,imageBlurb,articleText")] Youth_Story youth_Story)
        {
            if (id != youth_Story.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(youth_Story);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Youth_StoryExists(youth_Story.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(youth_Story));
        }
Exemple #9
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Content_Type,Content_Text")] Help_Panel help_Panel)
        {
            if (id != help_Panel.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(help_Panel);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Help_PanelExists(help_Panel.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(help_Panel));
        }
Exemple #10
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,ArticleText")] introArticle introArticle)
        {
            if (id != introArticle.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(introArticle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!introArticleExists(introArticle.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(introArticle));
        }
Exemple #11
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Time,Image,SubTitle,Content_Text")] Media media)
        {
            if (id != media.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(media);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MediaExists(media.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(media));
        }
Exemple #12
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Doner_Type,Doner_Name,Doner_year")] Doners doners)
        {
            if (id != doners.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(doners);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DonersExists(doners.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(doners));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Subtitle,BackgroundImage,SubheaderContent")] HomeTitle homeTitle)
        {
            if (id != homeTitle.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(homeTitle);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HomeTitleExists(homeTitle.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(homeTitle));
        }
Exemple #14
0
        public async Task <IActionResult> Edit(int id, [Bind("PurposeID,Title,Message,Content")] Purpose purpose)
        {
            if (id != purpose.PurposeID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(purpose);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PurposeExists(purpose.PurposeID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(purpose));
        }