public async Task <IActionResult> Edit(int id, [Bind("ID,ClientID,BankCode,AccountName,AccountNo,Remark,IsActive,UserCreate,DateCreate,UserUpdate,DateUpdate")] ClientAccBankModel clientAccBankModel) { if (id != clientAccBankModel.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(clientAccBankModel); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientAccBankModelExists(clientAccBankModel.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(clientAccBankModel)); }
public async Task <IActionResult> Create([Bind("ID,ClientID,BankCode,AccountName,AccountNo,Remark,IsActive,UserCreate,DateCreate,UserUpdate,DateUpdate")] ClientAccBankModel clientAccBankModel) { if (ModelState.IsValid) { _context.Add(clientAccBankModel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(clientAccBankModel)); }