예제 #1
0
        protected override GetZMBACourseRD ProcessRequest(DTO.Base.APIRequest <EmptyRequestParameter> pRequest)
        {
            //基础数据初始化
            GetZMBACourseRD            ZMBACourseRD   = new GetZMBACourseRD();
            T_ZMBA_CourseBLL           bll            = new T_ZMBA_CourseBLL(this.CurrentUserInfo);
            List <T_ZMBA_CourseEntity> ZMBACourseList = new List <T_ZMBA_CourseEntity>();

            //查询条件初始化
            T_ZMBA_CourseEntity pT_ZMBA_CourseEntity = new T_ZMBA_CourseEntity();

            OrderBy[] pOrderBy = new OrderBy[1];
            pOrderBy[0] = new OrderBy()
            {
                FieldName = "DisplayIndex", Direction = OrderByDirections.Asc
            };

            var bllAPCommon = new APCommonBLL(CurrentUserInfo);
            var VersionId   = bllAPCommon.GetCustomerVersion(CurrentUserInfo.ClientID);

            if (VersionId == 3)
            {
                List <IWhereCondition> complexCondition = new List <IWhereCondition> {
                };
                complexCondition.Add(new DirectCondition(" CourseName in('新手开店','新干线讲师','员工管理','集客吸粉','在线客服','会员服务','经营数据','卡券核销')"));

                ZMBACourseList = bll.Query(complexCondition.ToArray(), pOrderBy).ToList();
            }
            else
            {
                //执行查询
                ZMBACourseList = bll.QueryByEntity(pT_ZMBA_CourseEntity, pOrderBy).ToList();
            }
            ZMBACourseRD.ZMBACourseList = ZMBACourseList;

            return(ZMBACourseRD);
        }
예제 #2
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param>
 public void Update(T_ZMBA_CourseEntity pEntity, IDbTransaction pTran)
 {
     _currentDAO.Update(pEntity, pTran);
 }
예제 #3
0
 /// <summary>
 /// 创建一个新实例
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Create(T_ZMBA_CourseEntity pEntity)
 {
     _currentDAO.Create(pEntity);
 }
예제 #4
0
 /// <summary>
 /// 分页根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public PagedQueryResult <T_ZMBA_CourseEntity> PagedQueryByEntity(T_ZMBA_CourseEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex)
 {
     return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex));
 }
예제 #5
0
 /// <summary>
 /// 根据实体条件查询实体
 /// </summary>
 /// <param name="pQueryEntity">以实体形式传入的参数</param>
 /// <param name="pOrderBys">排序组合</param>
 /// <returns>符合条件的实体集</returns>
 public T_ZMBA_CourseEntity[] QueryByEntity(T_ZMBA_CourseEntity pQueryEntity, OrderBy[] pOrderBys)
 {
     return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys));
 }
예제 #6
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="pEntity"></param>
 public void Delete(T_ZMBA_CourseEntity pEntity)
 {
     _currentDAO.Delete(pEntity);
 }
예제 #7
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="pEntity">实体实例</param>
 public void Update(T_ZMBA_CourseEntity pEntity)
 {
     _currentDAO.Update(pEntity);
 }