public async Task <IActionResult> Edit(int id, [Bind("ID,Name,StatusFlag,LastUpdate")] MSalaryType mSalaryType) { if (id != mSalaryType.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(mSalaryType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MSalaryTypeExists(mSalaryType.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(mSalaryType)); }
public async Task <IActionResult> Create([Bind("ID,Name,StatusFlag,LastUpdate")] MSalaryType mSalaryType) { if (ModelState.IsValid) { _context.Add(mSalaryType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mSalaryType)); }
// GET: MSalaryTypes/Create public IActionResult Create() { var mSalaryType = new MSalaryType(); return(View(mSalaryType)); }