Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1122


Ignore:
Timestamp:
01/14/09 16:17:46 (16 years ago)
Author:
svonolfe
Message:

Updated client adapter (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs

    r1096 r1122  
    8181    }
    8282
     83    private void Preprocess(ClientInfo client) {
     84      if (client != null) {
     85        if (client.Id == default(long)) {
     86          ClientInfo found = GetById(client.ClientId);
     87          if (found != null)
     88            client.Id = found.Id;
     89        }
     90      }
     91    }
     92
    8393    #region Overrides
    8494    protected override ClientInfo Convert(dsHiveServer.ClientRow row,
     
    208218    public override void Update(ClientInfo client) {
    209219      if (client != null) {
    210         if (client.Id == default(long)) {
    211           ClientInfo found = GetById(client.ClientId);
    212           if (found != null)
    213             client.Id = found.Id;
    214         }
     220        Preprocess(client);
    215221
    216222        ResAdapter.Update(client);
     
    245251    public override bool Delete(ClientInfo client) {     
    246252      if (client != null) {
     253        Preprocess(client);
     254
    247255        dsHiveServer.ClientRow row =
    248256          GetRowById(client.Id);
Note: See TracChangeset for help on using the changeset viewer.