Esempio n. 1
0
 public ActionResult Student_Enrolment(Student_Enrolment rec)
 {
     if (Session["admin"] != null)
     {
         EnrolmentServices services = new EnrolmentServices();
         if (rec.Enrolment_Id == 0)
         {
             services.Student_Enrolment(rec);
             var stud_list = db.Student_Records.ToList();
             ViewBag.stud = stud_list;
             var cl_list = db.Classes.ToList();
             ViewBag.cl = cl_list;
             return(Json(new { msg = "save" }, JsonRequestBehavior.AllowGet));
         }
         else
         {
             services.Student_Enrolment(rec);
             var stud_list = db.Student_Records.ToList();
             ViewBag.stud = stud_list;
             var cl_list = db.Classes.ToList();
             ViewBag.cl = cl_list;
             return(Json(new { msg = "Update" }, JsonRequestBehavior.AllowGet));
         }
     }
     else
     {
         return(RedirectToAction("Login", "Home"));
     }
 }
        public JsonResult Student_Enrolment(Student_Enrolment rec)
        {
            EnrolmentServices services = new EnrolmentServices();

            if (rec.Enrolment_Id == 0)
            {
                services.Student_Enrolment(rec);
                var stud_list = db.Student_Records.ToList();
                ViewBag.stud = stud_list;
                var cl_list = db.Classes.ToList();
                ViewBag.cl = cl_list;
                return(Json(new { msg = "save" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                services.Student_Enrolment(rec);
                var stud_list = db.Student_Records.ToList();
                ViewBag.stud = stud_list;
                var cl_list = db.Classes.ToList();
                ViewBag.cl = cl_list;
                return(Json(new { msg = "Update" }, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 3
0
        public JsonResult Student_Enrolment(Student_Enrolment rec)
        {
            EnrolmentServices services = new EnrolmentServices();

            services.Student_Enrolment(rec);
            var stud_list = db.Student_Records.ToList();

            ViewBag.stud = stud_list;
            var cl_list = db.Classes.ToList();

            ViewBag.cl = cl_list;
            var sec_list = db.Sections.ToList();

            ViewBag.sec = sec_list;
            var st_list = db.Staffs.ToList();

            ViewBag.st = st_list;



            return(Json(new { msg = "save" }, JsonRequestBehavior.AllowGet));
        }