Changeset 4588
- Timestamp:
- 10/09/10 19:11:54 (14 years ago)
- Location:
- branches/UserManagement
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.dbml
r4584 r4588 141 141 </Type> 142 142 </Table> 143 <Function Name="dbo.aspnet_Users_DeleteUser" Method="aspnet_Users_DeleteUser"> 144 <Parameter Name="ApplicationName" Parameter="applicationName" Type="System.String" DbType="NVarChar(256)" /> 145 <Parameter Name="UserName" Parameter="userName" Type="System.String" DbType="NVarChar(256)" /> 146 <Parameter Name="TablesToDeleteFrom" Parameter="tablesToDeleteFrom" Type="System.Int32" DbType="Int" /> 147 <Parameter Name="NumTablesDeletedFrom" Parameter="numTablesDeletedFrom" Type="System.Int32" DbType="Int" Direction="InOut" /> 148 <Return Type="System.Int32" /> 149 </Function> 143 150 </Database> -
branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.dbml.layout
r4584 r4588 15 15 </nestedChildShapes> 16 16 </classShape> 17 <associationConnector edgePoints="[(2.5 : 1.60179768880208); (2.66666666666667 : 1.60179768880208 : JumpStart); (2. 92708083333333 : 1.60179768880208 : JumpEnd); (3.625 : 1.60179768880208)]" fixedFrom="Algorithm" fixedTo="Algorithm">17 <associationConnector edgePoints="[(2.5 : 1.60179768880208); (2.66666666666667 : 1.60179768880208 : JumpStart); (2.83333333333333 : 1.60179768880208 : JumpEnd); (3.625 : 1.60179768880208)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 18 18 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Membership" /> 19 19 <nodes> … … 28 28 </nestedChildShapes> 29 29 </classShape> 30 <associationConnector edgePoints="[(2.5 : 1.03125); (2.66666666666667 : 1.03125 : JumpStart); (2.83333333333333 : 1.03125 : JumpEnd); (5.79166666666667 : 1.03125 : JumpStart); (5.95833333333333 : 1.03125 : JumpEnd); (7.375 : 1.03125)]" fixedFrom=" Algorithm" fixedTo="Algorithm">30 <associationConnector edgePoints="[(2.5 : 1.03125); (2.66666666666667 : 1.03125 : JumpStart); (2.83333333333333 : 1.03125 : JumpEnd); (5.79166666666667 : 1.03125 : JumpStart); (5.95833333333333 : 1.03125 : JumpEnd); (7.375 : 1.03125)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 31 31 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Path" /> 32 32 <nodes> … … 41 41 </nestedChildShapes> 42 42 </classShape> 43 <associationConnector edgePoints="[(7.375 : 1.83617468880208); (5.875 : 1.83617468880208); (5.875 : 0.625); (2.75 : 0.625); (2.75 : 2.32859537760417); (1.5 : 2.32859537760417); (1.5 : 2.75)]" fixedFrom=" Algorithm" fixedTo="Algorithm">43 <associationConnector edgePoints="[(7.375 : 1.83617468880208); (5.875 : 1.83617468880208); (5.875 : 0.625); (2.75 : 0.625); (2.75 : 2.32859537760417); (1.5 : 2.32859537760417); (1.5 : 2.75)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 44 44 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Path/aspnet_Path_aspnet_PersonalizationAllUser" /> 45 45 <nodes> … … 54 54 </nestedChildShapes> 55 55 </classShape> 56 <associationConnector edgePoints="[(8.9375 : 2.57859537760417); (8.9375 : 3.875)]" fixedFrom=" Algorithm" fixedTo="Algorithm">56 <associationConnector edgePoints="[(8.9375 : 2.57859537760417); (8.9375 : 3.875)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 57 57 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Path/aspnet_Path_aspnet_PersonalizationPerUser" /> 58 58 <nodes> … … 73 73 </nestedChildShapes> 74 74 </classShape> 75 <associationConnector edgePoints="[(2.5 : 0.78125); ( 2.66666666666667 : 0.781249999999999 : JumpStart); (2.83333333333333 : 0.78125 : JumpEnd); (5.79166666666667 : 0.781249999999999 : JumpStart); (5.95833333333333 : 0.78125 : JumpEnd); (9.90625 : 0.78125); (9.90625 : 6.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">75 <associationConnector edgePoints="[(2.5 : 0.78125); (9.90625 : 0.78125); (9.90625 : 6.375)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 76 76 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_Role" /> 77 77 <nodes> … … 86 86 </nestedChildShapes> 87 87 </classShape> 88 <classShape Id="6bceff2f-2d6b-4f24-b50d-2296ff7f62c3" absoluteBounds=" 1.25, 7.375, 2, 2.1554996744791666">88 <classShape Id="6bceff2f-2d6b-4f24-b50d-2296ff7f62c3" absoluteBounds="0.75, 8.25, 2, 2.1554996744791666"> 89 89 <DataClassMoniker Name="/UserManagementDataContext/aspnet_User" /> 90 90 <nestedChildShapes> 91 <elementListCompartment Id="bf2f1444-f051-4d39-9055-c21643a53875" absoluteBounds=" 1.2650000000000001, 7.835, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />91 <elementListCompartment Id="bf2f1444-f051-4d39-9055-c21643a53875" absoluteBounds="0.76500000000000012, 8.71, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 92 92 </nestedChildShapes> 93 93 </classShape> 94 <associationConnector edgePoints="[( 3 : 7.375); (3 : 4.56814697265625); (3.625 : 4.56814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">94 <associationConnector edgePoints="[(2.65625 : 8.25); (2.65625 : 4.56814697265625); (3.04166666666667 : 4.56814697265625 : JumpStart); (3.20833333333333 : 4.56814697265625 : JumpEnd); (3.625 : 4.56814697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 95 95 <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_Membership" /> 96 96 <nodes> … … 99 99 </nodes> 100 100 </associationConnector> 101 <associationConnector edgePoints="[( 3.25 : 8.8694482421875); (3.54166666666667 : 8.8694482421875 : JumpStart); (3.70833333333333 : 8.8694482421875 : JumpEnd); (7.84375 : 8.8694482421875); (7.84375 : 5.64589680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm">101 <associationConnector edgePoints="[(2.75 : 9.32774983723958); (3.54166666666667 : 9.32774983723958 : JumpStart); (3.70833333333333 : 9.32774983723958 : JumpEnd); (7.84375 : 9.32774983723958); (7.84375 : 5.64589680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 102 102 <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_PersonalizationPerUser" /> 103 103 <nodes> … … 106 106 </nodes> 107 107 </associationConnector> 108 <associationConnector edgePoints="[(1. 875 : 7.375); (1.875 : 6.77089680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm">108 <associationConnector edgePoints="[(1.625 : 8.25); (1.625 : 6.77089680989583)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 109 109 <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_Profile" /> 110 110 <nodes> … … 113 113 </nodes> 114 114 </associationConnector> 115 <associationConnector edgePoints="[(2.5 : 1.31652384440104); (2.66666666666667 : 1.31652384440104 : JumpStart); (2.83333333333333 : 1.31652384440104 : JumpEnd); (2.8437475 : 1.31652384440104); (2.8437475 : 7.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">115 <associationConnector edgePoints="[(2.5 : 2.07859537760417); (3.125 : 2.70359537760417); (3.125 : 7.875); (2.75 : 8.25153746153846)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 116 116 <AssociationMoniker Name="/UserManagementDataContext/aspnet_Application/aspnet_Application_aspnet_User" /> 117 117 <nodes> … … 133 133 </nodes> 134 134 </associationConnector> 135 <associationConnector edgePoints="[(2 .25 : 9.53049967447917); (2.25: 12.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">135 <associationConnector edgePoints="[(2 : 10.4054996744792); (2 : 12.375)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 136 136 <AssociationMoniker Name="/UserManagementDataContext/aspnet_User/aspnet_User_aspnet_UsersInRole" /> 137 137 <nodes> -
branches/UserManagement/HeuristicLab.Services.Authentication.DataAccess/UserManagement.designer.cs
r4584 r4588 182 182 return this.GetTable<aspnet_WebEvent_Event>(); 183 183 } 184 } 185 186 [global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.aspnet_Users_DeleteUser")] 187 public int aspnet_Users_DeleteUser([global::System.Data.Linq.Mapping.ParameterAttribute(Name="ApplicationName", DbType="NVarChar(256)")] string applicationName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(256)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="TablesToDeleteFrom", DbType="Int")] System.Nullable<int> tablesToDeleteFrom, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NumTablesDeletedFrom", DbType="Int")] ref System.Nullable<int> numTablesDeletedFrom) 188 { 189 IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), applicationName, userName, tablesToDeleteFrom, numTablesDeletedFrom); 190 numTablesDeletedFrom = ((System.Nullable<int>)(result.GetParameterValue(3))); 191 return ((int)(result.ReturnValue)); 184 192 } 185 193 } -
branches/UserManagement/HeuristicLab.Services.Authentication.TestClient/TestClient.cs
r4584 r4588 23 23 Console.WriteLine("Item=" + item.UserName); 24 24 } 25 25 26 Console.WriteLine("Try to delete user..."); 27 28 User u = new User() { UserId = new Guid("e4abc6ae-c954-4efd-8108-e536226fd9c7") }; 29 auth.DeleteUser(u); 26 30 27 31 } -
branches/UserManagement/HeuristicLab.Services.Authentication/AuthenticationService.cs
r4584 r4588 13 13 public class AuthenticationService : IAuthenticationService 14 14 { 15 #region User 15 16 public DataTransfer.User GetUser(Guid UserId) 16 17 { … … 47 48 return UserList; 48 49 } 50 51 public void InsertUser(User user) 52 { 53 // insert user 54 if (user != null) 55 { 56 57 58 59 using (UserManagementDataContext db = new UserManagementDataContext()) 60 { 61 aspnet_User userDa = Convert.ToEntity(user); 62 db.aspnet_Users.InsertOnSubmit(userDa); 63 db.SubmitChanges(); 64 } 65 66 } 67 } 68 69 public void DeleteUser(User user) 70 { 71 if (user != null) 72 { 73 74 75 76 using (UserManagementDataContext db = new UserManagementDataContext()) 77 { 78 79 // membership 80 // profile 81 // users per role 82 // personalization per role 83 84 //////////////// 85 86 // servie mit id aufrufen, id mit datacontext holen und dann löschen ... 87 88 db.SubmitChanges(); 89 } 90 91 } 92 } 93 94 #endregion 49 95 } 50 96 } -
branches/UserManagement/HeuristicLab.Services.Authentication/Convert.cs
r4584 r4588 13 13 #region User 14 14 15 /// <summary> 16 /// converts data transfer object to data access objet 17 /// </summary> 18 /// <param name="source">data transfer object</param> 19 /// <returns>data access object</returns> 15 20 public static aspnet_User ToEntity(User source) 16 21 { 17 22 if (source == null) return null; 18 return new aspnet_User() { UserName = source.UserName }; 23 return new aspnet_User() 24 { 25 UserId = source.UserId, 26 UserName = source.UserName, 27 LastActivityDate = source.LastActivityDate, 28 ApplicationId = source.ApplicationId, 29 }; 19 30 } 20 31 32 /// <summary> 33 /// converts data access object to data transfer object 34 /// </summary> 35 /// <param name="source">data access object</param> 36 /// <returns>data transfer object</returns> 21 37 public static User ToDataTransfer(aspnet_User source) 22 38 { 23 39 if (source == null) return null; 24 return new User() { UserName=source.UserName }; 40 return new User() 41 { 42 UserName = source.UserName 43 }; 25 44 } 45 46 /// <summary> 47 /// converts data transfer object to data access object 48 /// </summary> 49 /// <param name="source">data transfer object</param> 50 /// <param name="target">data access object</param> 51 public static void ToEntity(User source, aspnet_User target) 52 { 53 if ((source != null) && (target != null)) 54 { 55 target.UserName = source.UserName; 56 } 57 58 } 59 26 60 27 61 #endregion 28 62 29 //#region Platform 30 //public static DT.Platform ToDto(DA.Platform source)31 //{ 32 // if (source == null) return null;33 // return new DT.Platform { Id = source.Id, Name = source.Name, Description = source.Description }; 34 //}35 //public static DA.Platform ToEntity(DT.Platform source) 36 //{37 // if (source == null) return null; 38 // return new DA.Platform { Id = source.Id, Name = source.Name, Description = source.Description };39 //} 40 //public static void ToEntity(DT.Platform source, DA.Platform target)41 //{ 42 // if ((source != null) && (target != null))43 // target.Id = source.Id; target.Name = source.Name; target.Description = source.Description; 44 //}45 //#endregion 63 64 #region Application 65 66 #endregion 67 68 #region Membership 69 70 #endregion 71 72 #region Role 73 74 #endregion 75 76 #region User 77 78 #endregion 79 46 80 } 47 81 } -
branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs
r4584 r4588 12 12 public interface IAuthenticationService 13 13 { 14 #region User 14 15 [OperationContract] 15 16 User GetUser(Guid id); 17 16 18 [OperationContract] 17 19 IEnumerable<User> GetUsers(); 20 21 [OperationContract] 22 void InsertUser(User user); 23 #endregion 24 18 25 } 19 26 }
Note: See TracChangeset
for help on using the changeset viewer.