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()); }