Esempio n. 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,RefNumber,BirthDate,RefType,Category,CategoryType,Distrikt,Club,StreetAddress,Zipcode,County,Phone1,Phone2,Email,Registred,Created,Payed")] Domarlista domarlista)
        {
            if (id != domarlista.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(domarlista);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DomarlistaExists(domarlista.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(domarlista));
        }
Esempio n. 2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Receipt_Id,MatchNumber,MatchDate,Match,MatchRef1,FeeRef1,AllowanceRef1,TravelCostRef1,MatchRef2,FeeRef2,AllowanceRef2,TravelCostRef2,MatchRef3,FeeRef3,AllowanceRef3,TravelCostRef3,MatchRef4,FeeRef4,AllowanceRef4,TravelCostRef4")] Receipt receipt)
        {
            if (id != receipt.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(receipt);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ReceiptExists(receipt.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(receipt));
        }