示例#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));
        }