public int AddContact(NewContactDetailsVm conVm) { var con = _mapper.Map <ContactDetail>(conVm); var id = _employeeRepo.AddContactDetail(con); return(id); }
/****Contact****/ public IActionResult NewContact() { var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; var model = new NewContactDetailsVm { EmployeeId = _empService.GetEmployeeByUserId(userId).Id, ContactDetailTypes = _empService.GetConactDetailTypes().ToList() }; return(PartialView("AddNewContactForEmployee", model)); }
public IActionResult EditContactForEmployee(NewContactDetailsVm con) { _empService.UpdateContact(con); return(RedirectToAction("EditEmployee")); }
public IActionResult AddNewContactForEmployee(NewContactDetailsVm conVm) { var id = _empService.AddContact(conVm); return(RedirectToAction("EditEmployee")); }
public void UpdateContact(NewContactDetailsVm conVm) { var con = _mapper.Map <ContactDetail>(conVm); _employeeRepo.UpdateContact(con); }