Exemplo n.º 1
0
        // GET: Teacher/Result
        public ActionResult GetStudentRegno()
        {
            if (Session["Teacher"] == null)
            {
                return(RedirectToAction("Login", "Account", new { area = "" }));
            }
            int            teacherid = Convert.ToInt32(Session["Teacher"]);
            CourseDBHandle gc        = new CourseDBHandle();

            List <Tbl_UserEnrollInCourseValidation> Regnolist = gc.GetStudentRegisterationNoSimilarCourse(teacherid);

            ViewBag.Regno = new SelectList(Regnolist, "EnrollmentId", "RegistrationId");
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult GetStudentRegno(FormCollection formcollection)
        {
            try
            {
                int            teacherid = Convert.ToInt32(Session["Teacher"]);
                CourseDBHandle gc        = new CourseDBHandle();

                List <Tbl_UserEnrollInCourseValidation> Regnolist = gc.GetStudentRegisterationNoSimilarCourse(teacherid);
                ViewBag.Regno = new SelectList(Regnolist, "EnrollmentId", "RegistrationId");
                var text = formcollection["hidText"];
                return(RedirectToAction("result", new { RegNo = text }));
            }
            catch (Exception ex)
            {
                ViewBag.Message = "There is some problem in processing";
                return(View());
            }
        }