demo20230512/WCFService/WCFParameterService.svc.cs

86 lines
2.7 KiB
C#
Raw Permalink Normal View History

2023-05-12 10:20:28 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Web.Mvc;
using Weee.Models;
using Weee.Models.Paramemter;
using Weee.Service;
namespace Weee.WCFService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "WCFParameterService" in code, svc and config file together.
// NOTE: In order to launch WCF Test Client for testing this service, please select WCFParameterService.svc or WCFParameterService.svc.cs at the Solution Explorer and start debugging.
public class WCFParameterService : IWCFParameterService
{
private readonly WeeeParameterDataService service;
public WCFParameterService()
{
service = DependencyResolver.Current.GetService<WeeeParameterDataService>();
service.DisableProxyAndLazyLoad();
}
public NonYearlyParameter GetNonYearlyParameter(int nonYearlyParameterId)
{
return service.GetNonYearlyParameter(nonYearlyParameterId);
}
public Dictionary<int, string> GetNonYearlyParameterOptions(Categories categories)
{
return service.GetNonYearlyParameterOptions(categories);
}
public Dictionary<int, decimal> GetParameterValues(IEnumerable<int> ids)
{
return service.GetParameterValues(ids);
}
public IEnumerable<PCR> GetPublicPCRs()
{
return service.GetPublicPCRs();
}
public Dictionary<int, string> GetSimaproCategories()
{
return service.GetSimaproCategories();
}
public Dictionary<int, string> GetSimaproEncodingsAndValues(List<int> ids)
{
return service.GetSimaproEncodingsAndValues(ids);
}
public SimaproParameter GetSimaproParameter(int simaproParameterId)
{
return service.GetSimaproParameter(simaproParameterId);
}
public Dictionary<int, string> GetSimaproTypeNames(List<int> ids)
{
return service.GetSimaproTypeNames(ids);
}
public IEnumerable<SimaproParameterType> GetSimaproTypeParameter(int categoryId)
{
return service.GetSimaproTypeParameter(categoryId);
}
public List<string> GetSimaproUnits()
{
return service.GetSimaproUnits();
}
public IEnumerable<SimaproVersion> GetSimaproVersionCategory()
{
return service.GetSimaproVersionCategory();
}
public Dictionary<int, string> GetYearlyParameterOptions(Categories categories)
{
return service.GetYearlyParameterOptions(categories);
}
}
}