12345678910111213141516171819202122232425262728293031323334 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.TeachingMaterial;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.Common.TeachingMaterial
- {
- public class SupplierDiscountSetDAL
- {
- public SupplierDiscountSetRepository supplierDiscountSetRepository { get; set; }
- public PublishRepository publishRepository { get; set; }
- public IQueryable<SupplierDiscountSetView> GetSupplierDiscountSetGridView(Expression<Func<ET_SupplierDiscountSet, bool>> exp)
- {
- var query = from supset in supplierDiscountSetRepository.GetList(exp)
- join pub in publishRepository.Entities
- on supset.PublishID equals pub.PublishID
- select new SupplierDiscountSetView
- {
- SupplierDiscountSetID = supset.SupplierDiscountSetID,
- IsDefault = supset.IsDefault.Value,
- Discount = supset.Discount,
- PublishID = supset.PublishID,
- UnitCode = pub.UnitCode,
- UnitName = pub.UnitName,
- };
- return query;
- }
- }
- }
|