// GET: VacationReplacementRequests public ActionResult Index() { // identify logged-in user String currentUserId = User.Identity.GetUserId(); DBQuery dbq = new DBQuery(); var ReplacementReqList = new List<GUIManagement.VacationReplacementRequestViewItem>(); String shiftPartnerID = dbq.SelectShiftPartner(currentUserId); if (shiftPartnerID != null) { var VRList = dbq.SelectSubmittedVacationRequestsOfShiftPartner(shiftPartnerID); String name = dbq.SelectEmployeeFullName(shiftPartnerID); foreach (VacationManagement.VacationRequest vr in VRList) { GUIManagement.VacationReplacementRequestViewItem vrr = new GUIManagement.VacationReplacementRequestViewItem(vr, name); ReplacementReqList.Add(vrr); } } else { // Labelausgabe GUI } return View(ReplacementReqList); }