示例#1
0
        public IActionResult GetGroups([FromBody] GetGroupFiltersModel model)
        {
            var gr = _groups.GetGroupInfoBySpeciality(model.SpecialityId);

            if (gr != null)
            {
                return(Ok(gr));
            }
            else
            {
                return(BadRequest("Error"));
            }
        }
示例#2
0
        public IActionResult GetDropdownGroups([FromBody] GetGroupFiltersModel model)
        {
            var gr = _groups.GetGroupsBySpeciality(model.SpecialityId).Select(t => new DropdownModel
            {
                Label = t.Name,
                Value = t.Id.ToString()
            });

            if (gr != null)
            {
                return(Ok(gr));
            }
            else
            {
                return(BadRequest("Error"));
            }
        }