Ejemplo n.º 1
0
        public JsonResult Patch(int controlNumber, UserData Data)
        {
            SEngine = new StudentEngine(controlNumber.ToString());
            var status = SEngine.Update(Data);

            return(Json(new { success = true, status = HttpStatusCode.OK }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        public JsonResult AcademicHistory(int controlNumber)
        {
            StudentEngine = new StudentEngine(controlNumber.ToString());
            var AH = StudentEngine.getAcademicHistory();

            return(Json(AH));
        }
Ejemplo n.º 4
0
        public ActionResult AcademicHistory()
        {
            StudentEngine = new StudentEngine(Session["controlNumber"].ToString());
            var AH = StudentEngine.getAcademicHistory();

            return(View(AH));
        }
Ejemplo n.º 5
0
        public JsonResult SemesterSchedule(int controlNumber)
        {
            StudentEngine = new StudentEngine(controlNumber.ToString());
            var Schedule = StudentEngine.getSchedule();

            return(Json(Schedule));
        }
Ejemplo n.º 6
0
        public JsonResult SemesterSchedule()
        {
            StudentEngine = new StudentEngine(Session["controlNumber"].ToString());
            var S = StudentEngine.getSchedule();

            return(Json(S));
        }
Ejemplo n.º 7
0
        public JsonResult Get()
        {
            SEngine = new StudentEngine(Session["controlNumber"].ToString());
            var Data = SEngine.UserData();
            var json = JsonConvert.SerializeObject(Data);

            return(Json(json, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 8
0
 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)));
     }
 }
Ejemplo n.º 9
0
 public JsonResult Delete(int controlNumber)
 {
     SEngine = new StudentEngine(controlNumber.ToString());
     SEngine.Delete();
     return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
 }