Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1888_OaaS/HeuristicLab.Services.Optimization.Web/Controllers/UsageController.cs @ 16189

Last change on this file since 16189 was 9586, checked in by fschoepp, 12 years ago

#1888:

  • Billing Component may now be deactivated by setting the BillingEnabled flag within the OaaS service configuration.
  • Added views for invoices and usage data.
  • Changed appearance of the SaveOrder view.
File size: 967 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Web;
5using System.Web.Mvc;
6using HeuristicLab.Services.Optimization.Billing.Interfaces;
7using HeuristicLab.Services.Optimization.Billing.Business;
8using HeuristicLab.Services.Optimization.Web.Models;
9using HeuristicLab.Services.Optimization.Billing.Model;
10using HeuristicLab.Services.Optimization.Web.Helpers;
11
12namespace HeuristicLab.Services.Optimization.Web.Controllers {
13  [BillingFilterActionAttribute]
14  public class UsageController : BaseController {
15    private IOptimizationBilling billing = BillingServiceProvider.Instance;
16    //
17    // GET: /Usage/
18
19    public ActionResult Index() {
20      if (RedirectToLoginIfNecessary("%2fUsage", false)) {
21        return View();
22      }
23      var records = billing.GetUsageRecords(UserName);
24      return View(new UsageModel() { Records = records != null ? records : new List<UsageRecord>() });
25    }
26
27  }
28}
Note: See TracBrowser for help on using the repository browser.