当前位置: 首页>>代码示例>>C#>>正文


C# UserRepository.GetListEducationalInfo方法代码示例

本文整理汇总了C#中UserRepository.GetListEducationalInfo方法的典型用法代码示例。如果您正苦于以下问题:C# UserRepository.GetListEducationalInfo方法的具体用法?C# UserRepository.GetListEducationalInfo怎么用?C# UserRepository.GetListEducationalInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserRepository的用法示例。


在下文中一共展示了UserRepository.GetListEducationalInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UserProfile

        public IHttpActionResult UserProfile(long id, string data)
        {
            try
            {
                UserRepository userRepo = new UserRepository();
                Applicant app = userRepo.GetApplicant(id);
                JobRepository jobRepo = new JobRepository();

                UserCollectionsViewModel model = new UserCollectionsViewModel();

                switch (data)
                {
                    case "educ":
                        model.educ = userRepo.GetListEducationalInfo(id);
                        break;

                    case "basic":
                        model.basicInfo = userRepo.GetBasicInfo(id);
                        break;

                    case "saved":
                        model.savedJobs = jobRepo.GetSavedJobs(id);
                        break;

                    case "exp":
                        model.exp = userRepo.GetExperience(userRepo.GetApplicant(id).resume_id);
                        break;

                    default:
                        model.initialInfo = userRepo.GetInitialInfo(id);
                        break;
                }

                SelectRepository selectRepo = new SelectRepository();

                model.jobSearch = new JobFilterCollectionViewModel();
                model.jobSearch.workbases = selectRepo.Workbases();
                model.jobSearch.specializations = selectRepo.Specializations();

                ContentRepository contentRepo = new ContentRepository();

                model.news = contentRepo.GetLatest("news", 2);
                model.partners = contentRepo.GetLatest("partners", 6);

                SettingsRepository settingsRepo = new SettingsRepository();
                model.fb = JsonConvert.DeserializeObject<FacebookViewModel>(settingsRepo.GetSetting("fb").value);

                model.hotJobs = jobRepo.GetHotJobs();
                model.recommendedJobs = jobRepo.GetRecommendedJobs(app);
                model.savedJobsCount = jobRepo.GetSavedJobs(app.id).Count;

                JobGroupRepository groupRepo = new JobGroupRepository();
                List<JobGroupViewModel> groups = groupRepo.GetList(string.Empty, "sequence_asc", true);

                foreach (var g in groups)
                {
                    g.jobs = jobRepo.GetByGroup(g.id);
                    model.jobGroups.Add(g);
                }

                model.promotions = userRepo.GetPromotions(app.resume_id);
                model.initialInfo = userRepo.GetInitialInfo(id);
                model.photo = app.photo;

                model.interview = userRepo.GetInterviewStatus(app.role_id);

                return Ok(model);
            }
            catch (Exception ex)
            {
                return BadRequest(ex.Message);
            }
        }
开发者ID:neiljc07,项目名称:VSEntityFramework,代码行数:73,代码来源:CollectionsController.cs

示例2: EducationMetadata

        public IHttpActionResult EducationMetadata(long id)
        {
            try
            {
                EducationMetadata data = new EducationMetadata();
                SelectRepository repo = new SelectRepository();
                UserRepository userRepo = new UserRepository();

                data.count = userRepo.GetListEducationalInfo(id).Count;
                data.fields = repo.FieldOfStudies();
                data.levels = repo.EducationalLevels();

                return Ok(data);
            }
            catch (Exception ex)
            {
                return BadRequest(ex.Message);
            }
        }
开发者ID:neiljc07,项目名称:VSEntityFramework,代码行数:19,代码来源:CollectionsController.cs


注:本文中的UserRepository.GetListEducationalInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。