Last change
on this file since 17578 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:
1.2 KB
|
Line | |
---|
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.Billing;
|
---|
9 | using HeuristicLab.Services.Optimization.Billing.Model;
|
---|
10 | using HeuristicLab.Services.Optimization.Web.Models;
|
---|
11 | using HeuristicLab.Services.Optimization.Web.Helpers;
|
---|
12 |
|
---|
13 | namespace HeuristicLab.Services.Optimization.Web.Controllers {
|
---|
14 | [BillingFilterActionAttribute]
|
---|
15 | public class InvoiceController : BaseController {
|
---|
16 | private IOptimizationBilling billing = BillingServiceProvider.Instance;
|
---|
17 |
|
---|
18 | //
|
---|
19 | // GET: /Invoice/
|
---|
20 |
|
---|
21 | public ActionResult Index() {
|
---|
22 | if (RedirectToLoginIfNecessary("%2fInvoice", false)) {
|
---|
23 | return View();
|
---|
24 | }
|
---|
25 | var invoice = billing.GetInvoices(UserName);
|
---|
26 | return View(new InvoiceModel() {
|
---|
27 | PaidInvoices = (from i in invoice where i.Status == InvoiceStatus.Paid select i).ToList(),
|
---|
28 | OpenInvoices = (from i in invoice where i.Status == InvoiceStatus.Open select i).ToList(),
|
---|
29 | OverdueInvoices = (from i in invoice where i.Status == InvoiceStatus.Overdue select i).ToList()
|
---|
30 | });
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.