public async Task <IActionResult> Create([Bind("JobId,Title,JobFunction,Description,Requirement,Responsibilities,Qualifications,Skills,ModifiedDate,CreatedDate,StartDate,EndDate,IsPublic,IsDraft,OwnerId")] JobPosting jobPosting) { if (ModelState.IsValid) { jobPosting.JobId = Guid.NewGuid(); _context.Add(jobPosting); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(jobPosting)); }
public async Task <IActionResult> Create([Bind("Email,CompanyName,isActive,CreatedDate")] Employer employer) { if (ModelState.IsValid) { _context.Add(employer); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employer)); }
public async Task <IActionResult> Create([Bind("FirstName,LastName,Email,CoverLetter")] Resume resume) { if (ModelState.IsValid) { _context.Add(resume); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(resume)); }
public async Task <IActionResult> Create([Bind("FirstName,LastName,Email,IsActive")] Candidate candidate) { if (ModelState.IsValid) { _context.Add(candidate); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(candidate)); }
public async Task <IActionResult> Create([Bind("ExperienceId,StartDate,EndDate,CompanyName,Position,WorkDone")] Experience experience) { if (ModelState.IsValid) { _context.Add(experience); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(experience)); }
public async Task <IActionResult> Create([Bind("EducationId,SchoolName,EducationType,StartDate,EndDate")] Education education) { if (ModelState.IsValid) { _context.Add(education); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(education)); }
public async Task <IActionResult> CreateCompany([Bind("CompanyId,CompanyName,CompanyAddress,CompanyCity,CompanyPostalCode,CompanyLandLinePhoneNumber,CompanyLandLineExtensionNumber,CompanyEmailId,CompanyRegistrationDateTime,CompanyContactPerson,RoleId,UserName")] CompanyDetails companyDetails) { try { if (ModelState.IsValid) { _context.Add(companyDetails); await _context.SaveChangesAsync(); TempData["success"] = true; return(View(companyDetails)); } ViewData["RoleId"] = new SelectList(_context.Role, "RoleId", "PermissionType", companyDetails.RoleId); ViewData["UserName"] = new SelectList(_context.AccountInformation, "UserName", "UserName", companyDetails.UserName); return(View(companyDetails)); } catch (Exception Ex) { ViewData["ErrorMessage"] = Ex.InnerException.Message; return(View(companyDetails)); } }
public async Task <IActionResult> Create([Bind("JobApplicationId,JobId,applicantId")] JobApplication jobApplication) { if (ModelState.IsValid) { jobApplication.JobApplicationId = Guid.NewGuid(); _context.Add(jobApplication); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(jobApplication)); }
public async Task <IActionResult> Create([Bind("JobId,JobTitle,Category,Location,Jobtype,MaxSalary,MinSalary,JobDescription,PayPeriod,NumberOfPosition,JobPostDate,JobExpiryDate,CompnayId")] JobDetails jobDetails) { if (ModelState.IsValid) { _context.Add(jobDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CompnayId"] = new SelectList(_context.CompanyDetails, "CompanyId", "CompanyId", jobDetails.CompnayId); return(View(jobDetails)); }
public async Task <IActionResult> Create([Bind("UserName,Password,RoleId")] AccountInformation accountInformation) { if (ModelState.IsValid) { _context.Add(accountInformation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["RoleId"] = new SelectList(_context.Role, "RoleId", "PermissionType", accountInformation.RoleId); return(View(accountInformation)); }
public async Task <IActionResult> Create([Bind("JobId,JobTitle,Category,Location,Jobtype,MaxSalary,MinSalary,JobDescription,PayPeriod,NumberOfPosition,JobPostDate,JobExpiryDate,CompnayId")] JobDetails jobDetails) { try { if (ModelState.IsValid) { _context.Add(jobDetails); await _context.SaveChangesAsync(); TempData["success"] = true; return(RedirectToAction(nameof(Create))); } ViewData["CompanyName"] = new SelectList(_context.CompanyDetails, "CompanyId", "CompanyName"); return(View(jobDetails)); } catch (Exception Ex) { ViewData["ErrorMessage"] = Ex.GetBaseException().Message; ViewData["CompanyName"] = new SelectList(_context.CompanyDetails, "CompanyId", "CompanyName"); return(View(jobDetails)); } }