public Page<MemberBaseInfo> GetMemberList(MemberSeachCondition searchCondition)
 {
     Session["MemberSerachCondition"] = searchCondition;
     MemberManageBLL memberBLL = new MemberManageBLL();
     Page<MemberBaseInfo> memberPageInfo=new Page<MemberBaseInfo> ();
     memberPageInfo = memberBLL.GetMemberInfoList(searchCondition);
     return memberPageInfo;
 }
 public Page<MemberFeeManage> GetMemberFeeList(MemberSeachCondition searchCondition)
 {
     Session["MemberFeeSearch"] = searchCondition;
     MemberFeeBLL memberFeeBLL = new MemberFeeBLL();
     Page<MemberFeeManage> memberPageInfo = new Page<MemberFeeManage>();
     memberPageInfo = memberFeeBLL.GetMemberFeeList(searchCondition,false);
     return memberPageInfo;
 }
Esempio n. 3
0
 // Methods
 public Page<MemberFeeManage> GetMemberFeeList(MemberSeachCondition searchCondition, bool isPrint)
 {
     ICriteria criteria = this.IMemberFeeManage.NativeHibernateSession.CreateCriteria(typeof(MemberFeeManage));
     Page<MemberFeeManage> memberPageInfo = new Page<MemberFeeManage>
     {
         CurrentPageIndex = searchCondition.PageNum
     };
     try
     {
         criteria = this.IMemberFeeManage.GetICriteriaByLgCondition<DateTime, DateTime>("FeeDate", criteria, searchCondition.FeeBeginDate, searchCondition.FeeEndDate).AddOrder(Order.Desc("LastUpdateDate")).AddOrder(Order.Desc("FeeStatus")).CreateCriteria("MemberInfo");
         if (searchCondition.MemberTypeId > 0)
         {
             criteria.CreateCriteria("MemberTypeInfo").Add(Restrictions.Eq("MemberTypeId", searchCondition.MemberTypeId));
         }
         if (searchCondition.FeeRegionId > 0)
         {
             criteria.CreateCriteria("RegionInfo").Add(Restrictions.Eq("RegionId", searchCondition.FeeRegionId));
         }
         if (searchCondition.ManageRegionId > 0)
         {
             criteria.CreateCriteria("ManageRegionInfo").Add(Restrictions.Eq("RegionId", searchCondition.ManageRegionId));
         }
         Dictionary<string, string> condtionLikeDic = new Dictionary<string, string>();
         if (searchCondition.MemberName != "")
         {
             condtionLikeDic.Add("MemberName", searchCondition.MemberName);
         }
         if (searchCondition.MemberNameEng != "")
         {
             condtionLikeDic.Add("MemberNameEng", searchCondition.MemberNameEng);
         }
         criteria = this.IMemberFeeManage.GetICriteriaByLikeCondition(condtionLikeDic, criteria);
         criteria = this.IMemberFeeManage.GetICriteriaByLgCondition<string, string>("MemberCode", criteria, searchCondition.MemberCodeMin, searchCondition.MemberCodeMax);
         memberPageInfo.TotalCount = criteria.SetResultTransformer(CriteriaUtil.DistinctRootEntity).List<MemberFeeManage>().Count;
         if (isPrint)
         {
             memberPageInfo.Data = criteria.SetResultTransformer(CriteriaUtil.DistinctRootEntity).List<MemberFeeManage>();
             return memberPageInfo;
         }
         memberPageInfo.Data = criteria.SetResultTransformer(CriteriaUtil.DistinctRootEntity).SetFirstResult((memberPageInfo.CurrentPageIndex - 1) * memberPageInfo.PageSize).SetMaxResults(memberPageInfo.PageSize).List<MemberFeeManage>();
     }
     catch (Exception)
     {
         memberPageInfo = null;
     }
     return memberPageInfo;
 }