Esempio n. 1
0
        public ActionResult StudentGroup(int?term_id)  // term id
        {
            checkLogin();

            StudentGroupViewModel SGVM = new StudentGroupViewModel();

            SGVM.TermList     = CP.termSelectList;
            SGVM.UserList     = CP.userSelectList;
            SGVM.SelectedTerm = CP.currentTerm.ID;
            SGVM.groupList    = DBS.findActiveCurrentRecords <STUDENT_GROUP>();
            Session["currentStudentGroups"] = SGVM.groupList;
            SGVM.AllUserList = CP.AllUser;

            if (term_id != null)
            {
                SGVM.groupList    = DBS.findActiveRecordsBySingleParm <STUDENT_GROUP>("TERM", (int)term_id);
                SGVM.SelectedTerm = (int)term_id;
            }

            ModelState.Clear();
            return(View(SGVM));
        }
Esempio n. 2
0
        public static List <SubjectAndSSubjects> getSubjectAndSSubjectsList(int term_id)
        {
            List <SubjectAndSSubjects> SubjectAndSSubjectsList = new List <SubjectAndSSubjects>();
            List <SUBJECT>             subjects  = DBS.findActiveRecordsBySingleParm <SUBJECT>("TERM", term_id);
            List <SSUBJECT>            ssubjects = DBS.findActiveRecords <SSUBJECT>();

            foreach (var subject in subjects)
            {
                List <SSUBJECT> ss = ssubjects.FindAll(s => s.SUBJECT == subject.ID);
                SubjectAndSSubjectsList.Add(new SubjectAndSSubjects(subject, ss));
            }
            return(SubjectAndSSubjectsList);
        }
Esempio n. 3
0
        public ActionResult viewMerits(int term_id, int class_id, int student_id)
        {
            checkLogin();

            MeritsViewModel MVM = new MeritsViewModel();

            MVM.TermList    = CP.termSelectList;
            MVM.userList    = CP.teacherSelectList;
            MVM.classList   = classSelectList;
            MVM.studentList = studentList;
            MVM.merits      = DBS.findActiveRecordsBySingleParm <MERITS>("STUDENT", student_id);

            return(View("MERIT", MVM));
        }