public List<EmployeeVacationRequestViewItem> GetVacationRequests() { String currentUserId = User.Identity.GetUserId(); List<GUIManagement.EmployeeVacationRequestViewItem> resultList = new List<GUIManagement.EmployeeVacationRequestViewItem>(); DBQuery dbq = new DBQuery(); List<VacationManagement.VacationRequest> vacationRequestList = dbq.SelectAllVacationRequestsOfEmployee(currentUserId); String shiftPartnerID = dbq.SelectShiftPartner(currentUserId); String shiftParterName = "-"; if (shiftPartnerID != null) { Employee shiftPartner = dbq.SelectDeputy(currentUserId); shiftParterName = dbq.SelectEmployeeFullName(shiftPartner.getEmployeeID()); } foreach (VacationManagement.VacationRequest vr in vacationRequestList) { var employeeVacationRequest = new GUIManagement.EmployeeVacationRequestViewItem(vr, shiftParterName); resultList.Add(employeeVacationRequest); } return resultList; }