// GET: Culture public ActionResult CultureCreatePartialJobPosting(JobPosting model) { Culture culture = new Culture(); List<Trait> listItems = new List<Trait>(); foreach (var prop in from s in culture.GetType().GetProperties() select s) { if (!prop.PropertyType.Equals(typeof(int))) continue; Trait item = new Trait { DisplayName = prop.Name, PropertyName = prop.Name }; listItems.Add(item); } CultureCreateViewModel viewModel = new CultureCreateViewModel { CreatorType = CultureCreatorType.JobPosting, CreatorId = model.Id, Traits = listItems }; return PartialView("CultureCreatePartial", viewModel); }
public ActionResult SkillCreatePartialJobPosting(JobPosting model) { SkillRequirement Skill = new SkillRequirement(); List<Trait> listItems = new List<Trait>(); foreach (var prop in from s in Skill.GetType().GetProperties() select s) { if (!prop.PropertyType.Equals(typeof(int?))) continue; Trait item = new Trait { DisplayName = prop.Name, PropertyName = prop.Name }; listItems.Add(item); } SkillCreateViewModel viewModel = new SkillCreateViewModel { CreatorType = SkillCreatorType.JobPosting, CreatorId = model.Id, Traits = listItems }; return PartialView("SkillCreatePartial", viewModel); }