Пример #1
0
        public ActionResult VerifyStudent(FormCollection data)
        {
            string submit = data["submit"];
            string regNum = data["regNum"];

            if (regNum == "")
            {
                TempData["error"] = "Registration Number is not valid!";
                return(Redirect(Url.Action("Index", "Home")));
            }
            TestimonialWebApp.StudentVerifierService.StudentVerifierService studentVerifier = new StudentVerifierService.StudentVerifierService();

            if (studentVerifier.verifyStudent(regNum) == false)
            {
                TempData["error"] = "Registration Number is not valid!";
                return(Redirect(Url.Action("Index", "Home")));
            }

            TempData["regNum"] = regNum;

            if (submit.Equals("Application Status"))
            {
                return(Redirect(Url.Action("Status", "Home")));
            }
            else
            {
                return(Redirect(Url.Action("Apply", "Home")));
            }
        }
Пример #2
0
        public ActionResult GenerateTestimonial(FormCollection data)
        {
            if ((string)Session["user"] == null)
            {
                return(Redirect(Url.Action("Index", "Home")));
            }

            string regNum   = data["regNum"];
            int    degreeId = System.Convert.ToInt32(data["degreeId"]);
            int    appId    = System.Convert.ToInt32(data["appId"]);

            StudentVerifierService.StudentVerifierService studentVerifier = new StudentVerifierService.StudentVerifierService();
            StudentVerifierService.Student student = studentVerifier.getStudentInfo(regNum);

            ResultService.ResultService resultService = new ResultService.ResultService();
            ResultService.Result        result        = resultService.getUpdatedResult(regNum, degreeId);

            ViewData["appId"]         = appId;
            ViewData["name"]          = student.name;
            ViewData["fatherName"]    = student.fatherName;
            ViewData["motherName"]    = student.motherName;
            ViewData["gender"]        = student.gender;
            ViewData["regNum"]        = student.regNum;
            ViewData["session"]       = student.session;
            ViewData["degree"]        = result.degree;
            ViewData["semester"]      = result.semester;
            ViewData["totalSemester"] = result.totalSemester;
            ViewData["cgpa"]          = result.cgpa;

            return(View("Testimonial"));
        }