public static UserInfo AddUser(string positionId, UserInfo userInfo) { Position position = Position.GetPositionById(positionId); if (position == null) return null; var user = position.AddUser(userInfo.MappingTo<User>()); if (user == null) return null; return user.MappingTo<UserInfo>(); }
public static UserInfo AddUser(string orgId, UserInfo userInfo) { Organization org = Organization.GetOrganizationById(orgId); if (org == null) return null; var user = org.AddUser(userInfo.MappingTo<User>()); if (user == null) return null; return user.MappingTo<UserInfo>(); }
public static void CreateUser(UserInfo userInfo) { var user = userInfo.MappingTo<User>(); user.Save(); }
public ServiceResult<object> CreateUser(UserInfo user) { UserAdapter.CreateUser(user); return new ServiceResult<object>(null); }
public static ServiceResult<object> Save(UserInfo userInfo) { UserAdapter.Save(userInfo); return new ServiceResult<object>(); }
public static ServiceResult<UserInfo> RemoveUser(string positionId, UserInfo user) { return new ServiceResult<UserInfo>(PositionAdapter.RemoveUser(positionId, user)); }
public static ServiceResult<UserInfo> RemoveUser(string orgId, UserInfo user) { return new ServiceResult<UserInfo>(OrganizationAdapter.RemoveUser(orgId, user)); }