public async Task <IActionResult> Edit(int id, [Bind("DevID,DevFName,DevLName,Email,Phone")] Developer developer)
        {
            if (id != developer.DevID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(developer);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DeveloperExists(developer.DevID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(developer));
        }
        public async Task <IActionResult> Edit(int id, [Bind("AppID,AppName,AppNotes,POC,POCEmail,Telephone,AssignedBA,AssignedDev")] AppList appList)
        {
            if (id != appList.AppID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(appList);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AppListExists(appList.AppID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AssignedBA"]  = new SelectList(_context.Analysts, "BAID", "BAFullname", appList.AssignedBA);
            ViewData["AssignedDev"] = new SelectList(_context.Developers, "DevID", "DevFullname", appList.AssignedDev);
            return(View(appList));
        }
Example #3
0
        public async Task <IActionResult> Edit(int id, [Bind("MsrID,AppTitle,MSRtitle,DateAdded,MSRNote,AssignedEmpID,AssignedAppID")] MSRTask mSRTask)
        {
            if (id != mSRTask.MsrID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mSRTask);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MSRTaskExists(mSRTask.MsrID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AssignedEmp"] = new SelectList(_context.Analysts, "EmpID", "Fullname", mSRTask.AssignedEmpID);
            ViewData["AssignedApp"] = new SelectList(_context.Apps, "AppID", "AppName", mSRTask.AssignedAppID);
            return(View(mSRTask));
        }
Example #4
0
        public async Task <IActionResult> Edit(int id, [Bind("BAID,BAFName,BALName,Email,Phone")] Analyst analyst)
        {
            if (id != analyst.BAID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(analyst);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AnalystExists(analyst.BAID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(analyst));
        }
Example #5
0
        public async Task <IActionResult> Edit(int id, [Bind("EmpID,FName,LName,Email,Phone")] Employee employee)
        {
            if (id != employee.EmpID)
            {
                return(NotFound());
            }

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