34 lines
930 B
C#
34 lines
930 B
C#
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using WX.CRM.BLL.Util;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Sms;
|
|
using WX.CRM.Model.Entity;
|
|
|
|
namespace WX.CRM.BLL.Sms
|
|
{
|
|
public class SMS_RESCODE_BL : ISMS_RESCODE
|
|
{
|
|
public List<SMS_RESCODE> List(ref Pager page, decimal? type, decimal? status)
|
|
{
|
|
using (var db = new crmContext())
|
|
{
|
|
var query = db.SMS_RESCODE.AsQueryable();
|
|
if (type.HasValue)
|
|
{
|
|
query = query.Where(m => m.TYPE == type);
|
|
}
|
|
if (status.HasValue)
|
|
{
|
|
query = query.Where(m => m.STATUS == status);
|
|
}
|
|
query = query.OrderBy(m => m.CODE);
|
|
PagerUtil.SetPager<SMS_RESCODE>(ref query, ref page);
|
|
return query.ToList();
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|