コード例 #1
0
        protected void InitData()
        {
            ActivityBLL activitybll = new ActivityBLL();

            if (WebUserAuth.IsAuthenticated)
            {
                this.UserId = WebUserAuth.UserId.Value;

                TuanDai.PortalSystem.BLL.UserBLL userbll = new TuanDai.PortalSystem.BLL.UserBLL();
                userModel = userbll.GetUserBasicInfoModelById(UserId);


                UserGrowthBLL userGrowthbll = new UserGrowthBLL();
                TuanDai.VipSystem.BLL.UserBLL vipuserbll = new TuanDai.VipSystem.BLL.UserBLL();
                //List<int> typeList = userGrowthbll.GetUserRecord(UserId);
                //UserValidInfo Validmodel = vipuserbll.GetUserValidInfo(UserId);

                this.model = vipuserbll.GetUserInfo(this.UserId);

                this.GetUserPrivileges(this.model.Level);

                this.list       = new UserPrivilegeBLL().GetUserPrivilegeInfo(this.UserId);
                this.recordList = activitybll.QueryActivityReceiveRecord(this.UserId);
                this.strAction  = this.GetAction();
                if (this.model != null)
                {
                    this.percent = this.model.Growth == 0 || this.model.CurLevelMaxGrowth == 0 ? "0" : (Convert.ToDecimal(this.model.Growth) / this.model.CurLevelMaxGrowth * 100).ToString("0.00");
                }
                if (list != null)
                {
                    this.count = list.Select(p => p.TypeId).Distinct().Count();
                }
                else
                {
                    this.count = 0;
                }
            }
            this.activityList = activitybll.GetActivityList();
            this.GetActivityInfo();
        }