예제 #1
0
 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>();
 }
예제 #2
0
 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>();
 }
예제 #3
0
 public static void CreateUser(UserInfo userInfo)
 {
     var user = userInfo.MappingTo<User>();
     user.Save();
 }
예제 #4
0
 public ServiceResult<object> CreateUser(UserInfo user)
 {
     UserAdapter.CreateUser(user);
     return new ServiceResult<object>(null);
 }
예제 #5
0
 public static ServiceResult<object> Save(UserInfo userInfo)
 {
     UserAdapter.Save(userInfo);
     return new ServiceResult<object>();
 }
예제 #6
0
 public static ServiceResult<UserInfo> RemoveUser(string positionId, UserInfo user)
 {
     return new ServiceResult<UserInfo>(PositionAdapter.RemoveUser(positionId, user));
 }
예제 #7
0
 public static ServiceResult<UserInfo> RemoveUser(string orgId, UserInfo user)
 {
     return new ServiceResult<UserInfo>(OrganizationAdapter.RemoveUser(orgId, user));
 }