Beispiel #1
0
        //#endregion

        //#region Constructor
        public ConfigurationController(IUnitOfWork unitOfWork, ISettingService settingService,
                                       ITermService ite)
        {
            _unitOfWork     = unitOfWork;
            _settingService = settingService;
            _TermService    = ite;
        }
 public ProfessorController(
     IProfessorService professorService
     , IProfessorScoreService professorScoreService
     , IEducationalGroupService educationalGroupService
     , ICollegeService collegeService
     , ITermService termService
     , IIndicatorService indicatorService
     , IRoleAccessService roleAccessService
     , IUserRoleService userRoleService
     , ILogService logService
     , IEducationalClassService educationalClassService
     )
 {
     _professorService        = professorService;
     _professorScoreService   = professorScoreService;
     _educationalGroupService = educationalGroupService;
     _collegeService          = collegeService;
     _termService             = termService;
     _indicatorService        = indicatorService;
     _roleAccessService       = roleAccessService;
     _userRoleService         = userRoleService;
     _reportService           = new DapperService(educationalGroupService);
     _logService = logService;
     _educationalClassService = educationalClassService;
 }
 public ScheduleController(IScheduleService scheduleService,
                           ITermService termService,
                           IMappingService mappingService,
                           ICollegeService collegeService,
                           IEducationalGroupService educationalGroupService,
                           IProfessorService professorService,
                           IEducationalClassService educationalClassService,
                           IStudentEducationalClassService studentEducationalClassService,
                           IProfessorScoreService professorScoreService,
                           IIndicatorService indicatorService,
                           IMappingTypeService mappingTypeService,
                           IUniversityLevelMappingService universityLevelMappingService,
                           IEducationalGroupScoreService educationalGroupScoreService,
                           ILogService logService,
                           ILogTypeService logTypeService,
                           IUserService userService)
 {
     _scheduleService                = scheduleService;
     _termService                    = termService;
     _mappingService                 = mappingService;
     _collegeService                 = collegeService;
     _educationalGroupService        = educationalGroupService;
     _professorService               = professorService;
     _educationalClassService        = educationalClassService;
     _studentEducationalClassService = studentEducationalClassService;
     _professorScoreService          = professorScoreService;
     _indicatorService               = indicatorService;
     _logService                    = logService;
     _logTypeService                = logTypeService;
     _mappingTypeService            = mappingTypeService;
     _userService                   = userService;
     _universityLevelMappingService = universityLevelMappingService;
     _educationalGroupScoreService  = educationalGroupScoreService;
 }
        public static async Task AddTermsAsync(this Post post, ITermService termService)
        {
            //post.Terms = await termService.GetAsync(post.Id);
            var postTerms = await termService.GetPostTermsAsync(post.Id);

            post.Terms = postTerms.Select(s => s.Term).ToList();
        }
        public CurriculumPageViewModel(ISubjectService subjectService,
                                       ITermService termService,
                                       IRegisteredSubjectService registeredSubjectService)
        {
            _subjectService           = subjectService;
            _termService              = termService;
            _registeredSubjectService = registeredSubjectService;

            NewSubjectCommand        = new RelayCommand(NewSubjectOnClick);
            EditSubjectCommand       = new RelayCommand(EditSubjectOnClick, p => SelectedSubjectIndex > -1);
            DeleteSubjectCommand     = new RelayCommand(DeleteSubjectOnClick, p => SelectedSubjectIndex > -1);
            RegisterSubjectCommand   = new RelayCommand(RegisterSubjectOnClick, p => SelectedSubjectIndex > -1);
            UnregisterSubjectCommand = new RelayCommand(UnregisterSubjectOnClick, p => SelectedSubjectIndex > -1);

            SelectedSubjectIndex = -1;

            Subjects = new ObservableCollection <Subject>();

            var currentDispatcher = Dispatcher.CurrentDispatcher;

            Task.Factory.StartNew(async() =>
            {
                List <Subject> subjects = await _subjectService.GetSubjectsAsync();

                currentDispatcher.Invoke(new Action(() =>
                {
                    Subjects.AddRange(subjects);
                    IsLoading = false;
                }));
            });
        }
        public TermsPageViewModel(ITermService termService)
        {
            _termService = termService;

            NewTermCommand        = new RelayCommand(NewTermOnClick);
            EditTermCommand       = new RelayCommand(EditTermOnClick, p => SelectedTermIndex > -1);
            DeleteLastTermCommand = new RelayCommand(DeleteLastTermOnClick, p => Terms.Count > 0);
            CloseTermCommand      = new RelayCommand(CloseTermOnClick, p => SelectedTermIndex > -1);

            SelectedTermIndex = -1;

            Terms = new ObservableCollection <Term>();

            var currentDispatcher = Dispatcher.CurrentDispatcher;

            Task.Factory.StartNew(async() =>
            {
                List <Term> terms = await _termService.GetTermsAsync();

                currentDispatcher.Invoke(new Action(() =>
                {
                    Terms.AddRange(terms);
                    IsLoading = false;
                }));
            });
        }
Beispiel #7
0
 public PostController(IPostService _postService, ICommentService _commentService, ITermService _termService, INotificationService _notificationService)
 {
     postService         = _postService;
     commentService      = _commentService;
     termService         = _termService;
     notificationService = _notificationService;
 }
        //ترم-Add Or Update
        public static void SyncAddOrUpdateTerms(ITermService termService, ILogService logService, ILogTypeService logTypeService, IUserService userService, User user)
        {
            SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.شروع_سینک_ترم);

            var terms = new List <Term>();

            try
            {
                terms = ClientHelper.GetValue <Term>(StaticValue.TermRelativeAddress);
                SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.دریافت_ترم_از_سرویس);
            }
            catch (Exception e)
            {
                SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.عدم_دریافت_ترم_از_سرویس);
            }


            var resualt = new Dictionary <string, int>();
            var counter = 1;

            //SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.شروع_اضافه_و_آپدیت_نمودن_ترم);

            terms.ForEach(x =>
            {
                if (x != null)
                {
                    if (string.IsNullOrEmpty(x.TermCode))
                    {
                        resualt.Add($"{x.Name}-{counter}", 3);
                    }
                    else
                    {
                        var r = termService.AddOrUpdate(x);

                        // resualt.Add($"{x.Name}-{counter}", r.GetAddOrUpdateResualt());
                        resualt.Add($"{x.Name}-{counter}", r);
                    }
                }
                ++counter;
            });
            var added          = resualt.Count(x => x.Value == 1);
            var updatetd       = resualt.Count(x => x.Value == 2);
            var warrning       = resualt.Count(x => x.Value == 3);
            var stringWarrning = string.Empty;

            foreach (var s in resualt.Where(x => x.Value == 3).Select(x => x.Key))
            {
                stringWarrning += $"تعداد {warrning}" + " || " + s + " | ";
            }
            stringWarrning = !string.IsNullOrEmpty(stringWarrning.Trim()) ? stringWarrning : "بدون مشکل";
            SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.ترم_اضافه_شد, $"تعداد {added}");
            SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.ترم_آپدیت_شد, $"تعداد {updatetd}");
            SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.مشکل_در_اضافه_و_آپدیت_کردن_ترم, stringWarrning);


            //SyncService.LogSync(logService, logTypeService, userService, user, (int)LogTypeValue.پایان_اضافه_و_آپدیت_نمودن_ترم);

            // return resualt;
        }
 public TermController(ICurrentContext CurrentContext,
                       ITermService TermService,
                       ISemesterService SemesterService
                       ) : base(CurrentContext)
 {
     this.TermService     = TermService;
     this.SemesterService = SemesterService;
 }
        //#endregion

        //#region Constructor
        public AvailableCoursesController(IUnitOfWork unitOfWork, IPeresentedCoursesService artService,
                                          IProfessorService pro, ICourseService cor, ITermService te)
        {
            _unitOfWork = unitOfWork;
            _PeresentedCoursesService = artService;
            _ProfessorService         = pro;
            _CourseService            = cor;
            _TermService = te;
        }
        //public delegate void PostProcessing(Post post);

        public CachedPostService(
            IPostRepository postRepository,
            ITermService termService,
            IShortCodeService shortCode,
            IPostProcessingService postProcessingService,
            IMetadataService metadataService,
            IMemoryCache memoryCache) : base(postRepository, termService, shortCode, postProcessingService, metadataService)
        {
            _memoryCache  = memoryCache;
            _cacheOptions = new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(Constants.MinutesToCache));
        }
Beispiel #12
0
 public AksesuarService(IRepositoryAsync <ZetaCodeAksesuar> repository) : base(repository)
 {
     _repository      = repository;
     _repoKompozisyon = _repository.GetRepositoryAsync <ZetaCodeAksesuarKompozisyon>();
     _repoCompany     = _repository.GetRepositoryAsync <Company>();
     _repoPantoneRenk = _repository.GetRepositoryAsync <PantoneRenk>();
     _repoRenk        = _repository.GetRepositoryAsync <Renk>();
     _zetaCodeService = new ZetaCodeService(_repository.GetRepositoryAsync <ZetaCodes>());
     _termService     = new TermService(_repository.GetRepositoryAsync <Term>());
     _othersService   = new OthersService();
 }
Beispiel #13
0
 public CoursesController(ICourseService courseService,
                          ILessonService lessonService,
                          IClassroomService classroomService,
                          ITeacherService teacherService,
                          ITermService termService)
 {
     this.courseService    = courseService;
     this.lessonService    = lessonService;
     this.classroomService = classroomService;
     this.teacherService   = teacherService;
     this.termService      = termService;
 }
Beispiel #14
0
        public PagesController(
            ITermService termService
            , ICollegeService collegeService
            , IEducationalGroupService educationalGroupService
            , IProfessorService professorService
            , IRoleService roleService
            , IRoleAccessService roleAccessService
            , IAccessService accessService
            , IUserRoleService userRoleService
            , IMappingService mappingService
            , IIndicatorService indicatorService
            , IUniversityLevelMappingService universityLevelMappingService
            , IUserService userService
            , IScheduleService scheduleService


            , IEducationalClassService educationalClassService
            , IStudentEducationalClassService studentEducationalClassService
            , IProfessorScoreService professorScoreService
            , IMappingTypeService mappingTypeService
            , IEducationalGroupScoreService educationalGroupScoreService
            , ILogService logService
            , ILogTypeService logTypeService
            , IServiceUsersMappingService serviceUsersMappingService
            )
        {
            _termService                   = termService;
            _collegeService                = collegeService;
            _educationalGroupService       = educationalGroupService;
            _professorService              = professorService;
            _roleService                   = roleService;
            _roleAccessService             = roleAccessService;
            _accessService                 = accessService;
            _userRoleService               = userRoleService;
            _mappingService                = mappingService;
            _indicatorService              = indicatorService;
            _universityLevelMappingService = universityLevelMappingService;
            _userService                   = userService;
            _scheduleService               = scheduleService;
            _logService                     = logService;
            _logTypeService                 = logTypeService;
            _educationalClassService        = educationalClassService;
            _studentEducationalClassService = studentEducationalClassService;
            _professorScoreService          = professorScoreService;
            _mappingTypeService             = mappingTypeService;
            _educationalGroupScoreService   = educationalGroupScoreService;
            _serviceUsersMappingService     = serviceUsersMappingService;
            //SyncService.RunAll(termService, mappingService, collegeService, educationalGroupService
            //    , professorService, educationalClassService, studentEducationalClassService, professorScoreService
            //    , indicatorService, mappingTypeService, universityLevelMappingService, educationalGroupScoreService
            //    , logService, logTypeService, userService);
            //var lastUpdate = _logService.LastUpdate();
        }
Beispiel #15
0
        //#endregion

        //#region Constructor
        public EnrolmentController(IUnitOfWork unitOfWork, IElectionService artService
                                   , IStudentService st, IUserService us, ISettingService set, ITermService tr,
                                   IPeresentedCoursesService pr)
        {
            _unitOfWork               = unitOfWork;
            _ElectionService          = artService;
            _StudentService           = st;
            _UserService              = us;
            _SettingService           = set;
            _TermService              = tr;
            _PeresentedCoursesService = pr;
        }
Beispiel #16
0
 public ExamPeriodController(ICurrentContext CurrentContext,
                             IExamPeriodService ExamPeriodService,
                             IExamProgramService ExamProgramService,
                             ITermService TermService,
                             IExamRoomService ExamRoomService
                             ) : base(CurrentContext)
 {
     this.ExamPeriodService  = ExamPeriodService;
     this.ExamProgramService = ExamProgramService;
     this.ExamRoomService    = ExamRoomService;
     this.TermService        = TermService;
 }
 public PostService(
     IPostRepository postRepository,
     ITermService termService,
     IShortCodeService shortCode,
     IPostProcessingService postProcessingService,
     IMetadataService metadataService)
 {
     _postRepository        = postRepository;
     _termService           = termService;
     _shortCode             = shortCode;
     _postProcessingService = postProcessingService;
     _metadataService       = metadataService;
 }
        public static async Task AddTermsAsync(this List <Post> posts, ITermService termService)
        {
            var postTerms = (await termService.GetPostTermsAsync(posts.Select(s => s.Id))).ToList();

            posts.ForEach(p => p.Terms = postTerms.Where(w => w.PostId == p.Id).Select(s => s.Term).ToList());

            //foreach (var post in posts)
            //{
            //    post.Terms = postTerms.Where(w => w.PostId == post.Id).Select(s => s.Term).ToList();
            //}

            //return await termService.AddTermsAsync(posts);
        }
 public HazirGiyimService(IRepositoryAsync <ZetaCodeHazirGiyim> repository) : base(repository)
 {
     _repository             = repository;
     _repoAksesuarlar        = _repository.GetRepositoryAsync <ZetaCodeHazirGiyimAksesuar>();
     _repoKumasFanteziler    = _repository.GetRepositoryAsync <ZetaCodeHazirGiyimKumasFantezi>();
     _repoKumasOrmeDokumalar = _repository.GetRepositoryAsync <ZetaCodeHazirGiyimKumasOrmeDokuma>();
     _zetaCodeService        = new ZetaCodeService(_repository.GetRepositoryAsync <ZetaCodes>());
     _repoCompany            = _repository.GetRepositoryAsync <Company>();
     _repoPantoneRenk        = _repository.GetRepositoryAsync <PantoneRenk>();
     _repoRenk        = _repository.GetRepositoryAsync <Renk>();
     _zetaCodeService = new ZetaCodeService(_repository.GetRepositoryAsync <ZetaCodes>());
     _termService     = new TermService(_repository.GetRepositoryAsync <Term>());
     _othersService   = new OthersService();
 }
        public FanteziIplikService(IRepositoryAsync <ZetaCodeFanteziIplik> repository) : base(repository)
        {
            _repository                  = repository;
            _termService                 = new TermService(_repository.GetRepositoryAsync <Term>());
            _othersService               = new OthersService();
            _repoFanteziIplikPicture     = _repository.GetRepositoryAsync <ZetaCodeFanteziIplikPicture>();
            _repoNormalIplik             = _repository.GetRepositoryAsync <ZetaCodeNormalIplik>();
            _repoFanteziIplikNormalIplik = _repository.GetRepositoryAsync <ZetaCodeFanteziIplikNormalIplik>();
            _zetaCodeService             = new ZetaCodeService(_repository.GetRepositoryAsync <ZetaCodes>());

            _renkService        = new RenkService(_repository.GetRepositoryAsync <Renk>());
            _pantoneRenkService = new PantoneRenkService(_repository.GetRepositoryAsync <PantoneRenk>());
            _companyService     = new CompanyService(_repository.GetRepositoryAsync <Company>());
        }
 public ExamRegisterController(ICurrentContext CurrentContext,
                               IExamPeriodService ExamPeriodService,
                               IStudentService StudentService,
                               ITermService TermService,
                               IExamRoomExamPeriodService ExamRoomExamPeriodService,
                               IExamProgramService ExamProgramService
                               ) : base(CurrentContext)
 {
     this.StudentService            = StudentService;
     this.TermService               = TermService;
     this.ExamPeriodService         = ExamPeriodService;
     this.ExamRoomExamPeriodService = ExamRoomExamPeriodService;
     this.ExamProgramService        = ExamProgramService;
 }
Beispiel #22
0
 public ResetService(IMetadataService metadataService,
                     IPostService postService,
                     ITermService termService,
                     IMenuService menuService,
                     IMemoryCache memoryCache,
                     ITermRepository termRepository,
                     IPostRepository postRepository)
 {
     _metadataService = metadataService;
     _postService     = postService;
     _termService     = termService;
     _menuService     = menuService;
     _memoryCache     = memoryCache;
     _termRepository  = termRepository;
     _postRepository  = postRepository;
 }
Beispiel #23
0
 public StudentEvaluationController(ITermService termService, IEvaluationQuestionService evaluationQuestionService,
                                    IEvaluationAnswerService evaluationAnswerService
                                    , IRoleAccessService roleAccessService
                                    , IUserRoleService userRoleService
                                    , ILogService logService,
                                    IEvaluationTypeService evaluationTypeService
                                    , IStudentEducationalClassService studentEducationalClassService)
 {
     _termService = termService;
     _evaluationQuestionService = evaluationQuestionService;
     _evaluationAnswerService   = evaluationAnswerService;
     _roleAccessService         = roleAccessService;
     _userRoleService           = userRoleService;
     _logService                     = logService;
     _evaluationTypeService          = evaluationTypeService;
     _studentEducationalClassService = studentEducationalClassService;
 }
 public CollegeController(
     ICollegeService collegeService
     , ICollegeScoreService collegeScoreService
     , IEducationalGroupService educationalGroupService
     , ITermService termService
     , IRoleAccessService roleAccessService
     , IUserRoleService userRoleService
     , ILogService logService
     )
 {
     _collegeService          = collegeService;
     _collegeScoreService     = collegeScoreService;
     _educationalGroupService = educationalGroupService;
     _termService             = termService;
     _reportService           = new DapperService(educationalGroupService);
     _roleAccessService       = roleAccessService;
     _userRoleService         = userRoleService;
     _logService = logService;
 }
Beispiel #25
0
        public ZetaCodeNormalIplikService(IRepositoryAsync <ZetaCodeNormalIplik> repository) : base(repository)
        {
            _repository = repository;

            _renkService        = new RenkService(_repository.GetRepositoryAsync <Renk>());
            _pantoneRenkService = new PantoneRenkService(_repository.GetRepositoryAsync <PantoneRenk>());
            _iplikNoService     = new IplikNoService(_repository.GetRepositoryAsync <IplikNo>());

            _repoDegrede     = repository.GetRepositoryAsync <IplikKategoriDegrede>();
            _repoFlam        = repository.GetRepositoryAsync <IplikKategoriFlam>();
            _repoKircili     = repository.GetRepositoryAsync <IplikKategoriKircili>();
            _repoKrep        = repository.GetRepositoryAsync <IplikKategoriKrep>();
            _repoNopeli      = repository.GetRepositoryAsync <IplikKategoriNopeli>();
            _repoSim         = repository.GetRepositoryAsync <IplikKategoriSim>();
            _termService     = new TermService(_repository.GetRepositoryAsync <Term>());
            _othersService   = new OthersService();
            _companyService  = new CompanyService(_repository.GetRepositoryAsync <Company>());
            _zetaCodeService = new ZetaCodeService(_repository.GetRepositoryAsync <ZetaCodes>());
        }
Beispiel #26
0
        public TermBindingService
        (
            DBService db,
            AdminTransactionsService transactions,
            IWordComparisonService wordComparison,
            ITermService termService
        )
        {
            _db             = db;
            _transactions   = transactions;
            _wordComparison = wordComparison;
            _termService    = termService;

            _isProcessing      = false;
            _unindexedCount    = 0;
            _indexedCount      = 0;
            _countForIndex     = 0;
            _countForIndexDone = 0;

            seperators = new Regex("[.,?!:;'\"_@#$%^&*=+()\\[\\]{}~\t\n-]");
        }
Beispiel #27
0
 public EducationalClassesController(
     IEducationalClassService educationalClassService
     , IEducationalGroupService educationalGroupService
     , ITermService termService
     , IProfessorScoreService professorScoreService
     , IScoreService scoreService
     , IRoleAccessService roleAccessService
     , IUserRoleService userRoleService
     , IProfessorService professorService
     , IIndicatorService indicatorService
     )
 {
     _educationalClassService = educationalClassService;
     _educationalGroupService = educationalGroupService;
     _termService             = termService;
     _professorScoreService   = professorScoreService;
     _scoreService            = scoreService;
     _roleAccessService       = roleAccessService;
     _userRoleService         = userRoleService;
     _professorService        = professorService;
     _indicatorService        = indicatorService;
 }
 public EducationalGroupController(
     IEducationalGroupService educationalGroupService
     , ITermService termService
     , IIndicatorService indicatorService
     , IEducationalGroupScoreService educationalGroupScoreService
     , IScoreService scoreService
     , ICollegeService collegeService
     , IRoleAccessService roleAccessService
     , IUserRoleService userRoleService
     , ILogService logService
     )
 {
     _educationalGroupService      = educationalGroupService;
     _termService                  = termService;
     _indicatorService             = indicatorService;
     _educationalGroupScoreService = educationalGroupScoreService;
     _scoreService                 = scoreService;
     _collegeService               = collegeService;
     _reportService                = new DapperService(educationalGroupService);
     _roleAccessService            = roleAccessService;
     _userRoleService              = userRoleService;
     _logService = logService;
 }
Beispiel #29
0
 public TermController(ITermService termService)
 {
     _termService = termService;
 }
Beispiel #30
0
 public TermsController(ITermService termService)
 {
     this.termService = termService;
 }