Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("UserId,FirstName,LastName,Rank,Privilege")] UserInfo userInfo)
        {
            if (id != userInfo.UserId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(userInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserInfoExists(userInfo.UserId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(userInfo));
        }
Beispiel #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Da3020Id,UserId,Da5515id,DocNumber,Dodic,Nomenclature,LotNumber,Location,Date,ActionTaken,Qtylost,Qtygained,Balance")] SingleInventory singleInventory)
        {
            if (id != singleInventory.Da3020Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(singleInventory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SingleInventoryExists(singleInventory.Da3020Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(singleInventory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("LineId,Da5515Id,Dodic,Nomenclature,LotNumber,Qtyissued,ResIssued,Qtyreturned,ResReturned,Notes")] SingleTransactionDetails singleTransactionDetails)
        {
            if (id != singleTransactionDetails.LineId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(singleTransactionDetails);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SingleTransactionDetailsExists(singleTransactionDetails.LineId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(singleTransactionDetails));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Da5515Id,UserId,CustomerId,DocNumber,RecUnit,RecDate,Tidate,Notes,Da5515copy")] LocalTransaction localTransaction)
        {
            if (id != localTransaction.Da5515Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(localTransaction);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LocalTransactionExists(localTransaction.Da5515Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(localTransaction));
        }
        public async Task <IActionResult> Edit(string id, [Bind("Dodic,Nomenclature")] DodicLibrary dodicLibrary)
        {
            if (id != dodicLibrary.Dodic)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(dodicLibrary);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DodicLibraryExists(dodicLibrary.Dodic))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(dodicLibrary));
        }
        public async Task <IActionResult> Edit(int id, [Bind("AmmoId,DocNumber,Dodic,Nomenclature,LotNumber,InitialQty,CurrentQty,Location")] LocalInventory localInventory)
        {
            if (id != localInventory.AmmoId)
            {
                return(NotFound());
            }

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