예제 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("ApplicationID,JobID,ApplicationSubmitted,ApplicationMethod")] Application application)
        {
            if (id != application.ApplicationID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(application);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ApplicationExists(application.ApplicationID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(application));
        }
예제 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("PersonID,CompanyID,FirstName,LastName,Phone,Email,LinkedIn,Notes")] Person person)
        {
            if (id != person.PersonID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(person);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonExists(person.PersonID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(person));
        }
        public async Task <IActionResult> Edit(int id, [Bind("JobOpeningID,CompanyID,JobOpeningTitle,JobOpeningRecorded,JobOpeningSource,JobOpeningUrl,JobOpeningDescription,JobOpeningNotes,JobOpeningActive")] JobOpening jobOpening)
        {
            if (id != jobOpening.JobOpeningID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(jobOpening);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!JobOpeningExists(jobOpening.JobOpeningID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(jobOpening));
        }
        public async Task <IActionResult> Edit(int id, [Bind("CoverLetterID,JobID,CoverLetterText")] CoverLetter coverLetter)
        {
            if (id != coverLetter.CoverLetterID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(coverLetter);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CoverLetterExists(coverLetter.CoverLetterID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(coverLetter));
        }
        public async Task <IActionResult> Edit(int id, [Bind("CompanyID,CompanyName,CompanyUrl,CompanyNotes,CompanyActive")] Company company)
        {
            if (id != company.CompanyID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(company);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CompanyExists(company.CompanyID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(company));
        }