public async Task <IActionResult> Edit(int id, [Bind("Id,ENamae,ENamaeNamae,ENamaeSeiKana,ENamaeNamaeKana,ENenrei,ESeibetsu,EEmail,EDenwaArea,EDenwaLocal,EDenwa4num,EShigotoKibou,EMendan1Month,EMendan1Day,EMendan1Ampm,EMendan2Month,EMendan2Day,EMendan2Ampm,EMendan3Month,EMendan3Day,EMendan3Ampm,EQuestion")] TKojin tKojin) { if (id != tKojin.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tKojin); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TKojinExists(tKojin.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ESeibetsu"] = new SelectList(_context.TSeibetsu, "Id", "ESeibetsu", tKojin.ESeibetsu); return(View(tKojin)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,ENamae,ENenrei,ESeibetsu")] TKojin tKojin) { if (id != tKojin.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tKojin); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TKojinExists(tKojin.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } ViewData["ESeibetsu"] = new SelectList(_context.TSeibetsu, "Id", "ESeibetsu", tKojin.ESeibetsu); return(View(tKojin)); }
public async Task <IActionResult> Create([Bind("Id,ENamae,ENamaeNamae,ENamaeSeiKana,ENamaeNamaeKana,ENenrei,ESeibetsu,EEmail,EDenwaArea,EDenwaLocal,EDenwa4num,EShigotoKibou,EMendan1Month,EMendan1Day,EMendan1Ampm,EMendan2Month,EMendan2Day,EMendan2Ampm,EMendan3Month,EMendan3Day,EMendan3Ampm,EQuestion")] TKojin tKojin) { if (ModelState.IsValid) { _context.Add(tKojin); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewData["ESeibetsu"] = new SelectList(_context.TSeibetsu, "Id", "ESeibetsu", tKojin.ESeibetsu); return(View(tKojin)); }
public async Task <IActionResult> Create([Bind("Id,ENamae,ENenrei,ESeibetsu")] TKojin tKojin) { if (ModelState.IsValid) { _context.Add(tKojin); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewData["ESeibetsu"] = new SelectList(_context.TSeibetsu, "Id", "ESeibetsu", tKojin.ESeibetsu); return(View(tKojin)); }