public PartialViewResult SelfRight()
 {
     new UsersExp();
     new UsersExpModel();
     Maticsoft.BLL.SNS.Groups groups = new Maticsoft.BLL.SNS.Groups();
     Maticsoft.BLL.SNS.UserAlbums albums = new Maticsoft.BLL.SNS.UserAlbums();
     Maticsoft.ViewModel.SNS.SelfRight model = new Maticsoft.ViewModel.SNS.SelfRight {
         MyGroups = groups.GetUserJoinGroup(base.currentUser.UserID, 9)
     };
     Maticsoft.BLL.Ms.Regions regions = new Maticsoft.BLL.Ms.Regions();
     new Maticsoft.BLL.SNS.Star();
     model.UserInfo = this.GetUserModel(base.currentUser.UserID);
     string regionNameByRID = regions.GetRegionNameByRID(Globals.SafeInt(model.UserInfo.Address, 0));
     if (regionNameByRID.Contains("北京北京"))
     {
         regionNameByRID = regionNameByRID.Replace("北京北京", "北京");
     }
     else if (regionNameByRID.Contains("上海上海"))
     {
         regionNameByRID = regionNameByRID.Replace("上海上海", "上海");
     }
     else if (regionNameByRID.Contains("重庆重庆"))
     {
         regionNameByRID = regionNameByRID.Replace("重庆重庆", "重庆");
     }
     else if (regionNameByRID.Contains("天津天津"))
     {
         regionNameByRID = regionNameByRID.Replace("天津天津", "天津");
     }
     model.UserInfo.Address = string.IsNullOrEmpty(model.UserInfo.Address) ? "暂未设置" : regionNameByRID;
     new Maticsoft.BLL.SNS.AlbumType();
     model.MyAlbum = albums.GetListByUserId(base.currentUser.UserID, base.UserAlbumDetailType);
     return this.PartialView("_SelfRight", model);
 }
 public PartialViewResult UserInfo(int uid = -1, string nickname = "")
 {
     int num;
     Maticsoft.BLL.Members.Users users = new Maticsoft.BLL.Members.Users();
     UsersExpModel userModel = new UsersExpModel();
     Maticsoft.BLL.Ms.Regions regions = new Maticsoft.BLL.Ms.Regions();
     Maticsoft.BLL.SNS.Star star = new Maticsoft.BLL.SNS.Star();
     if (!string.IsNullOrEmpty(nickname) && ((num = users.GetUserIdByNickName(nickname)) > 0))
     {
         uid = num;
     }
     ((dynamic) base.ViewBag).IsPost = uid == -1;
     ((dynamic) base.ViewBag).IsCurrentUser = false;
     uid = (uid > -1) ? uid : base.currentUser.UserID;
     if ((base.currentUser != null) && (uid == base.currentUser.UserID))
     {
         ((dynamic) base.ViewBag).IsCurrentUser = true;
     }
     userModel = this.GetUserModel(uid);
     string regionNameByRID = regions.GetRegionNameByRID(Globals.SafeInt(userModel.Address, 0));
     if (regionNameByRID.Contains("北京北京"))
     {
         regionNameByRID = regionNameByRID.Replace("北京北京", "北京");
     }
     else if (regionNameByRID.Contains("上海上海"))
     {
         regionNameByRID = regionNameByRID.Replace("上海上海", "上海");
     }
     else if (regionNameByRID.Contains("重庆重庆"))
     {
         regionNameByRID = regionNameByRID.Replace("重庆重庆", "重庆");
     }
     else if (regionNameByRID.Contains("天津天津"))
     {
         regionNameByRID = regionNameByRID.Replace("天津天津", "天津");
     }
     userModel.Address = string.IsNullOrEmpty(userModel.Address) ? "暂未设置" : regionNameByRID;
     ((dynamic) base.ViewBag).IsStar = star.IsStar(uid);
     ((dynamic) base.ViewBag).Level = new Maticsoft.BLL.SNS.GradeConfig().GetUserLevel(userModel.Points);
     return this.PartialView("_UserInfo", userModel);
 }
Exemple #3
0
 public string GetRegionNameByRID(int RID)
 {
     Maticsoft.BLL.Ms.Regions regions = new Maticsoft.BLL.Ms.Regions();
     return regions.GetRegionNameByRID(RID);
 }