using System.Collections.Generic; using System.Linq; using System.ServiceModel; using HeuristicLab.Services.Optimization.Billing.DataAccess; using HeuristicLab.Services.Optimization.Billing.Interfaces; using HeuristicLab.Services.Optimization.Billing.Model; namespace HeuristicLab.Services.Optimization.Billing.Business { [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class BillingService : IOptimizationBilling { #region Properties private BillingDao billingDao; private BillingDao BillingDao { get { if (billingDao == null) billingDao = new BillingDao(); return billingDao; } } #endregion #region Product Methods public IList GetProducts() { //TODO: Authentication //TODO: Enable Transaction return BillingDao.FindAllProducts().ToList(); } #endregion #region Order Methods public void SaveOrder(Order order) { //TODO: Authentication //TODO: Enable Transaction BillingDao.AddOrder(order); } public IList GetOrdersByState(OrderState state) { //TODO: Authentication //TODO: Enable Transaction return BillingDao.FindOrderBy(order => order.State == state).ToList(); } #endregion public IList GetOrders(string userName) { throw new System.NotImplementedException(); } public User GetUser(string userName) { throw new System.NotImplementedException(); } public void SaveUser(User user) { throw new System.NotImplementedException(); } public IList GetUsageRecords(string userName) { throw new System.NotImplementedException(); } public IList GetInvoices(string userName) { throw new System.NotImplementedException(); } } }