public TargetDetail GetPhotoAssistionInfo(int pid, int type = -1) { TargetDetail detail = new TargetDetail(); UsersExp exp = new UsersExp(); Maticsoft.BLL.SNS.UserAlbums albums = new Maticsoft.BLL.SNS.UserAlbums(); Maticsoft.BLL.SNS.UserAlbumDetail detail2 = new Maticsoft.BLL.SNS.UserAlbumDetail(); detail.Photo = this.GetModel(pid); detail.UserModel = exp.GetUsersExpModel(detail.Userid); detail.UserAlums = albums.GetUserAlbum(0, detail.TargetId, detail.Userid); if (detail.UserAlums != null) { detail.CovorImageList = detail2.GetThumbImageByAlbum(detail.UserAlums.AlbumID, type); } return detail; }
public List<Maticsoft.ViewModel.SNS.StarRank> HotStarList(int top = 4) { List<Maticsoft.ViewModel.SNS.StarRank> list = new List<Maticsoft.ViewModel.SNS.StarRank>(); DataSet set = this.dal.GetList(top, " IsRecommend='true'", " Sequence"); List<Maticsoft.Model.SNS.StarRank> list2 = this.DataTableToList(set.Tables[0]); UsersExp exp = new UsersExp(); foreach (Maticsoft.Model.SNS.StarRank rank2 in list2) { Maticsoft.ViewModel.SNS.StarRank item = new Maticsoft.ViewModel.SNS.StarRank(rank2); UsersExpModel usersExpModel = exp.GetUsersExpModel(rank2.UserId); if (usersExpModel != null) { item.FansCount = usersExpModel.FansCount.Value; item.FavouritesCount = usersExpModel.FavoritedCount.Value; item.ProductsCount = usersExpModel.ProductsCount.Value; item.Singature = usersExpModel.Singature; item.IsFellow = usersExpModel.IsFellow; } list.Add(item); } return list; }
public PartialViewResult ProfileLeft(int? uid) { Maticsoft.BLL.SNS.UserShip ship = new Maticsoft.BLL.SNS.UserShip(); UsersExp exp = new UsersExp(); UsersExpModel usersExpModel = new UsersExpModel(); Maticsoft.BLL.SNS.Groups groups = new Maticsoft.BLL.SNS.Groups(); int userid = uid.HasValue ? uid.Value : ((base.currentUser != null) ? base.currentUser.UserID : 0); List<Maticsoft.Model.SNS.UserShip> list = ship.GetToListByFansPage(userid, "", 0, 9); List<Maticsoft.Model.SNS.Groups> userJoinGroup = groups.GetUserJoinGroup(userid, 9); List<Maticsoft.Model.SNS.Groups> modelList = groups.GetModelList("CreatedUserId=" + userid); usersExpModel = exp.GetUsersExpModel(userid); ((dynamic) base.ViewBag).FansCount = (usersExpModel != null) ? usersExpModel.FansCount : 0; ((dynamic) base.ViewBag).IsCurrentUser = !uid.HasValue && (base.currentUser != null); ((dynamic) base.ViewBag).UserId = userid; Maticsoft.ViewModel.SNS.ProfileLeft model = new Maticsoft.ViewModel.SNS.ProfileLeft { joingroupList = userJoinGroup, shipList = list, creategroupList = modelList }; return this.PartialView("_ProfileLeft", model); }
public List<Maticsoft.ViewModel.SNS.StarRank> GetStarRankList(int StarType, int top = 10) { List<Maticsoft.ViewModel.SNS.StarRank> list = new List<Maticsoft.ViewModel.SNS.StarRank>(); DataSet set = new DataSet(); if (StarType == 0) { set = this.dal.GetList(top, " RankType=0 and Status=1", " Sequence"); } else { set = this.dal.GetList(top, " RankType=0 and Status=1 and TypeID=" + StarType, " Sequence"); } List<Maticsoft.Model.SNS.StarRank> list2 = this.DataTableToList(set.Tables[0]); UsersExp exp = new UsersExp(); foreach (Maticsoft.Model.SNS.StarRank rank2 in list2) { Maticsoft.ViewModel.SNS.StarRank item = new Maticsoft.ViewModel.SNS.StarRank(rank2); UsersExpModel usersExpModel = exp.GetUsersExpModel(rank2.UserId); if (usersExpModel != null) { item.FansCount = usersExpModel.FansCount.Value; item.FavouritesCount = usersExpModel.FavoritedCount.Value; item.ProductsCount = usersExpModel.ProductsCount.Value; item.Singature = usersExpModel.Singature; item.IsFellow = usersExpModel.IsFellow; } list.Add(item); } return list; }