Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("TopicItemId,NoteTopicId,BlogPostId,TopicItemThought,ItemCreateDate")] TopicItem topicItem)
        {
            if (id != topicItem.TopicItemId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(topicItem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TopicItemExists(topicItem.TopicItemId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BlogPostId"]  = new SelectList(_context.BlogPost, "BlogPostId", "BlogText", topicItem.BlogPostId);
            ViewData["NoteTopicId"] = new SelectList(_context.NoteTopic, "NoteTopicId", "NoteTopicComment", topicItem.NoteTopicId);
            return(View(topicItem));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("TopicKeywordId,TopicItemId,TopicKeywordName,TopicKeywordRemark,KeywordCreateDate")] TopicKeyword topicKeyword)
        {
            if (id != topicKeyword.TopicKeywordId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(topicKeyword);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TopicKeywordExists(topicKeyword.TopicKeywordId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["TopicItemId"] = new SelectList(_context.TopicItem, "TopicItemId", "TopicItemId", topicKeyword.TopicItemId);
            return(View(topicKeyword));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("UserProfileId,FirstName,LastName,NickName,Age,Bio,ProfileCreateDate,UserProfileAccount")] UserProfile userProfile)
        {
            if (id != userProfile.UserProfileId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(userProfile);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserProfileExists(userProfile.UserProfileId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(userProfile));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("BlogThemeId,BlogThemetitle,ThemeCreateDate")] BlogTheme blogTheme)
        {
            if (id != blogTheme.BlogThemeId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(blogTheme);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BlogThemeExists(blogTheme.BlogThemeId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(blogTheme));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("BlogInfoId,BlogSubThemeId,BlogInfoTitle,UserProfileId,InfoCreateDate")] BlogInfo blogInfo)
        {
            if (id != blogInfo.BlogInfoId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(blogInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BlogInfoExists(blogInfo.BlogInfoId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BlogSubThemeId"] = new SelectList(_context.BlogSubTheme, "BlogSubThemeId", "BlogSubThemetitle", blogInfo.BlogSubThemeId);
            ViewData["UserProfileId"]  = new SelectList(_context.UserProfile, "UserProfileId", "Bio", blogInfo.UserProfileId);
            return(View(blogInfo));
        }
Exemplo n.º 6
0
        public async Task <IActionResult> Edit(int id, [Bind("GroupedItemId,LogGroupingId,BlogPostId,GroupedItemComment,ItemCreateDate")] GroupedItem groupedItem)
        {
            if (id != groupedItem.GroupedItemId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(groupedItem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GroupedItemExists(groupedItem.GroupedItemId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BlogPostId"]    = new SelectList(_context.BlogPost, "BlogPostId", "BlogText", groupedItem.BlogPostId);
            ViewData["LogGroupingId"] = new SelectList(_context.LogGrouping, "LogGroupingId", "LogGroupingComment", groupedItem.LogGroupingId);
            return(View(groupedItem));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> Edit(int id, [Bind("LogGroupingId,UserProfileId,LogGroupingtitle,LogGroupingComment,GroupingCreateDate")] LogGrouping logGrouping)
        {
            if (id != logGrouping.LogGroupingId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(logGrouping);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LogGroupingExists(logGrouping.LogGroupingId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["UserProfileId"] = new SelectList(_context.UserProfile, "UserProfileId", "Bio", logGrouping.UserProfileId);
            return(View(logGrouping));
        }
Exemplo n.º 8
0
        public async Task <IActionResult> Edit(int id, [Bind("BlogPostId,BlogInfoId,BlogPostTitle,BlogText,PostCreateDate")] BlogPost blogPost)
        {
            if (id != blogPost.BlogPostId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(blogPost);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BlogPostExists(blogPost.BlogPostId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BlogInfoId"] = new SelectList(_context.BlogInfo, "BlogInfoId", "BlogInfoId", blogPost.BlogInfoId);
            return(View(blogPost));
        }
Exemplo n.º 9
0
        public IActionResult Edit(int?id, [Bind("NoteTopicId,UserProfileId,NoteTopicTitle," +
                                                "NoteTopicComment,TopicCreateDate")] NoteTopic noteTopic)
        {
            if (id != noteTopic.NoteTopicId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                _context.Update(noteTopic);
                _context.SaveChanges();
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["UserProfileId"] = new SelectList(_context.UserProfile, "UserProfileId", "Bio", noteTopic.UserProfileId);
            return(View(noteTopic));
        }