public IActionResult SaveEmployeeCertificate(int id, [Bind("Employee,EmployeeCertificate")] ProfileEducationAddCertificateViewModel profileEducationAddCertificateViewModel) { this.employeeCertificateService.Create(new EmployeeCertificate() { EmployeeId = profileEducationAddCertificateViewModel.Employee.Id, CertificateId = profileEducationAddCertificateViewModel.EmployeeCertificate.CertificateId, Date = profileEducationAddCertificateViewModel.EmployeeCertificate.Date }); //return View("ProfileEducations", GetCurrentEmployee()); return(RedirectToAction("ProfileEducations")); }
public IActionResult ShowAddCertification() { ProfileEducationAddCertificateViewModel vm = new ProfileEducationAddCertificateViewModel() { Employee = GetCurrentEmployee(), Certificates = InitializeSelectListItems(this.certificateService.GetAll()), EmployeeCertificate = new EmployeeCertificate() { EmployeeId = GetCurrentEmployee().Id } }; return(View("ProfileEducationAddCertificate", vm)); }