/// <summary> /// 获取采集参数列表 /// </summary> /// <param name="entity"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="rowCount"></param> /// <returns></returns> public VisitingParameterViewEntity[] GetList(VisitingParameterViewEntity entity, int pageIndex, int pageSize, out int rowCount) { List <IWhereCondition> wheres = new List <IWhereCondition>(); if (entity != null && entity.ParameterType != null && Convert.ToInt32(entity.ParameterType) > 0) { wheres.Add(new EqualsCondition() { FieldName = "ParameterType", Value = entity.ParameterType }); } if (entity != null && !string.IsNullOrEmpty(entity.ParameterName)) { wheres.Add(new LikeCondition() { FieldName = "ParameterName", HasLeftFuzzMatching = true, HasRightFuzzMathing = true, Value = entity.ParameterName }); } List <OrderBy> orderbys = new List <OrderBy>(); orderbys.Add(new OrderBy() { FieldName = "CreateTime", Direction = OrderByDirections.Desc }); PagedQueryResult <VisitingParameterViewEntity> pEntity = new VisitingParameterDAO(this.CurrentUserInfo).GetList(wheres.ToArray(), orderbys.ToArray(), pageIndex, pageSize); rowCount = pEntity.RowCount; return(pEntity.Entities); }
/// <summary> /// 构造函数 /// </summary> public VisitingParameterBLL(LoggingSessionInfo pUserInfo) { this.CurrentUserInfo = pUserInfo; this._currentDAO = new VisitingParameterDAO(pUserInfo); }