public JsonResult Get(int controlNumber) { SEngine = new StudentEngine(controlNumber.ToString()); var data = SEngine.UserData(); return(Json(new { data = data, success = true, status = HttpStatusCode.OK }, JsonRequestBehavior.AllowGet)); }
public JsonResult Get() { SEngine = new StudentEngine(Session["controlNumber"].ToString()); var Data = SEngine.UserData(); var json = JsonConvert.SerializeObject(Data); return(Json(json, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { if (Session["level"].ToString() == "1") { return(RedirectToAction("Index", "Admin")); } else { StudentEngine = new StudentEngine(Session["controlNumber"].ToString()); var Data = StudentEngine.UserData(); var Schedule = StudentEngine.getSchedule(); return(View(Tuple.Create(Schedule, Data))); } }