Example #1
0
 /// <summary>
 /// 获取兴趣加粉的页面模型
 /// </summary>
 /// <param name="userID">用户编号</param>
 /// <returns></returns>
 public Models.PageModels.Content.AddInterestFansModel getInterestModel(String userID)
 {
     IList<BiZ.InterestCenter.Interest> interestList = BiZ.InterestCenter.InterestFactory.GetMemberInterest(userID, 0, 0);
     //IList<IList<BiZ.InterestCenter.Interest>> interestLists = new List<IList<BiZ.InterestCenter.Interest>>();
     //foreach (BiZ.InterestCenter.Interest interest in interestList)
     //{
     //    interestLists.Add(BiZ.Recommendation.InterestRecommendation.GetElseInterestIDsMemberLikeWhereWhoLikeThis(interest.ID, 8));
     //}
     String[] iids = new String[interestList.Count];
     for (int i = 0; i < interestList.Count; i++)
     {
         var obj = interestList[i];
         if (obj != null) { iids[i] = obj.ID; }
     }
     IList<BiZ.InterestCenter.Interest> interestListTo = new List<BiZ.InterestCenter.Interest>();
     interestListTo = BiZ.Recommendation.InterestRecommendation.GetElseInterestIDsMemberLikeWhereWhoLikeThis(iids, 30);
     Models.PageModels.Content.AddInterestFansModel model = new Models.PageModels.Content.AddInterestFansModel();
     model.interestList = interestList;
     //model.interestLists = interestLists;
     model.interestListTo = interestListTo;
     return model;
 }
Example #2
0
        public ActionResult AddInterestFans()
        {
            SetMetasVersion();
            String userID = HttpContext.User.Identity.Name;
            if (userID == null || userID == "")
                return RedirectToAction("Error", "Error", new { errNo = "需要提供完整参数。" });
            Models.MemberFullDisplayObj memberDisplayObj = Models.DisplayObjProvider.getMemberFullDisplayObj(userID);

            Models.PageModels.Content.AddInterestFansModel model = new Models.PageModels.Content.AddInterestFansModel();
            model.UserID = userID;
            model.MemberID = userID;
            model.AlreadyLogon = userID != null && userID != "" ? true : false;
            model.Member = memberDisplayObj;
            ViewData["nowCreatedInterestToPoints"] = getCreatedInterestToPoints(userID);
            return View(model);
        }