コード例 #1
0
 private void loadAllExpertises()
 {
     allExpertises = new ObservableCollection <IExpertiseEntity>(repos.GetAll());
     NotifyPropertyChanged(nameof(ExpertiseID));
     NotifyPropertyChanged(nameof(Categories));
     NotifyPropertyChanged(nameof(Expertises));
 }
コード例 #2
0
 public void RefreshExpertises()
 {
     OutExpertises = new ObservableCollection <IExpertiseEntity>(
         expertiseRepos.GetAll().OrderBy(T => T.Category).ThenBy(T => T.Expertise));
     foreach (var item in InExpertises)
     {
         if (OutExpertises.Contains(item))
         {
             OutExpertises.Remove(item);
         }
     }
     NotifyPropertyChanged(nameof(OutExpertises));
 }
コード例 #3
0
        // Private Methods

        private void loadExpertiseItems()
        {
            allExpertiseEntities = repos.GetAll().ToList();
            NotifyPropertyChanged(nameof(Categories));
        }
コード例 #4
0
        /*************************
        **************************
        ***** PUBLIC METHODS *****
        **************************
        *************************/

        public ResumeCreatorViewModel(
            IResumeCreationService rcs,
            ILoggingService ls,
            IGeneralInfoRepository giRepository,
            IExperienceRepository experienceRepository,
            IExpertiseRepository expertiseRepository,
            IEducationRepository educationRepository,
            IPublicationsRepository publicationsRepository,
            IKernel kernel)
        {
            try
            {
                this.rcs             = rcs;
                this.giRepos         = giRepository;
                this.experienceRepos = experienceRepository;
                this.expertiseRepos  = expertiseRepository;
                this.edRepos         = educationRepository;
                this.pubRepos        = publicationsRepository;
                this.ls      = ls;
                this._kernel = kernel;

                SetUpRelayCommands();

                var gie = giRepos.Get(Guid.Empty);
                FullName = gie.FullName;
                Email    = gie.Email;
                Phone    = gie.Phone;
                AddLine1 = gie.Add1;
                AddLine2 = gie.Add2;

                InExpertises  = new ObservableCollection <IExpertiseEntity>();
                OutExpertises = AllExpertises = new ObservableCollection <IExpertiseEntity>(expertiseRepos.GetAll());

                RefreshJobs();

                InEducations  = new ObservableCollection <IEducationEntity>();
                OutEducations = AllEducations = new ObservableCollection <IEducationEntity>(edRepos.GetAll());

                InPublications  = new ObservableCollection <IPublicationEntity>();
                OutPublications = AllPublications = new ObservableCollection <IPublicationEntity>(pubRepos.GetAll());

                UpdateDocumentPreview();
            }
            catch (Exception e)
            {
                ls.Log(e, "Exception");
            }
        }
コード例 #5
0
        public IEnumerable <Expertise> GetExpertises()
        {
            var expertises = expertiseRepository.GetAll();

            return(expertises);
        }