public async Task <IActionResult> Edit(int id, [Bind("TransferID,AccountNumberFrom,AccountNumberTo,NameSurname,Street,City,PostalCode,Amount,Title,ExecutionDate")] Transfer transfer)
        {
            if (id != transfer.TransferID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(transfer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TransferExists(transfer.TransferID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(transfer));
        }
Exemple #2
0
 public void TransferUpdateEmployee(int Id, Employee employee)
 {
     _context.Update(employee);
     _context.SaveChanges();
 }