You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Chloe;
|
|
|
|
|
|
|
|
|
|
using DB.Entity;
|
|
|
|
|
|
|
|
|
|
namespace DB.Service
|
|
|
|
|
{
|
|
|
|
|
public class PointLogService
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public void Add(PointLog entityLog)
|
|
|
|
|
{
|
|
|
|
|
using (var dbContext = DbFactory.GetContext)
|
|
|
|
|
{
|
|
|
|
|
dbContext.Insert(entityLog);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PagingResult<PointLog> GetPagedList(int pageIndex, int pageSize, string key)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
using (var dbContext = DbFactory.GetContext)
|
|
|
|
|
{
|
|
|
|
|
var dao = dbContext.Query<PointLog>()
|
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(key),x=>x.PointName.Contains(key))
|
|
|
|
|
.OrderByDesc(x => x.ID)
|
|
|
|
|
.Paging(pageIndex, pageSize);
|
|
|
|
|
return dao;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|