public JsonResult GetWorkingCirriculumTypesOfEducation(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <TypeOfEducation, string>(
                o => o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => o.Name);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetAreaOfTrainingLevelsOfHigherEducation(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <LevelOfHigherEducation, LevelOfHigherEducationViewModel>(
                o => o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => new LevelOfHigherEducationViewModel {
                Name = o.Name
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetWorkingCirriculumAreaOfTrainings(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <AreaOfTraining, AreaOfTrainingViewModel>(
                o => o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => new AreaOfTrainingViewModel {
                Id = o.Id, Name = o.Name
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        public JsonResult GetCourseTitleDepartments(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <Department, DepartmentViewModel>(
                o => o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()) ||
                o.ShortName.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => new DepartmentViewModel
            {
                Id   = o.Id,
                Name = o.Name
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 5
0
        public JsonResult GetFacultyDepartments(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <Department, DepartmentViewModel>(
                o => !o.IsFaculty && o.FacultyId == model.SearchId,
                o => new DepartmentViewModel
            {
                Id        = o.Id,
                Name      = o.Name,
                ShortName = o.ShortName
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 6
0
        public JsonResult GetAcademicTitles(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <AcademicTitle, AcademicTitleViewModel>(
                o => o.ShortName.ToLower().Contains((model.Search ?? string.Empty).ToLower()) ||
                o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => new AcademicTitleViewModel
            {
                Id        = o.Id,
                Name      = o.Name,
                ShortName = o.ShortName
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 7
0
        public JsonResult GetRoles(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <Role, RoleViewModel>(
                model.Page,
                model.Limit,
                model.Order,
                model.IsAscending(),
                o => o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()),
                o => new RoleViewModel {
                Id = o.Id, Name = o.Name
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 8
0
        public JsonResult GetFaculties(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntities <Department, DepartmentViewModel>(
                model.Page,
                model.Limit,
                model.Order,
                model.IsAscending(),
                o => o.IsFaculty && (o.Name.ToLower().Contains((model.Search ?? string.Empty).ToLower()) || o.ShortName.ToLower().Contains((model.Search ?? string.Empty).ToLower())),
                o => new DepartmentViewModel {
                Id        = o.Id,
                Name      = o.Name,
                ShortName = o.ShortName
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }