private void PrepareJobSearchView(JobSearch jobSearch) { var md = new MarkdownDeep.Markdown(); ViewBag.JobSearchId = jobSearch.Id; ViewBag.Title = jobSearch.Title; ViewBag.PublicNotes = new MvcHtmlString(md.Transform(jobSearch.PublicNotes)); ViewBag.TechnicalSkillLevels = TechnicalSkillLevelExtensions.GetValues(); }
public ActionResult Edit(string id, string sharedCode = null) { var applicant = RavenSession.Load <Applicant>(id); if (applicant == null) { return(HttpNotFound()); } ScriptManager.RegisterGlobalJavascript( "ViewData", new { applicant = GetApplicantJsonWithModifiedDate(applicant), forceReadOnly = sharedCode != null, technicalSkillLevels = TechnicalSkillLevelExtensions.GetLevelNames() }, 500); return(View()); }
public ActionResult Edit(string id) { log.Info("Edit employee (id: " + id + ")"); var employee = RavenSession.Load <Employee>(id); if (employee == null) { return(HttpNotFound()); } AttachmentSlot[] slotsToShow = Query(new AttachmentSlotsQuery <Employee>()); ScriptManager.RegisterGlobalJavascript( "ViewData", new { employee = employee, attachmentSlots = slotsToShow, technicalSkillLevels = TechnicalSkillLevelExtensions.GetLevelNames() }, 500); return(View()); }