using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CY.IDAL.Inquiry;
using AbstractFactory;
using CY.Model;
using CY.Model.Inquiry;
namespace CY.BLL.Inquiry
{
///
/// LED价格业务逻辑
///
public class LEDCostBLL
{
ILEDCostDAL _iLEDCostDAL = null;
public LEDCostBLL()
{
_iLEDCostDAL = Factory.GetDALByInterfaceName(DALInterface.ILEDCostDAL) as ILEDCostDAL;
}
///
/// 获取LED费用列表
///
///
///
///
public IList GetModelList(Guid inquiryId)
{
return _iLEDCostDAL.GetModelList(inquiryId);
}
///
/// 保存LED费用列表
///
///
///
///
///
public bool SaveModelList(IList list, InquiryCondition inquiryCondition)
{
return _iLEDCostDAL.SaveModelList(list,inquiryCondition);
}
///
/// 根据materialId获取LED价格
///
///
///
///
public Inquiry_LEDCost GetModel(Guid inquiryId, int materialId)
{
Inquiry_LEDCost model = null;
IList list = GetModelList(inquiryId);
if (list != null && list.Count > 0)
{
try
{
model=list.SingleOrDefault(p=>p.MaterialId==materialId);
}
catch(Exception ex)
{
}
}
return model;
}
}
}