Example #1
0
        /// <summary>
        /// 获取拜访任务列表
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="rowCount"></param>
        /// <returns></returns>
        public VisitingTaskViewEntity[] GetList(VisitingTaskViewEntity entity, int pageIndex, int pageSize, out int rowCount)
        {
            List <IWhereCondition> wheres = new List <IWhereCondition>();

            if (entity != null && entity.ClientPositionID != null && Convert.ToInt32(entity.ClientPositionID) > 0)
            {
                wheres.Add(new EqualsCondition()
                {
                    FieldName = "ClientPositionID", Value = entity.ClientPositionID
                });
            }

            List <OrderBy> orderbys = new List <OrderBy>();

            orderbys.Add(new OrderBy()
            {
                FieldName = "CreateTime", Direction = OrderByDirections.Desc
            });

            PagedQueryResult <VisitingTaskViewEntity> pEntity = new VisitingTaskDAO(this.CurrentUserInfo).GetList(wheres.ToArray(), orderbys.ToArray(), pageIndex, pageSize);

            rowCount = pEntity.RowCount;
            return(pEntity.Entities);
        }
Example #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public VisitingTaskBLL(LoggingSessionInfo pUserInfo)
 {
     this.CurrentUserInfo = pUserInfo;
     this._currentDAO     = new VisitingTaskDAO(pUserInfo);
 }