예제 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("NotificationID,UserID,Date,Description,Type")] Notification notification)
        {
            if (id != notification.NotificationID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(notification);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!NotificationExists(notification.NotificationID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["UserID"] = new SelectList(_context.Candidates, "UserID", "FullName", notification.UserID);
            ViewData["UserID"] = new SelectList(_context.Employers, "UserID", "Company", notification.UserID);
            return(View(notification));
        }
예제 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("ResumeID,UserID,Language,Email,Phone,HighestEducation,WorkExperience,Skills")] 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)));
            }
            ViewData["UserID"] = new SelectList(_context.Candidates, "UserID", "FullName", resume.UserID);
            return(View(resume));
        }
예제 #3
0
        public async Task <IActionResult> Edit(int id, [Bind("UserID,FullName,Email,PhoneNumber")] Candidate candidate)
        {
            if (id != candidate.UserID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(candidate);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CandidateExists(candidate.UserID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(candidate));
        }
예제 #4
0
        public async Task <IActionResult> Edit(int id, [Bind("SavedSearchID,CandidateID,EmployerID,SearchedTerm")] SavedSearch savedSearch)
        {
            if (id != savedSearch.SavedSearchID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(savedSearch);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SavedSearchExists(savedSearch.SavedSearchID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(savedSearch));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ApplicationID,Date,Coverletter,JobPostingID,UserID,ResumeID")] JobApplication jobApplication)
        {
            if (id != jobApplication.ApplicationID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(jobApplication);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!JobApplicationExists(jobApplication.ApplicationID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["UserID"]       = new SelectList(_context.Candidates, "UserID", "FullName", jobApplication.UserID);
            ViewData["JobPostingID"] = new SelectList(_context.JobPostings, "JobPostingID", "JobPostingID", jobApplication.JobPostingID);
            ViewData["ResumeID"]     = new SelectList(_context.Resumes, "ResumeID", "ResumeID", jobApplication.ResumeID);
            return(View(jobApplication));
        }
예제 #6
0
      public async Task <IActionResult> Edit(int id, [Bind("JobPostingID,Company,Description,CompanyAddress,Email,Salary,UserID")] JobPosting jobPosting)
      {
          if (id != jobPosting.JobPostingID)
          {
              return(NotFound());
          }

          if (ModelState.IsValid)
          {
              try
              {
                  _context.Update(jobPosting);
                  await _context.SaveChangesAsync();
              }
              catch (DbUpdateConcurrencyException)
              {
                  if (!JobPostingExists(jobPosting.JobPostingID))
                  {
                      return(NotFound());
                  }
                  else
                  {
                      throw;
                  }
              }
              return(RedirectToAction(nameof(Index)));
          }
          ViewData["UserID"] = new SelectList(_context.Employers, "UserID", "Company", jobPosting.UserID);
          return(View(jobPosting));
      }
예제 #7
0
        public async Task <IActionResult> Edit(int id, [Bind("JobCreatedID,UserID,JobPostingID")] JobCreated jobCreated)
        {
            if (id != jobCreated.JobCreatedID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(jobCreated);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!JobCreatedExists(jobCreated.JobCreatedID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(jobCreated));
        }
예제 #8
0
        public async Task <IActionResult> Edit(int id, [Bind("UserID,FullName,Company,JobTitle,Email,Phone,YearEstablished,Biography")] Employer employer)
        {
            if (id != employer.UserID)
            {
                return(NotFound());
            }

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