1234567891011121314151617181920212223242526 |
- using Cksoft.Data;
- using DllEapEntity;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace DllEapDal.OFILM
- {
- public class RecordDataHistoryDal
- {
- private IDatabase CurrDb;
- public RecordDataHistoryDal(IDatabase db)
- {
- CurrDb = db;
- }
- public IEnumerable<RecordDataHistory> Get(int start, int length, string order, string sort, string filter, string errorinfo, out int total)
- {
- var sql = $"select count(1) from RecordDataHistory a where 1=1 {filter}";
- total = Convert.ToInt32(CurrDb.FindList<string>(sql).FirstOrDefault() ?? "0");
- var pros = CurrDb.FindListForCondition<RecordDataHistory>($" {filter} order by {sort} {order} limit {start - 1},{length}", ref errorinfo);
- return pros;
- }
- }
- }
|