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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }