Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1161


Ignore:
Timestamp:
01/21/09 16:22:41 (16 years ago)
Author:
svonolfe
Message:

Added user to job (#372)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/BusinessObjects/Job.cs

    r1120 r1161  
    3535    public State State { get; set; }
    3636    [DataMember]
     37    public User User { get; set; }
     38    [DataMember]
    3739    public ClientInfo Client { get; set; }
    3840    [DataMember]
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/JobAdapter.cs

    r1149 r1161  
    9191        else
    9292          job.Client = null;
     93
     94        if (!row.IsPermissionOwnerIdNull())
     95          job.User = UserAdapter.GetById(row.PermissionOwnerId);
     96        else
     97          job.User = null;
    9398       
    9499        if (!row.IsJobStateNull())
     
    132137        } else
    133138          row.SetParentJobIdNull();
     139
     140        if (job.User != null) {
     141          if (row.IsPermissionOwnerIdNull() ||
     142           row.PermissionOwnerId != job.User.Id) {
     143            UserAdapter.Update(job.User);
     144            row.PermissionOwnerId = job.User.Id;
     145          }
     146        } else
     147          row.SetPermissionOwnerIdNull();
    134148
    135149        if (job.State != State.nullState)
Note: See TracChangeset for help on using the changeset viewer.