Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7946


Ignore:
Timestamp:
06/01/12 14:08:34 (12 years ago)
Author:
ascheibe
Message:

#1648 fixed client group update method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs

    r7945 r7946  
    230230    }
    231231
    232     public void UpdateClientGroup(DT.ClientGroup group) {
    233       AddClientGroup(group);
     232    public void UpdateClientGroup(DT.ClientGroup clientGroup) {
     233      using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
     234        var query = from g in context.Resources.OfType<DA.ClientGroup>()
     235                    where g.Id == clientGroup.Id
     236                    select g;
     237
     238        if (query.Count() > 0) {
     239          var entity = query.First();
     240          entity.Name = clientGroup.Name;
     241          entity.Description = clientGroup.Description;
     242          context.SubmitChanges();
     243        }
     244      }
    234245    }
    235246
Note: See TracChangeset for help on using the changeset viewer.