public async Task <IActionResult> Edit(int id, [Bind("ExperienceID,ResumeID,Position,Company,CompanyDesc,JobTitle,StartDate,EndDate")] Experience experience)
        {
            if (id != experience.ExperienceID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(experience);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExperienceExists(experience.ExperienceID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), "Experiences", new { id = experience.ResumeID }));
            }
            ViewData["ResumeID"] = new SelectList(_context.Resumes, "ResumeID", "FirstLast", experience.ResumeID);
            return(View(experience));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("EducationID,ResumeID,Institution,Degree,City,State,StartDate,EndDate")] Education education)
        {
            if (id != education.EducationID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(education);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EducationExists(education.EducationID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), "Educations", new { id = education.ResumeID }));
            }
            ViewData["ResumeID"] = new SelectList(_context.Resumes, "ResumeID", "FirstLast", education.ResumeID);
            return(View(education));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("ResumeID,FirstLast,City,State,Email,Phone,Summary")] Resume resume)
        {
            if (id != resume.ResumeID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(resume);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ResumeExists(resume.ResumeID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(resume));
        }
        public async Task <IActionResult> Edit(int id, [Bind("DutyID,ExperienceID,Priority,Description")] Duty duty)
        {
            if (id != duty.DutyID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(duty);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DutyExists(duty.DutyID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), "Duties", new { id = duty.ExperienceID }));
            }
            ViewData["ExperienceID"] = new SelectList(_context.Experiences, "ExperienceID", "ExperienceID", duty.ExperienceID);
            return(View(duty));
        }