- Timestamp:
- 04/17/09 14:03:06 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/3.2/ClientGroupAdapter.cs
r1580 r1597 71 71 } 72 72 } 73 74 private IClientAdapter clientAdapter = null;75 76 private IClientAdapter ClientAdapter {77 get {78 if (clientAdapter == null)79 clientAdapter =80 this.Session.GetDataAdapter<ClientInfo, IClientAdapter>();81 82 return clientAdapter;83 }84 }85 73 #endregion 86 74 … … 102 90 clientGroup.Resources.Clear(); 103 91 foreach(Guid resource in resources) { 104 ClientInfo client =105 ClientAdapter.GetById(resource);92 Resource res = 93 ResAdapter.GetByIdPolymorphic(resource); 106 94 107 if (client == null) { 108 //client group 109 ClientGroup group = 110 GetById(resource); 111 112 clientGroup.Resources.Add(group); 113 } else { 114 clientGroup.Resources.Add(client); 115 } 95 clientGroup.Resources.Add(res); 116 96 } 117 97 … … 141 121 new List<Guid>(); 142 122 foreach(Resource res in group.Resources) { 143 if (res is ClientInfo) { 144 ClientAdapter.Update(res as ClientInfo); 145 } else if (res is ClientGroup) { 146 Update(res as ClientGroup); 147 } else { 148 ResAdapter.Update(res); 149 } 123 ResAdapter.UpdatePolymorphic(res); 150 124 151 125 relationships.Add(res.Id);
Note: See TracChangeset
for help on using the changeset viewer.