Пример #1
0
        public ActionResult MeasureSelect(int measureId)
        {
            var safetyRepository = new SafetyAssessmentRepository();

            ViewData["MeasureList"] =
                new SelectList(safetyRepository.GetMeasures(), "id", "name", measureId);

            return(PartialView("MeasureSelectView", measureId));
        }
Пример #2
0
        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() }));
        }