예제 #1
0
        public PartialViewResult GetDisciplineStudents(int disciplineId, int wave)
        {
            var studentsList = _repoBl.GetStudents(disciplineId, wave);
            var admin        = _repoBl.GetAdmin(SessionPersister.Login);

            if (admin.roles == "SuperAdmin")
            {
                ViewBag.Admin = 1;
            }

            return(PartialView("_stList", studentsList));
        }
예제 #2
0
        public void TestStdSearching()
        {
            var repoBl = new RepositoryBL(_repoMock.Object);

            for (int i = 0; i < 100; i++)
            {
                string fio     = $"Surname Name Parent {i}";
                var    student = repoBl.GetStudents(i.ToString()).ToList()[0];

                Assert.IsNotNull(student);
                Assert.AreEqual(student.fio, fio);
            }
        }
예제 #3
0
        public PartialViewResult GetDisciplineStudentCount(int disciplineId, int wave)
        {
            var studCount = _repoBl.GetStudents(disciplineId, wave).Count();

            return(PartialView("_disciplineStudentAmount", studCount));
        }