Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/10 03:38:01 (14 years ago)
Author:
swagner
Message:

Worked on OKB data model and services (#1174)

Location:
trunk/sources/HeuristicLab.Services.OKB/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.OKB/3.3/AdminService.cs

    r4381 r4388  
    207207      }
    208208    }
     209
     210
     211    public AlgorithmClass[] GetAlgorithmClasses() {
     212      using (OKBDataContext okb = new OKBDataContext()) {
     213        return okb.AlgorithmClasses.ToArray();
     214      }
     215    }
     216
     217    public void UpdateAlgorithmClass(AlgorithmClass algorithmClass) {
     218      using (OKBDataContext okb = new OKBDataContext()) {
     219        okb.AlgorithmClasses.Attach(algorithmClass);
     220        okb.SubmitChanges();
     221      }
     222    }
     223
     224    public void UpdateAlgorithmClasses(AlgorithmClass[] algorithmClasses) {
     225      using (OKBDataContext okb = new OKBDataContext()) {
     226        foreach (AlgorithmClass a in algorithmClasses) {
     227          AlgorithmClass original = okb.AlgorithmClasses.FirstOrDefault(x => x.Id == a.Id);
     228          if (original != null) {
     229            original.Name = a.Name;
     230            original.Description = a.Description;
     231          } else {
     232            okb.AlgorithmClasses.InsertOnSubmit(a);
     233          }
     234        }
     235        okb.SubmitChanges();
     236      }
     237    }
     238
    209239  }
    210240}
  • trunk/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj

    r4382 r4388  
    121121  <ItemGroup>
    122122    <Compile Include="AdminService.cs" />
    123     <Compile Include="AttributeSelector.cs" />
    124123    <Compile Include="DataService.cs" />
    125124    <Compile Include="ExperimentKit.cs" />
    126125    <Compile Include="Interfaces\IAdminService.cs" />
    127126    <Compile Include="Interfaces\IDataService.cs" />
    128     <Compile Include="Interfaces\IQueryService.cs" />
    129     <Compile Include="Interfaces\IRunnerService.cs">
    130       <SubType>Code</SubType>
    131     </Compile>
    132     <Compile Include="Interfaces\ITableService.cs" />
    133127    <Compile Include="Properties\AssemblyInfo.cs" />
    134     <Compile Include="QueryService.cs" />
    135     <Compile Include="RunnerService.cs">
    136       <SubType>Code</SubType>
    137     </Compile>
    138128    <Compile Include="StarterKit.cs" />
    139     <Compile Include="TableService.cs" />
    140129  </ItemGroup>
    141130  <ItemGroup>
     
    145134  </ItemGroup>
    146135  <ItemGroup>
    147     <ProjectReference Include="..\..\HeuristicLab.Services.OKB.AttributeSelection\3.3\HeuristicLab.Services.OKB.AttributeSelection-3.3.csproj">
    148       <Project>{E80A68DB-D6E1-4395-ABF0-AFE09E4DEF8B}</Project>
    149       <Name>HeuristicLab.Services.OKB.AttributeSelection-3.3</Name>
    150     </ProjectReference>
    151136    <ProjectReference Include="..\..\HeuristicLab.Services.OKB.DataAccess\3.3\HeuristicLab.Services.OKB.DataAccess-3.3.csproj">
    152137      <Project>{E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}</Project>
  • trunk/sources/HeuristicLab.Services.OKB/3.3/Interfaces/IAdminService.cs

    r4381 r4388  
    108108    [OperationContract]
    109109    void UpdateCompleteProblem(Problem problem);
     110
     111
     112
     113    [OperationContract]
     114    AlgorithmClass[] GetAlgorithmClasses();
     115
     116    [OperationContract]
     117    void UpdateAlgorithmClass(AlgorithmClass algorithmClass);
     118
     119    [OperationContract]
     120    void UpdateAlgorithmClasses(AlgorithmClass[] algorithmClasses);
     121
     122
    110123  }
    111124}
Note: See TracChangeset for help on using the changeset viewer.