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 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 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 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)); }