Esempio n. 1
0
        public JsonResult AddTypeOfProjects(TypeOfProject entity)
        {
            entity.Id = Guid.NewGuid();
            var data = BaseEntityManager.AddEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult AddAreaOfTraining(AreaOfTraining entity)
        {
            entity.Id = Guid.NewGuid();
            var data = BaseEntityManager.AddEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        public JsonResult AddCourseTitle(CourseTitle entity)
        {
            entity.Id = Guid.NewGuid();
            var data = BaseEntityManager.AddEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult AddWorkingCirriculum(WorkingCirriculum entity)
        {
            entity.Id = Guid.NewGuid();
            var data = BaseEntityManager.AddEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        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));
        }
Esempio n. 6
0
        public JsonResult AddFaculty(Department entity)
        {
            entity.Id        = Guid.NewGuid();
            entity.IsFaculty = true;
            var data = BaseEntityManager.AddEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 7
0
        public JsonResult GetRole(Guid id)
        {
            var data = BaseEntityManager.GetEntity <Role, RoleViewModel>(o => o.Id == id,
                                                                         o => new RoleViewModel {
                Id = o.Id, Name = o.Name, CanTeach = o.CanTeach
            });

            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. 10
0
        public JsonResult GetTypeOfProject(Guid id)
        {
            var data = BaseEntityManager.GetEntity <TypeOfProject, TypeOfProjectsViewModel>(o => o.Id == id, o => new TypeOfProjectsViewModel
            {
                Id        = o.Id,
                Name      = o.Name,
                ShortName = o.ShortName
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 11
0
        public JsonResult GetRoleRights(EntitiesViewModel model)
        {
            var data = BaseEntityManager.GetEntitiesWithJoin <RightRole, Right, Guid, RightViewModel>(
                o => o.RoleId == model.SearchId,
                rr => rr.RightId,
                r => r.Id,
                (r, rr) => new RightViewModel {
                Id = r.Id, Name = r.Name
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 12
0
        public JsonResult GetUserRole(Guid id)
        {
            var data = BaseEntityManager.GetEntity <UserRole, UserRoleViewModel>(o => o.Id == id, o => new UserRoleViewModel
            {
                Id           = o.Id,
                DepartmentId = o.DepartmentId,
                RoleId       = o.RoleId,
                UserId       = o.UserId
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 13
0
        public JsonResult GetFaculty(Guid id)
        {
            var data = BaseEntityManager.GetEntity <Department, DepartmentViewModel>(
                o => o.Id == id, o => new DepartmentViewModel
            {
                Id        = o.Id,
                Name      = o.Name,
                ShortName = o.ShortName
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 14
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. 15
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. 16
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. 17
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. 18
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));
        }
Esempio n. 19
0
        public JsonResult ModifyCourseTitle(CourseTitle entity)
        {
            var data = BaseEntityManager.ModifyEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult ModifyWorkingCirriculum(WorkingCirriculum entity)
        {
            var data = BaseEntityManager.ModifyEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 21
0
        public JsonResult DeleteTypesOfProjects(List <TypeOfProject> entities)
        {
            var data = BaseEntityManager.DeleteEntities(entities);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 22
0
        public JsonResult ModifyTypeOfProjects(TypeOfProject entity)
        {
            var data = BaseEntityManager.ModifyEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult DeleteWorkingCirriculums(List <WorkingCirriculum> entities)
        {
            var data = BaseEntityManager.DeleteEntities(entities);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult ModifyAreaOfTraining(AreaOfTraining entity)
        {
            var data = BaseEntityManager.ModifyEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 25
0
        public JsonResult ModifyFaculty(Department entity)
        {
            var data = BaseEntityManager.ModifyEntity(entity);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult DeleteAreasOfTrainings(List <AreaOfTraining> entities)
        {
            var data = BaseEntityManager.DeleteEntities(entities);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 27
0
        public JsonResult DeleteCourseTitles(List <CourseTitle> entities)
        {
            var data = BaseEntityManager.DeleteEntities(entities);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Esempio n. 28
0
        public JsonResult DeleteDepartments(List <Department> entities)
        {
            var data = BaseEntityManager.DeleteEntities(entities);

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