Esempio n. 1
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));
        }
Esempio n. 2
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. 3
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. 4
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));
        }