Changeset 7554
- Timestamp:
- 03/05/12 22:33:19 (13 years ago)
- Location:
- branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs
r7334 r7554 25 25 using System.IO; 26 26 using System.Linq; 27 using HeuristicLab.Clients.Access; 27 28 using HeuristicLab.Collections; 28 29 using HeuristicLab.Common; … … 149 150 150 151 #region Persistence Properties 152 [Storable] 153 private Guid UserId; 154 151 155 [Storable(Name = "AlgorithmId")] 152 156 private long StorableAlgorithmId { … … 186 190 runs = cloner.Clone(original.runs); 187 191 storeRunsAutomatically = original.storeRunsAutomatically; 192 UserId = original.UserId; 188 193 RegisterRunsEvents(); 189 194 } … … 195 200 runs = new RunCollection(); 196 201 storeRunsAutomatically = true; 202 UserId = UserInformation.Instance.User.Id; 197 203 RegisterRunsEvents(); 198 204 } … … 381 387 foreach (IRun run in e.Items) { 382 388 if (problem != null) { 383 OKBRun okbRun = new OKBRun(AlgorithmId, problem.ProblemId, run );389 OKBRun okbRun = new OKBRun(AlgorithmId, problem.ProblemId, run, UserId); 384 390 runs.Add(okbRun); 385 391 if (StoreRunsAutomatically) { -
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs
r7535 r7554 80 80 81 81 #region Persistence Properties 82 [Storable] 83 private Guid UserId; 84 82 85 [Storable(Name = "Stored")] 83 86 private bool StorableStored { … … 110 113 createdDate = original.createdDate; 111 114 stored = original.stored; 112 } 113 public OKBRun(long algorithmId, long problemId, IRun run) 115 UserId = original.UserId; 116 } 117 public OKBRun(long algorithmId, long problemId, IRun run, Guid userId) 114 118 : base(run) { 115 119 this.algorithmId = algorithmId; … … 117 121 this.createdDate = DateTime.Now; 118 122 this.stored = false; 123 this.UserId = userId; 119 124 } 120 125 … … 130 135 run.ProblemId = problemId; 131 136 //TODO: should there be some error handling? at this point it should already be checked that the user and client are registred 132 run.UserId = UserI nformation.Instance.User.Id;137 run.UserId = UserId; 133 138 run.ClientId = ClientInformation.Instance.ClientInfo.Id; 134 139 run.CreatedDate = createdDate;
Note: See TracChangeset
for help on using the changeset viewer.