//
        // GET: /GradeValues/
        public ActionResult Index()
        {
            GradeValuesAccess g = new GradeValuesAccess();
            List<Students> items = g.getStudents();

            return View(items);
        }
        public ActionResult StudentFilter(int semesterId, int subjectId)
        {
            GradeValuesAccess g = new GradeValuesAccess();
            List<Students> result = g.getStudents(semesterId, subjectId);

            return Json(data: result);
        }
        public ActionResult Delete(int gradeId, int registrationId, string stamp)
        {
            string[] parts = stamp.Split('?');
            byte[] transfer = new byte[8];
            for (int i = 0; i < 8; i++)
            {
                transfer[i] = Convert.ToByte(parts[i]);
            }

            GradeValuesAccess g = new GradeValuesAccess();
            return Json(g.removeGradeValues(gradeId, registrationId, transfer));
        }
        public ActionResult Add(int gradeId, int registrationId, string value)
        {
            /*
            string[] parts = stamp.Split('?');
            byte[] transfer = new byte[8];
            for (int i = 0; i < 8; i++)
            {
                transfer[i] = Convert.ToByte(parts[i]);
            }
             */

            GradeValuesAccess g = new GradeValuesAccess();

            return Json(g.addGradeValues(gradeId, registrationId, value));
        }
        public ActionResult SemesterFilter(int studentId)
        {
            GradeValuesAccess g = new GradeValuesAccess();

            /*
            List<Semesters> l = g.getSemesters();
            List<Semesters> result = new List<Semesters>();

            foreach (Semesters item in l)
            {
                result.Add(new Semesters { SemesterID = item.SemesterID, Name = item.Name, TimeStamp = item.TimeStamp, Realisations = null });
            }
            */

            List<Semesters> result = g.getSemesters(studentId);

            return Json(data: result);
        }
        public ActionResult SubjectFilter(int semesterId, int studentId)
        {
            GradeValuesAccess g = new GradeValuesAccess();

            return Json(data: g.getSubjects(semesterId, studentId));
        }