public async Task <IActionResult> Edit(int id, [Bind("公告编号,公告标题,标题色彩,公告内容,发布时间,发布人编号,发布人姓名")] 系统公告 系统公告) { if (id != 系统公告.公告编号) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(系统公告); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!系统公告Exists(系统公告.公告编号)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(系统公告)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Words,解释,WordsReverse,押韵,押韵字使用频率")] 汉字38万词海 汉字38万词海) { if (id != 汉字38万词海.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(汉字38万词海); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!汉字38万词海Exists(汉字38万词海.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(汉字38万词海)); }