public async Task <IActionResult> Edit(int id, [Bind("jobNum,Title,Link,shortCategory,LongCategory,Department,Location,Agency,Posted_Date")] search_by_agencycode search_by_agencycode)
        {
            if (id != search_by_agencycode.jobNum)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(search_by_agencycode);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!search_by_agencycodeExists(search_by_agencycode.jobNum))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(search_by_agencycode));
        }
Beispiel #2
0
        public async Task <IActionResult> Edit(int id, [Bind("add_info,hours_shift,job_descrip,min_qual,preferred_skills,recruit_contact,residency_req,to_apply,work_location,jobNum")] job_info_details job_info_details)
        {
            if (id != job_info_details.jobNum)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(job_info_details);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!job_info_detailsExists(job_info_details.jobNum))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(job_info_details));
        }
        public async Task <IActionResult> Edit(int id, [Bind("hiring_agency,jobLink,jobNum,job_ID,business_title,civil_title,title_class,job_category,career_level,work_location,division_work_unit,total_openings,title_code,level,proposed_salary_range,posted,post_until")] job_info_short job_info_short)
        {
            if (id != job_info_short.jobNum)
            {
                return(NotFound());
            }

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