Last change
on this file since 14821 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
|
Rev | Line | |
---|
[9586] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Web;
|
---|
| 5 | using System.Web.Mvc;
|
---|
| 6 | using HeuristicLab.Services.Optimization.Billing.Interfaces;
|
---|
| 7 | using HeuristicLab.Services.Optimization.Billing.Business;
|
---|
| 8 | using HeuristicLab.Services.Optimization.Web.Models;
|
---|
| 9 | using HeuristicLab.Services.Optimization.Billing.Model;
|
---|
| 10 | using HeuristicLab.Services.Optimization.Web.Helpers;
|
---|
| 11 |
|
---|
| 12 | namespace 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.