public ActionResult MeasureSelect(int measureId) { var safetyRepository = new SafetyAssessmentRepository(); ViewData["MeasureList"] = new SelectList(safetyRepository.GetMeasures(), "id", "name", measureId); return(PartialView("MeasureSelectView", measureId)); }
public ActionResult MeasureSelectList([DataSourceRequest] DataSourceRequest request) { var data = repository.GetMeasures().Select(o => new { Id = o.id, Name = o.name }).OrderBy(o => o.Name); return(Json(new { success = true, list = data.ToList() })); }