12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Cksoft.Data;
- using DllEapEntity;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace DllEapDal.OFILM.MES
- {
- public class OfAppletlogDal
- {
- private IDatabase CurrDb = null;
- public OfAppletlogDal(IDatabase db)
- {
- CurrDb = db;
- }
- public IEnumerable<OfAppletlog> Get(int start, int length, string order, string sort, string filter, string errorinfo)
- {
- try
- {
- var pros = CurrDb.FindListForCondition<OfAppletlog>($" {filter} order by {sort} {order} limit {start - 1},{length}", ref errorinfo);
- return pros;
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.ToString() + ex.StackTrace);
- return null;
- }
- }
- public int GetCount(string filter)
- {
- string errorinfo = string.Empty;
- var entities = CurrDb.FindListForCondition<OfAppletlog>(filter, ref errorinfo);
- if (entities != null)
- {
- return entities.Count();
- }
- return 0;
- }
- }
- }
|