- Timestamp:
- 06/10/13 16:32:19 (11 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Billing/Business
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Billing/Business/BillingService.cs
r9586 r9602 45 45 } 46 46 47 public IList<Order> GetOrders(string userName) { 48 //TODO: Authentication 49 //TODO: Enable Transaction 50 User user = GetUser(userName); 51 return BillingDao.FindOrderBy(order => order.User == user).ToList(); 52 } 53 47 54 #endregion 48 55 49 50 public IList<Order> GetOrders(string userName) { 51 throw new System.NotImplementedException(); 52 } 53 56 #region User Methods 54 57 55 58 public User GetUser(string userName) { 56 throw new System.NotImplementedException(); 59 //TODO: Authentication 60 //TODO: Enable Transaction 61 return BillingDao.FindUserBy(u => u.Name == userName).First(); 57 62 } 58 63 59 64 public void SaveUser(User user) { 60 throw new System.NotImplementedException(); 65 //TODO: Authentication 66 //TODO: Enable Transaction 67 BillingDao.AddUser(user); 61 68 } 62 69 70 #endregion 71 72 #region UsageRecords Methods 63 73 64 74 public IList<UsageRecord> GetUsageRecords(string userName) { 65 throw new System.NotImplementedException(); 75 //TODO: Authentication 76 //TODO: Enable Transaction 77 User user = GetUser(userName); 78 return BillingDao.FindUsageRecordsBy(ur => ur.User == user).ToList(); 66 79 } 67 80 81 #endregion 82 83 #region Invoice Methods 68 84 69 85 public IList<Invoice> GetInvoices(string userName) { 70 throw new System.NotImplementedException(); 86 //TODO: Authentication 87 //TODO: Enable Transaction 88 User user = GetUser(userName); 89 return BillingDao.FindInvoiceBy(inv => inv.User == user).ToList(); 71 90 } 91 92 #endregion 72 93 } 73 94 } -
branches/OaaS/HeuristicLab.Services.Optimization.Billing/Business/MockupBillingService.cs
r9586 r9602 1 using System.Collections.Generic; 1 using System; 2 using System.Collections.Generic; 2 3 using System.Linq; 3 4 using HeuristicLab.Services.Optimization.Billing.Interfaces; 4 using System;5 5 6 6 namespace HeuristicLab.Services.Optimization.Billing.Business { … … 69 69 orders.Add(order); 70 70 allOrders.Add(order); 71 } 72 else { 71 } else { 73 72 oldOrder.Invoices = order.Invoices; 74 73 oldOrder.OrderLines = order.OrderLines; 75 oldOrder.OrderStateId = order.OrderStateId;76 74 oldOrder.State = order.State; 77 75 oldOrder.ActiveSince = order.ActiveSince;
Note: See TracChangeset
for help on using the changeset viewer.