/// <summary> /// 持久化一个新对象(保存新对象到存储媒介中) /// </summary> /// <param name="roleAuthor"></param> /// <returns></returns> public ExecResult AddRoleAuthor(RoleAuthorEntity roleAuthor) { ExecResult result = new ExecResult(); try { IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); bool flag = roleAuthorService.AddRoleAuthor(roleAuthor); if (flag) { result.result = EnumJsonResult.success.ToString(); result.msg = "成功"; } else { result.result = EnumJsonResult.failure.ToString(); result.msg = "操作失败,请确认登录信息是否正确"; } } catch (Exception ex) { result.result = EnumJsonResult.error.ToString(); result.msg = "更新角色作者信息时出现异常:" + ex.Message; } return(result); }
public Pager <RoleAuthorEntity> GetRoleAuthorPageList(RoleAuthorQuery roleAuthorQuery) { IRoleAuthorService service = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); Pager <RoleAuthorEntity> pager = service.GetRoleAuthorPageList(roleAuthorQuery); return(pager); }
public IList <RoleAuthorEntity> GetRoleAuthorDetailList(RoleAuthorQuery roleAuthorQuery) { IRoleAuthorService service = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); IList <RoleAuthorEntity> list = service.GetRoleAuthorDetailList(roleAuthorQuery); return(list); }
public RoleAuthorEntity GetRoleAuthor(long mapID) { IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); var RoleAuthorEntity = roleAuthorService.GetRoleAuthor(mapID); return(RoleAuthorEntity); }
/// <summary> /// 从存储媒介中删除对象 /// </summary> /// <param name="mapID"></param> /// <returns></returns> public ExecResult DeleteRoleAuthor(long mapID) { IRoleAuthorService service = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); ExecResult result = new ExecResult(); try { IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve <IRoleAuthorService>(); bool flag = roleAuthorService.DeleteRoleAuthor(mapID); if (flag) { result.result = EnumJsonResult.success.ToString(); result.msg = "成功"; } else { result.result = EnumJsonResult.failure.ToString(); result.msg = "操作失败"; } } catch (Exception ex) { result.result = EnumJsonResult.error.ToString(); result.msg = "删除角色作者信息时出现异常:" + ex.Message; } return(result); }
public UserController(IUserService UserService, IDepartmentService departmentService, ICollegeService companyService, IRoleAuthorService roleAuthorService, IHostingEnvironment hostingEnvironment) { _departmentService = departmentService; _UserService = UserService; _companyService = companyService; _roleAuthorService = roleAuthorService; _hostingEnvironment = hostingEnvironment; }