Exemple #1
0
        /// <summary>
        /// 用户中心右边信息的分布试图
        /// </summary>
        /// <returns></returns>
        public PartialViewResult ProfileLeft(int?uid)
        {
            YSWL.MALL.BLL.SNS.UserShip            shipBll   = new YSWL.MALL.BLL.SNS.UserShip();
            YSWL.MALL.BLL.Members.UsersExp        userBll   = new BLL.Members.UsersExp();
            YSWL.MALL.Model.Members.UsersExpModel userModel = new Model.Members.UsersExpModel();
            YSWL.MALL.BLL.SNS.Groups groupBll = new YSWL.MALL.BLL.SNS.Groups();
            int UserId = uid.HasValue ? uid.Value : (currentUser != null ? currentUser.UserID : 0);
            List <YSWL.MALL.Model.SNS.UserShip> ListShip        = shipBll.GetToListByFansPage(UserId, "", 0, 9);
            List <YSWL.MALL.Model.SNS.Groups>   ListGroupJoin   = groupBll.GetUserJoinGroup(UserId, 9);
            List <YSWL.MALL.Model.SNS.Groups>   ListGroupCreate = groupBll.GetModelList("CreatedUserId=" + UserId + "");

            userModel             = userBll.GetUsersExpModel(UserId);
            ViewBag.FansCount     = userModel != null ? userModel.FansCount : 0;
            ViewBag.IsCurrentUser = uid.HasValue ? false : (currentUser != null ? true : false);
            ViewBag.UserId        = UserId;
            YSWL.MALL.ViewModel.SNS.ProfileLeft model = new MALL.ViewModel.SNS.ProfileLeft();
            model.joingroupList   = ListGroupJoin;
            model.shipList        = ListShip;
            model.creategroupList = ListGroupCreate;
            return(PartialView("_ProfileLeft", model));
        }
Exemple #2
0
        /// <summary>
        /// 个人中心右侧信息
        /// </summary>
        /// <returns></returns>
        public PartialViewResult SelfRight()
        {
            YSWL.MALL.BLL.Members.UsersExp        userBll   = new BLL.Members.UsersExp();
            YSWL.MALL.Model.Members.UsersExpModel userModel = new Model.Members.UsersExpModel();
            YSWL.MALL.BLL.SNS.Groups          groupBll      = new YSWL.MALL.BLL.SNS.Groups();
            YSWL.MALL.BLL.SNS.UserAlbums      bllAlbums     = new YSWL.MALL.BLL.SNS.UserAlbums();
            YSWL.MALL.ViewModel.SNS.SelfRight model         = new MALL.ViewModel.SNS.SelfRight();
            model.MyGroups = groupBll.GetUserJoinGroup(currentUser.UserID, 9);

            YSWL.MALL.BLL.Ms.Regions RegionBll  = new BLL.Ms.Regions();
            YSWL.MALL.BLL.SNS.Star   starManage = new YSWL.MALL.BLL.SNS.Star();


            model.UserInfo = GetUserModel(currentUser.UserID);
            string strAddress = RegionBll.GetRegionNameByRID(Common.Globals.SafeInt(model.UserInfo.Address, 0));

            if (strAddress.Contains("北京北京"))
            {
                strAddress = strAddress.Replace("北京北京", "北京");
            }
            else if (strAddress.Contains("上海上海"))
            {
                strAddress = strAddress.Replace("上海上海", "上海");
            }
            else if (strAddress.Contains("重庆重庆"))
            {
                strAddress = strAddress.Replace("重庆重庆", "重庆");
            }
            else if (strAddress.Contains("天津天津"))
            {
                strAddress = strAddress.Replace("天津天津", "天津");
            }
            model.UserInfo.Address = string.IsNullOrEmpty(model.UserInfo.Address) ? "暂未设置" : strAddress;
            YSWL.MALL.BLL.SNS.AlbumType AlbumTypeBLL = new YSWL.MALL.BLL.SNS.AlbumType();

            model.MyAlbum = bllAlbums.GetListByUserId(currentUser.UserID, UserAlbumDetailType);

            return(PartialView("_SelfRight", model));
        }