Exemplo n.º 1
0
        public ViewResult MyRequest(int id)
        {
            SpConnectionVPN spConnection = new SpConnectionVPN();
            ViewBag.details = spConnection.getRequestById(id);
            ViewBag.id = id;

            return View();
        }
Exemplo n.º 2
0
        public ViewResult MyRequests()
        {
            SpConnectionVPN spConnection = new SpConnectionVPN();

            ViewBag.RequestAll = spConnection.getAllMyRequests();
            ViewBag.RequestRejected = spConnection.getRejectedMyRequests();
            ViewBag.RequestApproved = spConnection.getApprovedMyrequests();
            ViewBag.RequestPending = spConnection.getPendingMyRequests();

            return View();
        }
Exemplo n.º 3
0
        public ViewResult VPNRequest()
        {
            //fetching drop down list values for the form

            SpConnectionVPN spConnect = new SpConnectionVPN();
            ViewBag.vpnStatusType = spConnect.getVpnStatusTypeChoices();
            ViewBag.deptName = spConnect.getDeptNameChoices();
            ViewBag.companyName = spConnect.getCompanyNameChoices();
            ViewBag.officeLoc = spConnect.getQtcOfficeLocationChoices();
            ViewBag.qtcOfficSelect = spConnect.getQtcOfficeSelectChoices();
            ViewBag.machineOwner = spConnect.getMachineOwnerChoices();

            return View();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        public ActionResult VPNRequest(VpnRequest input)
        {
            //formating some input
            input.VPN_requestStatus = "Pending Manager Approval";
            input.DateSubmitted = DateTime.Now.ToString("M/d/yyyy");

            SpConnectionVPN spConnect = new SpConnectionVPN();
            spConnect.addRequest(input);

            return RedirectToAction("/ThankYou", "Portal");
        }
Exemplo n.º 6
0
        public ViewResult ReviewRequestIT(VpnRequest current)
        {
            ViewBag.details = current;
            SpConnectionVPN spConnection = new SpConnectionVPN();
            ViewBag.radiusSelector = spConnection.getVpnRadiusProfileSelect();

            return View("ReviewRequestIT");
        }
Exemplo n.º 7
0
        public ActionResult ReviewRequest(int id, string submit, string comments)
        {
            SpConnectionVPN spConnection = new SpConnectionVPN();
            spConnection.ReviewRequest(id, submit, comments);

            return RedirectToAction("/ReviewerThankYou", "Portal");
        }
Exemplo n.º 8
0
        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();
        }
Exemplo n.º 9
0
        public ActionResult ReviewRequestIT(int id, string submit, string comments, string VPN_Radius, string VPN_Other, string VPN_accessStart, string VPN_accessEnd, string[] checkboxes)
        {
            //checkboxes represent the VPN profile selection. Minimum size 1, max size 2.

            SpConnectionVPN spConnection = new SpConnectionVPN();
            spConnection.ReviewRequest(id, submit, comments, VPN_Radius, VPN_Other, VPN_accessStart, VPN_accessEnd, checkboxes);

            return RedirectToAction("/ReviewerThankYou", "Portal");
        }