public ViewResult ReviewRequest(int id) { SpConnectionVPN spConnection = new SpConnectionVPN(); List<VpnRequest> storage = spConnection.getPendingReviews(); ViewBag.id = id; //the id in the parameter is the request id : the id used on our sharepoint site foreach(VpnRequest current in storage) { if (current.VPN_requestID == id) { //check if the request is in final IT manager step if (current.VPN_requestStatus.Equals("Pending IT Manager Approval")) { //if the request is in the final IT manager step, send to ReviewRequestIT return ReviewRequestIT(current); } ViewBag.details = current; return View(); } } return View(); }
public ViewResult ReviewRequests() { //ReviewAll is currently not being show; it is hidden in the views. SpConnectionVPN spConncetion = new SpConnectionVPN(); ViewBag.ReviewPending = spConncetion.getPendingReviews(); ViewBag.ReviewApproved = spConncetion.getApprovedReviews(); ViewBag.ReviewRejected = spConncetion.getRejectedReviews(); ViewBag.ReviewAll = spConncetion.getAllReviews(); return View(); }