/// <summary> /// 获取optionnamelist /// </summary> /// <param name="entity">clientID 必传,optionName非必传</param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="rowCount"></param> /// <returns></returns> public OptionsViewEntity[] GetOptionNameList(OptionsEntity entity, string ClientID, string ClientDistributorID, int pageIndex, int pageSize, out int rowCount) { List <IWhereCondition> wheres = new List <IWhereCondition>(); if (entity != null && !string.IsNullOrEmpty(entity.OptionName)) { wheres.Add(new LikeCondition() { FieldName = "OptionName", HasLeftFuzzMatching = true, HasRightFuzzMathing = true, Value = entity.OptionName }); } wheres.Add(new EqualsCondition() { FieldName = "ClientID", Value = entity.ClientID }); List <OrderBy> orderbys = new List <OrderBy>(); orderbys.Add(new OrderBy() { FieldName = "ClientID", Direction = OrderByDirections.Desc }); orderbys.Add(new OrderBy() { FieldName = "CreateTime", Direction = OrderByDirections.Desc }); PagedQueryResult <OptionsViewEntity> pEntity = new OptionsDAO(this.CurrentUserInfo).GetOptionNameList(wheres.ToArray(), ClientID, ClientDistributorID, orderbys.ToArray(), pageIndex, pageSize); rowCount = pEntity.RowCount; return(pEntity.Entities); }
/// <summary> /// 构造函数 /// </summary> public OptionsBLL(LoggingSessionInfo pUserInfo) { this.CurrentUserInfo = pUserInfo; this._currentDAO = new OptionsDAO(pUserInfo); }