示例#1
0
        public JsonResult GridDataRequested()
        {
            try
            {
                DisciplineJqGridModel disciplineJqGridModel = new DisciplineJqGridModel();

                SetUpGrid(disciplineJqGridModel.DisciplineJqGrid);

                IQueryable<Discipline> allDisciplines = _disciplineService.GetAllDisciplines();

                return disciplineJqGridModel.DisciplineJqGrid.DataBind(allDisciplines.Select(x => new
                {
                    x.Id,
                    FullName = x.Name,
                    ShortName = x.ShortName,
                    IsActive = x.IsActive
                }));

            }
            catch (Exception ex)
            {

                return Json(null, JsonRequestBehavior.AllowGet);

            }
        }
示例#2
0
        //
        // GET: /Discipline/
        public ActionResult Index()
        {
            DisciplineJqGridModel gridModel = new DisciplineJqGridModel();

            SetUpGrid(gridModel.DisciplineJqGrid);

            return View(gridModel);
        }