Exemplo n.º 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>();
 }
Exemplo n.º 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>();
 }
Exemplo n.º 3
0
 public static void CreateUser(UserInfo userInfo)
 {
     var user = userInfo.MappingTo<User>();
     user.Save();
 }