Esempio n. 1
0
 public ActionResult Index()
 {
     FocusTopicModel t = new FocusTopicModel();
     t.myUser = db.Users.Find(getCookie("id"));
     t.focusTopic = new List<TQ>();
     List<FollowTopic> ft = new List<FollowTopic>();
     ft = db.FollowTopics.Where(a => a.FTUserID == t.myUser.UID).ToList();
     for (int i = 0; i < ft.Count(); i++)
     {
         TQ add = model.getTopThreeQuestionByTopicID(ft[i].FollowingTID);
         t.focusTopic.Add(add);
     }
     return View(t);
 }
Esempio n. 2
0
        public ActionResult Index()
        {
            FocusTopicModel t = new FocusTopicModel();

            t.myUser     = db.Users.Find(getCookie("id"));
            t.focusTopic = new List <TQ>();
            List <FollowTopic> ft = new List <FollowTopic>();

            ft = db.FollowTopics.Where(a => a.FTUserID == t.myUser.UID).ToList();
            for (int i = 0; i < ft.Count(); i++)
            {
                TQ add = model.getTopThreeQuestionByTopicID(ft[i].FollowingTID);
                t.focusTopic.Add(add);
            }
            return(View(t));
        }