Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/13 10:59:03 (11 years ago)
Author:
spimming
Message:

#1888:

  • Added billing test client
  • Use entity framework for DAL
  • Modified service interface and model classes
Location:
branches/OaaS/HeuristicLab.Services.Optimization.Billing
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Billing/HeuristicLab.Services.Optimization.Billing.csproj

    r9556 r9576  
    3232  </PropertyGroup>
    3333  <ItemGroup>
     34    <Reference Include="EntityFramework">
     35      <HintPath>..\packages\EntityFramework.5.0.0\lib\net40\EntityFramework.dll</HintPath>
     36    </Reference>
    3437    <Reference Include="System" />
     38    <Reference Include="System.ComponentModel.DataAnnotations" />
    3539    <Reference Include="System.Core" />
     40    <Reference Include="System.Data.Entity" />
    3641    <Reference Include="System.ServiceModel" />
    3742    <Reference Include="System.Xml.Linq" />
     
    4247  </ItemGroup>
    4348  <ItemGroup>
     49    <Compile Include="Business\BillingService.cs" />
     50    <Compile Include="Business\BillingServiceProvider.cs" />
     51    <Compile Include="DataAccess\BillingContext.cs" />
     52    <Compile Include="DataAccess\BillingDao.cs" />
     53    <Compile Include="Interfaces\IEntity.cs" />
     54    <Compile Include="Interfaces\IGenericDao.cs" />
    4455    <Compile Include="Interfaces\IOptimizationBilling.cs" />
    45     <Compile Include="MockupOptimizationBilling.cs" />
     56    <Compile Include="Business\MockupBillingService.cs" />
    4657    <Compile Include="Model\Model.cs" />
    4758    <Compile Include="Properties\AssemblyInfo.cs" />
    4859  </ItemGroup>
     60  <ItemGroup>
     61    <None Include="App.config" />
     62    <None Include="packages.config" />
     63  </ItemGroup>
     64  <ItemGroup />
    4965  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    5066  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/OaaS/HeuristicLab.Services.Optimization.Billing/Interfaces/IOptimizationBilling.cs

    r9551 r9576  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
     1using System.Collections.Generic;
     2using System.Net.Security;
    53using System.ServiceModel;
    6 using System.Net.Security;
    74using HeuristicLab.Services.Optimization.Billing.Model;
    85
     
    107  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    118  public interface IOptimizationBilling {
     9    [OperationContract]
    1210    IList<Product> GetProducts();
     11
    1312    // payment methods via enumeration
     13
     14    [OperationContract]
    1415    void SaveOrder(Order order);
     16
     17    [OperationContract]
    1518    IList<Order> GetOrdersByState(OrderState state);
    1619  }
  • branches/OaaS/HeuristicLab.Services.Optimization.Billing/Model/Model.cs

    r9558 r9576  
    11using System;
    22using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    53
    64namespace HeuristicLab.Services.Optimization.Billing.Model {
    75  public class ContactInformation {
    8     public long Id { get; set; }
     6    public long ContactInformationId { get; set; }
    97    public string OrganizationName { get; set; }
    108    public string Street { get; set; }
     
    2624
    2725  public class Product {
    28     public long Id { get; set; }
     26    public long ProductId { get; set; }
    2927    public string Name { get; set; }
    3028    public string Description { get; set; }
     
    3432
    3533  public class User {
     34    public long UserId { get; set; }
    3635    public string Name { get; set; }
    3736  }
     
    4645
    4746  public class Order {
    48     public long Id { get; set; }
    49     public User User { get; set; }
     47    public long OrderId { get; set; }
     48    public long UserId { get; set; }
    5049    public string BillingType { get; set; }
    51     public OrderState State { get; set; }
     50    public long OrderStateId { get; set; }
    5251    public string BillingPeriod { get; set; }
    5352    public DateTime ActiveSince { get; set; }
    5453    public DateTime ActiveUntil { get; set; }
    55     public IList<Invoice> Invoices { get; set; }
    56     public IList<OrderLine> OrderLines { get; set; }
     54
     55
     56    public virtual User User { get; set; }
     57    public virtual OrderState State { get; set; }
     58    public virtual IList<Invoice> Invoices { get; set; }
     59    public virtual IList<OrderLine> OrderLines { get; set; }
    5760  }
    5861
    5962  public class OrderLine {
    60     public long Id { get; set; }
    61     public Order Order { get; set; }
    62     public Product Product { get; set; }
     63    public long OrderLineId { get; set; }
     64    public long OrderId { get; set; }
     65    public long ProductId { get; set; }
    6366    public int Quantity { get; set; }
    6467    public double ProductPrice { get; set; }
     68
     69    public virtual Order Order { get; set; }
     70    public virtual Product Product { get; set; }
    6571  }
    6672
    6773  public class Invoice {
    68     public long Id { get; set; }
    69     public User User { get; set; }
     74    public long InvoiceId { get; set; }
     75    public long UserId { get; set; }
     76    public long OrderId { get; set; }
    7077    public DateTime Due { get; set; }
    7178    public string Status { get; set; }
    7279    public string InvoiceDocument { get; set; }
    73     public Order Order { get; set; }
     80
     81    public virtual User User { get; set; }
     82    public virtual Order Order { get; set; }
    7483  }
    7584
    7685  public class InvoiceLine {
    77     public long Id { get; set; }
    78     public Invoice Invoice { get; set; }
    79     public Product Product { get; set; }
     86    public long InvoiceLineId { get; set; }
     87    public long InvoiceId { get; set; }
     88    public long ProductId { get; set; }
    8089    public int Quantity { get; set; }
    8190    public double ProductPrice { get; set; }
     91
     92    public virtual Invoice Invoice { get; set; }
     93    public virtual Product Product { get; set; }
    8294  }
    8395
    84   public class Usage {
    85     public long Id { get; set; }
    86     public User User { get; set; }
    87     public IList<UsageLine> UsageLines { get; set; }
     96  public class UsageRecord {
     97    public long UsageRecordId { get; set; }
     98    public long UserId { get; set; }
     99
     100    public virtual User User { get; set; }
     101    public virtual IList<UsageRecordLine> UsageRecordLines { get; set; }
    88102  }
    89103
    90   public class UsageLine {
    91     public long Id { get; set; }
    92     public Usage Usage { get; set; }
     104  public class UsageRecordLine {
     105    public long UsageRecordLineId { get; set; }
     106    public long UsageRecordId { get; set; }
    93107    public DateTime Begin { get; set; }
    94108    public DateTime End { get; set; }
     109
     110    public virtual UsageRecord UsageRecord { get; set; }
    95111  }
    96112}
Note: See TracChangeset for help on using the changeset viewer.