Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4388


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

Worked on OKB data model and services (#1174)

Files:
28 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB/HeuristicLab.OKB.sln

    r4311 r4388  
    2626    ServiceClient.config = ServiceClient.config
    2727  EndProjectSection
     28EndProject
     29Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.OKB-3.3", "HeuristicLab.Clients.OKB-3.3\HeuristicLab.Clients.OKB-3.3.csproj", "{73857A9C-9706-4B72-8D9C-210B5B6A5691}"
    2830EndProject
    2931Global
     
    157159    {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x86.ActiveCfg = Release|x86
    158160    {CFBF2410-99A1-44EC-BFEA-F1AD4C3DA622}.Release|x86.Build.0 = Release|x86
     161    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     162    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|Any CPU.Build.0 = Debug|Any CPU
     163    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|x64.ActiveCfg = Debug|Any CPU
     164    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Debug|x86.ActiveCfg = Debug|Any CPU
     165    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Release|Any CPU.ActiveCfg = Release|Any CPU
     166    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Release|Any CPU.Build.0 = Release|Any CPU
     167    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Release|x64.ActiveCfg = Release|Any CPU
     168    {73857A9C-9706-4B72-8D9C-210B5B6A5691}.Release|x86.ActiveCfg = Release|Any CPU
    159169  EndGlobalSection
    160170  GlobalSection(SolutionProperties) = preSolution
  • trunk/sources/HeuristicLab.Services.OKB.DataAccess/3.3/HeuristicLab.Services.OKB.DataAccess-3.3.csproj

    r4384 r4388  
    126126      <DependentUpon>OKB.dbml</DependentUpon>
    127127    </None>
    128     <Compile Include="Extensions.cs">
    129       <SubType>Code</SubType>
    130     </Compile>
    131128    <Compile Include="OKB.generated.cs">
    132129      <DependentUpon>OKB.tt</DependentUpon>
  • 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.