本文整理汇总了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);
}
}
示例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);
}
}