示例#1
0
        public TestSearch(string s, bool d, bool t, bool r,
                          StudentTestsContext context, Student student = null)
        {
            SearchQuery     = s;
            DisciplinesOnly = d;
            TopicsOnly      = t;
            HasResultOnly   = r;
            results         = context.Results.ToList();

            this.student = student;
        }
示例#2
0
        public ResultSearch(string s, bool st, bool gr, int sf, int se, int mf, int me,
                            StudentTestsContext context)
        {
            SearchQuery  = s;
            StudentsOnly = st;
            GroupsOnly   = gr;
            sFrom        = sf;
            sTo          = se;
            mFrom        = mf;
            mTo          = me;

            tests    = context.Tests.ToList();
            students = context.Students.ToList();
        }
示例#3
0
        public TeacherSearch(string s, bool f, bool g,
                             bool pos, bool test, bool mail, StudentTestsContext context)
        {
            SearchQuery     = s;
            FullNameOnly    = f;
            DepartmentsOnly = g;
            PosOnly         = pos;
            MailOnly        = mail;
            testOnly        = test;
            _tests          = context.Tests.ToList();
            _disc           = context.Disciplines.ToList();

            if (f == false && g == false && PosOnly == false)
            {
                FullNameOnly = true;
            }
        }
示例#4
0
        public StudentSearch(string s, bool f, bool g, bool h, bool fv, bool tw, StudentTestsContext context)
        {
            SearchQuery   = s;
            FullNameOnly  = f;
            GroupsOnly    = g;
            HasResultOnly = h;
            FiveOnly      = fv;
            TwoOnly       = tw;
            if (f == false && g == false)
            {
                FullNameOnly = true;
            }

            results = context.Results.ToList();
            foreach (var r in results)
            {
                r.Test = context.Tests.First(t => t.TestId == r.TestId);
            }
        }
示例#5
0
 public TestController(UserContext usersContext, StudentTestsContext mainContext)
 {
     usersDb = usersContext;
     mainDb  = mainContext;
 }
示例#6
0
 public ResultsController(StudentTestsContext context)
 {
     _context = context;
 }
示例#7
0
 public HomeController(StudentTestsContext context)
 {
     db = context;
 }
 public TestsController(StudentTestsContext context, ITeacherSystemService teacherSystemService)
 {
     _context = context;
     _teacherSystemService = teacherSystemService;
 }