public GetPersonalDetailsResponse GetPersonalDetails(GetPersonalDetailsRequest request) { Domain.StaffMember staffMember; if ((!request.FirstName.Equals("")) && (!request.LastName.Equals(""))) { staffMember = _staffOrderRepo.GetStaffMember(request.FirstName, request.LastName); } else if ((!request.EmpNo.Equals(""))) { staffMember = _staffOrderRepo.GetStaffMemberEmpNo(request.EmpNo); } else { staffMember = _staffOrderRepo.GetStaffMember(request.Username); } if (staffMember == null) { throw new StaffException("Cannot find personal details."); } GetPersonalDetailsResponse response = new GetPersonalDetailsResponse() { EmpNo = staffMember.EmpNo, ContactNo = staffMember.ContactNo, LastName = staffMember.LastName, FirstName = staffMember.FirstName, Department = staffMember.Department, ExtNo = staffMember.ExtNo }; return(response); }
public GetPersonalDetailsResponse GetPersonalDetails([FromBody] GetPersonalDetailsRequest request) { var result = _agentService.GetPersonalDetails(request); return(result); }