Exemplo n.º 1
0
        public ActionResult Index(StudentTeacherRetrival studentDetails)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("", "Usn not appropriate");
                return(View(studentDetails));
            }

            Session["USN"] = studentDetails.USN;
            RNSITEntities1 db      = new RNSITEntities1();
            var            details = db.GetTeacherDetailsByUSNFunction(studentDetails.USN);

            return(View("StudentDetailsFirstPage", details));
        }
Exemplo n.º 2
0
        public ActionResult ViewClassDetails(string Semester, string Section)
        {
            if (Semester == null || Section == null || Semester == "0" || Section == "0")
            {
                ModelState.AddModelError(string.Empty, "Please provide all the details");
                return(View());
            }
            var    db         = new RNSITEntities();
            string Department = ((string)TempData.Peek("Department")).ToUpper();

            StudentTeacherRetrival studentDetails = new StudentTeacherRetrival();

            studentDetails.USN = db.spGetStudentsInClass(Department, int.Parse(Semester), Section).First().USN;
            var details = db.GetTeacherDetailsByUSN(studentDetails.USN);

            Session["Check"] = true;
            return(View("StudentDetailsFirstPage"));
        }