Beispiel #1
0
 public GeneralService
     (IDbWorker dbWorker,
     IDepartmentRepository departmentRepository, IDisciplineRepository disciplineRepository,
     IDisciplineYearRepository disciplineYearRepository,
     IDisciplineWorkloadRepository disciplineWorkloadRepository,
     IEmployeeRepository employeeRepository, IFacultyRepository facultyRepository,
     IGroupsRepository groupsRepository, ISemesterRepository semesterRepository,
     ISpecialityRepository specialityRepository,
     IStudentsRepository studentsRepository, IStudyYearRepository studyYearRepository,
     IWorkloadRepository workloadRepository, ISpecialPositionRepository specialPositionRepository) : base(dbWorker)
 {
     _departmentRepository         = departmentRepository;
     _disciplineRepository         = disciplineRepository;
     _disciplineYearRepository     = disciplineYearRepository;
     _disciplineWorkloadRepository = disciplineWorkloadRepository;
     _employeeRepository           = employeeRepository;
     _facultyRepository            = facultyRepository;
     _groupsRepository             = groupsRepository;
     _semesterRepository           = semesterRepository;
     _specialityRepository         = specialityRepository;
     _studentsRepository           = studentsRepository;
     _studyYearRepository          = studyYearRepository;
     _workloadRepository           = workloadRepository;
     _specialPositionRepository    = specialPositionRepository;
 }
Beispiel #2
0
        public DataSupplier(IUniversityRepository uniRep, IFacultyRepository facRep, IDisciplineRepository disRep, ICourseRepository courseRep, IFileRepository fileRep)
        {
            _uniRep    = uniRep;
            _facRep    = facRep;
            _disRep    = disRep;
            _courseRep = courseRep;
            _fileRep   = fileRep;

            _getCmd = new Dictionary <int, Func <int, IEnumerable <IEntityDTO> > >
            {
                [0] = id => GetUniversities(),
                [1] = GetFaculties,
                [2] = GetDisciplines,
                [3] = GetCourses
            };

            _addCmd = new Dictionary <int, Func <string, int, IEntityDTO> >
            {
                [0] = (modelName, parentId) => AddUniversity(modelName),
                [1] = AddFaculty,
                [2] = AddDiscipline,
                [3] = AddCourse
            };

            _deleteCmd = new Dictionary <int, Action <string, int> >
            {
                [0] = (path, id) => DeleteUniversity(id),
                [1] = DeleteFaculty,
                [2] = DeleteDiscipline,
                [3] = DeleteCourse
            };

            Directory.CreateDirectory(StoragePath);
        }
Beispiel #3
0
 public DisciplineController(
     IDisciplineRepository subNineRepository,
     IMapper mapper
     )
 {
     this.subNineRepository = subNineRepository;
     this.mapper            = mapper;
 }
Beispiel #4
0
 public TeamController(ICategoryRepository repoCat, IDisciplineRepository repoDiscipline, IUserProfileRepository repoUserProfile, IFileRepository repoFile, IEntityFileRepository repoEntityFile)
 {
     _repoCat         = repoCat;
     _repoDiscipline  = repoDiscipline;
     _repoUserProfile = repoUserProfile;
     _repoFile        = repoFile;
     _repoEntityFile  = repoEntityFile;
 }
Beispiel #5
0
 public UserController(IVideoLinkRepository repoVideoLink, IFrontEntityFileRepository repoFrontEntityFile, ICategoryRepository repoCat, IDisciplineRepository repoDiscipline, IUserProfileRepository repoUserProfile, IFileRepository repoFile, IEntityFileRepository repoEntityFile)
 {
     _repoCat            = repoCat;
     _repoDiscipline     = repoDiscipline;
     _repoUserProfile    = repoUserProfile;
     _repoFile           = repoFile;
     _repoEntityFile     = repoEntityFile;
     _repFrontEntityFile = repoFrontEntityFile;
     _repVideoLink       = repoVideoLink;
 }
Beispiel #6
0
 public AdminController(IUserRepository userRepository, IDisciplineRepository disciplineRepository,
                        IGroupRepository groupRepository, ITeacherRepository teacherRepository,
                        ITimetableRepository timetableRepository)
 {
     this.userRepository       = userRepository;
     this.disciplineRepository = disciplineRepository;
     this.groupRepository      = groupRepository;
     this.teacherRepository    = teacherRepository;
     this.timetableRepository  = timetableRepository;
 }
Beispiel #7
0
 public DisciplineService(IUsersRepository usersRepository, ICompanyRepository companyRepository, ILookupRepository lookupRepository, IEmployeeOnBoardRepository employeeOnBoardRepository,
                          IDisciplineViewModelFactory disciplineViewModelFactory, IDisciplineRepository disciplineRepository, IEmployeeRepository employeeRepository, ISessionStateService session)
 {
     this.disciplineRepository       = disciplineRepository;
     this.lookupRepository           = lookupRepository;
     this.companyRepository          = companyRepository;
     this.usersRepository            = usersRepository;
     this.disciplineViewModelFactory = disciplineViewModelFactory;
     this.employeeRepository         = employeeRepository;
     this.employeeOnBoardRepository  = employeeOnBoardRepository;
     this.session = session;
 }
Beispiel #8
0
        public void SetUp()
        {
            _disciplineRepository = Mock.Of <IDisciplineRepository>();
            _disciplineService    = new DisciplineService(_disciplineRepository);

            _discipline = new DisciplineItem()
            {
                Id        = 1,
                ShortName = "test",
                FullName  = "test_full",
                Mem       = "Описание"
            };
        }
Beispiel #9
0
        public string GetDisciplines(IDisciplineRepository repository)
        {
            string result      = "";
            var    disciplines = TeacherDisciplines.Join(repository.Disciplines,
                                                         t => t.DisciplineId,
                                                         d => d.DisciplineId,
                                                         resultSelector: (t, d) => new { d.Name });

            foreach (var item in disciplines)
            {
                result += $"{item.Name}, ";
            }
            return(string.IsNullOrEmpty(result) ? "" : result.Substring(0, result.Length - 2));
        }
Beispiel #10
0
 public GroupController(IEntityFileRepository entityFileRepository, IFrontEntityFileRepository frontEntityFileRepository, IVideoLinkRepository videoLinkRepository, IUserProfileRepository userProfileRepository, IProvinceRepository provinceRepository, ICountryRepository countryRepository, IDisciplineRepository disciplineRepositiory, IFileRepository repFile, IGroupRepository groupRepository, IProjectRepository projectRepository, IPublicationRepository publicationRepository, IFavouriteRepository favouriteRepository)
 {
     _repoCountry         = countryRepository;
     _repoProvince        = provinceRepository;
     _repoDiscipline      = disciplineRepositiory;
     _repoUserProfile     = userProfileRepository;
     _repoVideoLink       = videoLinkRepository;
     _repoFrontEntityFile = frontEntityFileRepository;
     _repoEntityFile      = entityFileRepository;
     _repoGroup           = groupRepository;
     _repoProject         = projectRepository;
     _repoPublication     = publicationRepository;
     _repoFavourite       = favouriteRepository;
 }
 public TournamentService(ITournamentRepository tournamentRepository, ITeamRepository teamRepository, ITeamService teamService, IPlayerRepository playerRepository, IUserRepository userRepository, IMatchRepository matchRepository, IDisciplineRepository disciplineRepository, IUnitOfWork unitOfWork, IPointsRepository pointsRepository, IMapper mapper, IBracketManager bracketManager)
 {
     this.tournamentRepository = tournamentRepository;
     this.teamRepository       = teamRepository;
     this.teamService          = teamService;
     this.playerRepository     = playerRepository;
     this.userRepository       = userRepository;
     this.matchRepository      = matchRepository;
     this.disciplineRepository = disciplineRepository;
     this.pointsRepository     = pointsRepository;
     this.unitOfWork           = unitOfWork;
     this.mapper         = mapper;
     this.bracketManager = bracketManager;
 }
Beispiel #12
0
 public DataManager(IWorkManagementCyclesRepository workManagementCyclesRepository,
                    IEducationalCyclesRepository educationalCyclesRepository,
                    ITeachersRepository teachersRepository, IFacultiesRepository facultiesRepository,
                    IDepartmentRepository departmentRepository, IAcademicGroupRepository groupRepository,
                    IDisciplineRepository disciplineRepository)
 {
     _workManagementCyclesRepository = workManagementCyclesRepository;
     _educationalCyclesRepository    = educationalCyclesRepository;
     _teachersRepository             = teachersRepository;
     _facultiesRepository            = facultiesRepository;
     _departmentRepository           = departmentRepository;
     _groupRepository      = groupRepository;
     _disciplineRepository = disciplineRepository;
 }
Beispiel #13
0
        public void Init()
        {
            _AREPEC = new Infra.EvaluationContext.ActivityRepository(new MSSQLDB(new DBConfiguration()));
            _AREPAC = new Infra.ActivityContext.ActivityRepository(new MSSQLDB(new DBConfiguration()));
            _DREP   = new DisciplineRepository(new MSSQLDB(new DBConfiguration()));
            _PREP   = new Infra.ProfessorContext.ProfessorRepository(new MSSQLDB(new DBConfiguration()));
            _SREP   = new StudentRepository(new MSSQLDB(new DBConfiguration()));
            var db = new SqlConnection(new DBConfiguration().StringConnection);

            // Create Course
            course = new Entities.StudentContext.Entities.Course(Guid.NewGuid());
            sql    = "INSERT INTO [Course] ([Id], [Name]) VALUES (@Id, 'LTP')";
            db.Execute(sql, param: new { Id = course.CourseId });

            // Create Professor
            professor = new Entities.ProfessorContext.Entities.Professor("Thelmaryo", "Vieira Lima", "034.034.034-00", "*****@*****.**", "123", EDegree.Master, "123", "123");
            _PREP.Create(professor);

            // Create Discipline
            disciplineCC = new Entities.CourseContext.Entities.Discipline("Psicologia", new Entities.CourseContext.Entities.Course(course.CourseId), new Entities.CourseContext.Entities.Professor(professor.Id), 20, 1, 0);
            _DREP.Create(disciplineCC);

            disciplineAC = new Entities.ActivityContext.Entities.Discipline(disciplineCC.Id, "Psicologia");

            // Create Student
            string CPF      = "117.400.002-34";
            string password = new Encryptor().Encrypt(CPF.Replace("-", "").Replace(".", ""), out string salt);

            student = new Entities.StudentContext.Entities.Student(course, DateTime.Now, "Abmael", "Araujo", CPF, "*****@*****.**", "1234-1234", "F", "França", "AraguainaSul", "Norte", password, salt);
            _SREP.Create(student);

            // Create Student
            string CPFEdit      = "344.245.132-97";
            string passwordEdit = new Encryptor().Encrypt(CPF.Replace("-", "").Replace(".", ""), out string saltEdit);

            studentEdit = new Entities.StudentContext.Entities.Student(course, DateTime.Now, "Abmael", "Araujo", CPFEdit, "*****@*****.**", "1234-1234", "F", "França", "AraguainaSul", "Norte", passwordEdit, saltEdit);
            _SREP.Create(studentEdit);

            // Create Activity
            activityAC = new Entities.ActivityContext.Entities.Activity(disciplineAC, "AtividadeTest", DateTime.Now, 10, 10, 15, Guid.NewGuid());
            _AREPAC.Create(activityAC);

            // Create Activity
            _student   = new Student(student.Id);
            activityEC = new Activity(activityAC.Id, _student, "AtividadeTest", DateTime.Now, 8, 10);
            _AREPEC.Create(activityEC);
        }
Beispiel #14
0
 public FrontController(ICategoryRepository categoryRepository, IYearRepository yearRepository, IMonthRepository monthRepository, IProvinceRepository provinceRepository, ICountryRepository countryRepository, IDisciplineRepository disciplineRepositiory, IFrontEntityFileRepository frontEntityFileRepositiory, IEntityFileRepository entityFileRepositiory, IFileRepository fileRepositiory, IVideoLinkRepository videoLinkRepository, IFrontContentRepository frontContentRepository, IUserProfileRepository userProfileRepository, IGroupRepository groupRepository)
 {
     _repCategory        = categoryRepository;
     _repMonth           = monthRepository;
     _repYear            = yearRepository;
     _repCountry         = countryRepository;
     _repProvince        = provinceRepository;
     _repDiscipline      = disciplineRepositiory;
     _repEntityFile      = entityFileRepositiory;
     _repFrontEntityFile = frontEntityFileRepositiory;
     _repFile            = fileRepositiory;
     _repVideoLink       = videoLinkRepository;
     _repFrontContent    = frontContentRepository;
     _repUserProfile     = userProfileRepository;
     _repGroup           = groupRepository;
     _repEntityFile      = entityFileRepositiory;
 }
 public ControlPanelController(IProvinceRepository provinceRepository, ICountryRepository countryRepository, IDisciplineRepository disciplineRepositiory, IGroupRepository repGroup, IFileRepository repFile, ICategoryRepository repoCat, IUserProfileRepository repoUserProfile, IEntityFileRepository repoEntityFile, ISectionRepository repoSection, IProjectRepository repoProject, IVideoLinkRepository repoVideoLink, IFrontEntityFileRepository repoFrontEntityFile, IFrontContentRepository repoFrontContent, IMessageRepository repoMessage, IPublicationRepository repoPublication)
 {
     _repoCountry         = countryRepository;
     _repoProvince        = provinceRepository;
     _repoDiscipline      = disciplineRepositiory;
     _repoGroup           = repGroup;
     _repoFile            = repFile;
     _repoCat             = repoCat;
     _repoUserProfile     = repoUserProfile;
     _repoEntityFile      = repoEntityFile;
     _repoSection         = repoSection;
     _repoProject         = repoProject;
     _repoVideoLink       = repoVideoLink;
     _repoFrontEntityFile = repoFrontEntityFile;
     _repoFrontContent    = repoFrontContent;
     _repoMessage         = repoMessage;
     _repoPublication     = repoPublication;
 }
Beispiel #16
0
        public void Init()
        {
            _PREP = new Infra.ProfessorContext.ProfessorRepository(new MSSQLDB(new DBConfiguration()));
            _DREP = new DisciplineRepository(new MSSQLDB(new DBConfiguration()));
            var db = new SqlConnection(new DBConfiguration().StringConnection);


            string CPF      = "034.034.034-00";
            string password = new Encryptor().Encrypt(CPF.Replace("-", "").Replace(".", ""), out string salt);

            professor = new Entities.ProfessorContext.Entities.Professor("Thelmaryo", "Vieira Lima", CPF, "*****@*****.**", "123", EDegree.Master, password, salt);
            _PREP.Create(professor);

            course = new Course("Psicologia");
            sql    = "INSERT INTO [Course] ([Id], [Name]) VALUES (@Id, @Name)";
            db.Execute(sql, param: new { course.Id, course.Name });

            discipline = new Discipline("Psicologia", new Course(course.Id), new Entities.CourseContext.Entities.Professor(professor.Id), 20, 1, 0);
            _DREP.Create(discipline);
        }
Beispiel #17
0
        public void Init()
        {
            var db = new SqlConnection(new DBConfiguration().StringConnection);

            _AREP      = new ActivityRepository(new MSSQLDB(new DBConfiguration()));
            _DREP      = new DisciplineRepository(new MSSQLDB(new DBConfiguration()));
            Activities = new List <Guid>();
            var _PREP = new Infra.ProfessorContext.ProfessorRepository(new MSSQLDB(new DBConfiguration()));

            professor = new Professor("Thelmaryo", "Vieira Lima", "034.034.034-00", "*****@*****.**", "123", EDegree.Master, "123", "123");
            _PREP.Create(professor);

            var course = new Entities.CourseContext.Entities.Course("Sistemas de Informação");

            db.Execute("INSERT INTO Course(Id, Name) VALUES (@Id, @Name)", course);
            CourseId = course.Id;

            var discipline = new Entities.CourseContext.Entities.Discipline("Software Test", new Entities.CourseContext.Entities.Course(course.Id), new Entities.CourseContext.Entities.Professor(professor.Id), 10, 1, 0);

            _DREP.Create(discipline);
            Discipline = new Discipline(discipline.Id, discipline.Name);
        }
 public DisciplineDb()
 {
     rep = AppKernel.Get <IDisciplineRepository>();
 }
Beispiel #19
0
 public DisciplineQueryHandler(IDisciplineRepository DREP, IActivityRepository AREP)
 {
     _DREP = DREP;
     _AREP = AREP;
 }
 public DisciplineService(IDisciplineRepository IDisciplineRepository)
 {
     this._IDisciplineRepository = IDisciplineRepository;
 }
Beispiel #21
0
 public DisciplineBusiness(IDisciplineRepository disciplineRepository)
 {
     _disciplineRepository = disciplineRepository;
     _disciplineConverter  = new DisciplineConverter();
 }
 /// <summary>
 /// 构造器方法
 /// </summary>
 /// <param name="disciplineRepository"></param>
 public DisciplineService(IDisciplineRepository disciplineRepository)
 {
     this.disciplineRepository = disciplineRepository;
 }
Beispiel #23
0
 public DisciplineService(IDisciplineRepository <DisciplineEntity> disciplineRepository, IMapper mapper)
 {
     _disciplineRepository = disciplineRepository;
     _mapper = mapper;
 }
Beispiel #24
0
 /// <summary>
 /// Конструктор без параметров.
 /// </summary>
 public DisciplineService()
 {
     _disciplineRepository = new DisciplineRepository();
 }
 public DisciplineRepositoryTests()
 {
     this.ApplicationDbContext = new ApplicationDbContext(Configuration["ConnectionStrings:ApplicationDbContext"]);
     this.ApplicationDbContext.Initialize();
     this.repository = new DisciplineRepository(this.ApplicationDbContext);
 }
Beispiel #26
0
 /// <summary>
 /// Конструктор без параметров.
 /// </summary>
 public DisciplineService()
 {
     _disciplineRepository = new DisciplineRepository();
 }
        public DisciplineService(
			IDisciplineRepository disciplineRepository, ICacheManager cacheManager)
        {
            _disciplineRepository = disciplineRepository;
            _cacheManager = cacheManager;
        }
 public DisciplineService(IDisciplineRepository repo)
 {
     _repo = repo;
 }
Beispiel #29
0
        public void SetUp()
        {
            _disciplineRepository = Mock.Of<IDisciplineRepository>();
            _disciplineService = new DisciplineService(_disciplineRepository);

            _discipline = new DisciplineItem()
            {
                Id = 1,
                ShortName = "test",
                FullName = "test_full",
                Mem = "Описание"
            };
        }
 public DisciplineServices(IDisciplineRepository disciplineRepository)
 {
     _disciplineRepository = disciplineRepository;
 }
Beispiel #31
0
 public DisciplineQueryHandler(IDisciplineRepository DREP)
 {
     _DREP = DREP;
 }
Beispiel #32
0
 public DisciplineService(IDisciplineRepository disciplineRepository, IUnitOfWork unitOfWork)
 {
     this.disciplineRepository = disciplineRepository;
     this.unitOfWork           = unitOfWork;
 }
Beispiel #33
0
 /// <summary>
 /// Конструктор класс.
 /// </summary>
 /// <param name="discipline_repository">Интерфейс репозитория дисциплин.</param>
 public DisciplineService(IDisciplineRepository discipline_repository)
 {
     _disciplineRepository = discipline_repository;
 }
Beispiel #34
0
 public DisciplineService(IMapper mapper, IDisciplineRepository disciplineRepository)
 {
     _mapper = mapper;
     _disciplineRepository = disciplineRepository;
 }
 public DisciplineController(IDisciplineRepository disciplines)
 {
     _disciplines = disciplines;
 }
        public DisciplinesController(IDisciplineRepository repo)
        {
            repository = repo;

        }