public List <ExchangeCenterConfig> GetExchangeCenterConfigList()
 {
     try
     {
         return(DALExchangeCenterConfig.GetExchangeCenterConfigList());
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new ExchangeCenterConfigException(1, "GetExchangeCenterConfigList", ex);
         Logger.Log(Level.Error, exception, "GetExchangeCenterConfigList");
         throw ex;
     }
 }
 public List <ExchangeCenterConfig> GetExchangeCenterConfigList(string sqlStr, int pageSize, int pageIndex, out int recordCount)
 {
     try
     {
         return(DALExchangeCenterConfig.GetExchangeCenterConfigList(sqlStr, pageSize, pageIndex, out recordCount));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new ExchangeCenterConfigException(1, "GetExchangeCenterConfigList", ex);
         Logger.Log(Level.Error, exception, "GetExchangeCenterConfigList");
         throw ex;
     }
 }
        /// <summary>
        /// 积分兑换配置详情页面展示数据列表
        /// </summary>
        /// <param name="SearchWord"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public ActionResult List(ExchangeCenterConfigRequest request)
        {
            int count       = 0;
            var searchModel = new ExchangeCenterConfig()
            {
                PostionCode  = request.PostionCode,
                UserRank     = request.UserRank,
                CouponName   = request.CouponName,
                SearchStatus = request.Status
            };
            var lists           = DALExchangeCenterConfig.GetExchangeCenterConfigList(searchModel, request.PageSize, request.PageIndex, out count);
            var memberBll       = new MemberService();
            var memberGradeList = memberBll.GetMembershipsGradeList();
            var positionList    = GetPostionData();

            foreach (var item in lists)
            {
                if (string.IsNullOrWhiteSpace(item.UserRank))
                {
                    continue;
                }
                foreach (var np in positionList)
                {
                    if (np.Key == item.PostionCode)
                    {
                        item.Postion = np.Value;
                        break;
                    }
                }
                item.GradeName = memberGradeList.Find(t => t.GradeCode.ToLower() == item.UserRank.ToLower())?.GradeName;
            }
            var list  = new OutData <List <ExchangeCenterConfig>, int>(lists, count);
            var pager = new PagerModel(request.PageIndex, request.PageSize)
            {
                TotalItem = count
            };



            return(View(new ListModel <ExchangeCenterConfig>(list.ReturnValue, pager)));
        }