46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using WX.CRM.BLL.Util;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Wx;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.BLL.Wx
|
|
{
|
|
public class WX_SZZYPREPAYMENT_BL : DbContextRepository<WX_SZZYPREPAYMENT>, IWX_SZZYPREPAYMENT
|
|
{
|
|
public List<WX_SZZYPREPAYMENT> GetList(ref Pager pager, string prepaymentId, string resId, string realName, decimal? szzyOrderId)
|
|
{
|
|
using (var db = new crmContext())
|
|
{
|
|
var query = db.WX_SZZYPREPAYMENT.AsQueryable();
|
|
if (!string.IsNullOrEmpty(prepaymentId))
|
|
{
|
|
query = query.Where(m => m.PREPAYMENTID == prepaymentId);
|
|
}
|
|
if (!string.IsNullOrEmpty(resId))
|
|
{
|
|
query = query.Where(m => m.RESID == resId);
|
|
}
|
|
if (!string.IsNullOrEmpty(realName))
|
|
{
|
|
query = query.Where(m => m.REALNAME == realName);
|
|
}
|
|
if (szzyOrderId.HasValue)
|
|
{
|
|
query = query.Where(m => m.SZZYORDERID == szzyOrderId);
|
|
}
|
|
query = query.OrderByDescending(m => m.REMITTIME);
|
|
PagerUtil.SetPager<WX_SZZYPREPAYMENT>(ref query, ref pager);
|
|
var list = query.ToList();
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
} |