Esempio n. 1
0
        public async Task <IActionResult> Edit(int id, [Bind("LineID,GoCanSubmissionGUID,FormName")] MySubmissions mySubmissions)
        {
            if (id != mySubmissions.LineID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mySubmissions);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MySubmissionsExists(mySubmissions.LineID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(mySubmissions));
        }
        public async Task <IActionResult> Edit(int id, [Bind("LineID,BadgeID,FirstName,LastName,Username,Location,Active,Suspended")] CatchWatchEmployee CatchWatchEmployee)
        {
            if (id != CatchWatchEmployee.LineID)
            {
                return(NotFound());
            }

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