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)); }
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)); }
public JsonResult AddFaculty(Department entity) { entity.Id = Guid.NewGuid(); entity.IsFaculty = true; var data = BaseEntityManager.AddEntity(entity); return(Json(data, JsonRequestBehavior.AllowGet)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
public JsonResult DeleteTypesOfProjects(List <TypeOfProject> entities) { var data = BaseEntityManager.DeleteEntities(entities); return(Json(data, JsonRequestBehavior.AllowGet)); }
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)); }
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)); }
public JsonResult DeleteCourseTitles(List <CourseTitle> entities) { var data = BaseEntityManager.DeleteEntities(entities); return(Json(data, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteDepartments(List <Department> entities) { var data = BaseEntityManager.DeleteEntities(entities); return(Json(data, JsonRequestBehavior.AllowGet)); }