Пример #1
0
        public IActionResult Education(EditUserQualificationViewModel model)
        {
            if (ModelState.IsValid)
            {
                _entityCRUDResponse = _userService.AddUserQualification(new UserQualification()
                {
                    QualificationTitle         = model.QualificationTitle,
                    IntegratorUserID           = _userService.GetUserID(),
                    QualificationLevelID       = model.QualificationLevelID,
                    YearStartedQualification   = new DateTime(Convert.ToInt32(model.YearStartedQualification), 1, 1),
                    YearCompletedQualification = new DateTime(Convert.ToInt32(model.YearCompletedQualification), 1, 1),
                    EductaionalInstitutionID   = model.EductaionalInstitutionID,
                    QualificationAverage       = model.QualificationAverage
                });
            }

            if (_entityCRUDResponse.Success)
            {
                return(RedirectToAction("Education"));
            }
            else
            {
                //Todo: Redirect To Error Page and Log Errors
                return(RedirectToAction("Education"));
            }
        }
 public QualificationService(
     IRepository <QualificationLevels> qualificationLevelsRepository,
     IEntityCRUDResponse entityCRUDResponse
     )
 {
     this._entityCRUDResponse            = entityCRUDResponse;
     this._qualificationLevelsRepository = qualificationLevelsRepository;
 }
Пример #3
0
 public ImageProcessingController(
     IUserService userService,
     IEntityCRUDResponse entityCRUDResponse
     )
 {
     this._userService        = userService;
     this._entityCRUDResponse = entityCRUDResponse;
 }
Пример #4
0
 public InterestService(
     IRepository <Interest> interestRepository,
     IEntityCRUDResponse entityCRUDResponse
     )
 {
     this._entityCRUDResponse = entityCRUDResponse;
     this._interestRepository = interestRepository;
 }
 public EducationInstitutionService(
     IRepository <EductaionalInstitutions> eductaionalInstitutionsRepository,
     IEntityCRUDResponse entityCRUDResponse
     )
 {
     this._eductaionalInstitutionsRepository = eductaionalInstitutionsRepository;
     this._entityCRUDResponse = entityCRUDResponse;
 }
Пример #6
0
        public IActionResult RemoveUserInterests([FromBody] UserInterestViewModel request)
        {
            _entityCRUDResponse = _userService.DeleteUserInterest(new IntegratorUserInterest()
            {
                Id = request.Id
            });

            return(new JsonResult(_entityCRUDResponse));
        }
Пример #7
0
        public IActionResult RemoveUserQualification([FromBody] UserQualificationViewModel request)
        {
            _entityCRUDResponse = _userService.DeleteUserQualification(new UserQualification()
            {
                Id = request.Id
            });

            return(new JsonResult(_entityCRUDResponse));
        }
        public IActionResult RemoveUserCurriculumVitaeLanguage([FromBody] UserInterestViewModel request)
        {
            _entityCRUDResponse = _userService.DeleteUserLanguage(new IntegratorUserLanguages()
            {
                Id = request.Id
            });

            return(new JsonResult(_entityCRUDResponse));
        }
Пример #9
0
        public IActionResult AddNewInterests([FromBody] UserInterestViewModel request)
        {
            _entityCRUDResponse = _interestService.AddInterest(new Interest()
            {
                Id         = request.Id,
                AnInterest = request.Interest
            });

            return(new JsonResult(_entityCRUDResponse));
        }
Пример #10
0
        public IActionResult EdutcationalInstitution([FromBody] EductionalInstitutionViewModel request)
        {
            _entityCRUDResponse = _educationInstitutionService.AddEducationInstitution(new EductaionalInstitutions()
            {
                Id = request.Id,
                EductaionalInstitution = request.EductaionalInstitution
            });

            return(new JsonResult(_entityCRUDResponse));
        }
Пример #11
0
        public IActionResult AddUserInterests([FromBody] EditUserInterestViewModel request)
        {
            _entityCRUDResponse = _userService.AddUserInterest(new IntegratorUserInterest()
            {
                Id               = request.Id,
                InterestLevel    = request.InterestLevel,
                IntegratorUserID = _userService.GetUserID(),
                InterestID       = request.InterestID
            });

            return(new JsonResult(_entityCRUDResponse));
        }
Пример #12
0
        public IActionResult AddUserLanguage([FromBody] EditUserLanguageViewModel request)
        {
            _entityCRUDResponse = _userService.AddUserLanguage(new IntegratorUserLanguages()
            {
                LanguageID               = request.LanguageID,
                IntegratorUserID         = _userService.GetUserID(),
                IsPrimaryLanguage        = request.IsPrimaryLanguage,
                LanguageProficiencyLevel = request.LanguageProficiencyLevel,
                CanSpeakAndWrite         = request.CanSpeakAndWrite
            });

            return(new JsonResult(_entityCRUDResponse));
        }
 public IndividualCurriculumVitaeController(
     ICurriculumVitaeViewModelFactory curriculumVitaeViewModelFactory,
     ICurriculumVitaeService curriculumVitaeService,
     IUserService userService,
     IEducationInstitutionService educationInstitutionService,
     IEntityCRUDResponse entityCRUDResponse,
     IInterestService interestService
     )
 {
     this._curriculumVitaeViewModelFactory = curriculumVitaeViewModelFactory;
     this._CurriculumVitaeService          = curriculumVitaeService;
     this._userService = userService;
     this._educationInstitutionService = educationInstitutionService;
     this._entityCRUDResponse          = entityCRUDResponse;
     this._interestService             = interestService;
 }
Пример #14
0
 public CurriculumVitaeController(
     ICurriculumVitaeViewModelFactory curriculumVitaeViewModelFactory,
     ICurriculumVitaeService curriculumVitaeService,
     IUserService userService,
     IEducationInstitutionService educationInstitutionService,
     IEntityCRUDResponse entityCRUDResponse,
     IInterestService interestService,
     ICompanyService companyService,
     IUserKnowledgeBaseService userKnowledgeBaseService
     )
 {
     this._curriculumVitaeViewModelFactory = curriculumVitaeViewModelFactory;
     this._curriculumVitaeService          = curriculumVitaeService;
     this._userService = userService;
     this._educationInstitutionService = educationInstitutionService;
     this._entityCRUDResponse          = entityCRUDResponse;
     this._interestService             = interestService;
     this._companyService           = companyService;
     this._userKnowledgeBaseService = userKnowledgeBaseService;
 }
Пример #15
0
 public UserService(
     IServiceProvider serviceProvider,
     UserManager <IntegratorUser> userManager,
     RoleManager <IntegratorRole> roleManager,
     IHttpContextAccessor httpContextAccessor,
     IRepository <UserQualification> userQualificationsRepository,
     IRepository <IntegratorUserLanguages> userLanguagesRepository,
     IRepository <IntegratorUserInterest> userInterestsRepository,
     IRepository <IntegratorUserAwards> userAwardsRepository,
     IRepository <IntegratorUserContactDetail> userContactDetailsRepository,
     IRepository <IntegratorFile> commonIntegratorFileRepository,
     IRepository <UserPicture> userProfilePictureRepository,
     IRepository <UserJob> userJobRepository,
     IRepository <UserJobSkill> userJobSkillRepository,
     IRepository <UserJobRelatedIndustry> userJobRelatedIndustryRepository,
     IEntityCRUDResponse entityCRUDResponse,
     IRepository <CoreKbJobSkill> coreKbJobSkillRepository,
     IRepository <CoreKbIndustryJob> coreKbIndustryJobRepository
     )
 {
     this._userManager                      = userManager;
     this._roleManager                      = roleManager;
     this._httpContextAccessor              = httpContextAccessor;
     this._serviceProvider                  = serviceProvider;
     this._userQualificationsRepository     = userQualificationsRepository;
     this._userLanguagesRepository          = userLanguagesRepository;
     this._userInterestsRepository          = userInterestsRepository;
     this._userAwardsRepository             = userAwardsRepository;
     this._userContactDetailsRepository     = userContactDetailsRepository;
     this._entityCRUDResponse               = entityCRUDResponse;
     this._commonIntegratorFileRepository   = commonIntegratorFileRepository;
     this._userProfilePictureRepository     = userProfilePictureRepository;
     this._userJobRepository                = userJobRepository;
     this._userJobSkillRepository           = userJobSkillRepository;
     this._userJobRelatedIndustryRepository = userJobRelatedIndustryRepository;
     this._coreKbJobSkillRepository         = coreKbJobSkillRepository;
     this._coreKbIndustryJobRepository      = coreKbIndustryJobRepository;
 }
Пример #16
0
        public IActionResult UploadUserProfileImage([FromBody] UserProifileImageUploadRequest request)
        {
            byte[] NewImage = Convert.FromBase64String(request.ImageData);
            _entityCRUDResponse = _userService.AddUserProfilePicture(new IntegratorFile()
            {
                ContentType       = request.FileType,
                DateCreated       = DateTime.Now,
                FileSize          = NewImage.Length,
                FileExtension     = Path.GetExtension(request.FileName).Replace(".", ""),
                FileName          = Path.GetFileNameWithoutExtension(request.FileName),
                InegratorFileBlob = new InegratorFileBlob()
                {
                    FileBlob = NewImage
                },
                UserPicture = new UserPicture()
                {
                    IntegratorUserID        = _userService.GetUserID(),
                    IsCurrentProfilePicture = true
                }
            });

            return(new JsonResult(_entityCRUDResponse));
        }