Example #1
0
        public ActionResult UserAttention(int UID)
        {
            UserInfo user1     = db.UserInfo.Find(UID);
            var      attention = (from p in db.Attention select p).OrderBy(p => p.Att_Time).Where(p => p.ToUID == UID).ToList();
            var      index     = new SEEWeb.ViewModel.UserInfoViewModel
            {
                User1      = user1,
                Attention2 = attention,
            };

            return(View(index));
        }
Example #2
0
        public ActionResult UserIndex(int UID)
        {
            //int UID = Convert.ToInt32(Session["UID"].ToString());
            UserInfo user1       = db.UserInfo.Find(UID);
            var      picture1    = (from p in db.Picture select p).OrderByDescending(p => p.Pic_Time).Where(p => p.UID == UID).ToList().Take(10);
            var      album1      = (from p in db.Album select p).OrderByDescending(p => p.Alb_Time).Where(p => p.UID == UID).ToList().Take(8);
            var      album_save1 = (from p in db.Album_Save select p).OrderByDescending(p => p.AS_Time).Where(p => p.UID == UID).ToList().Take(8);
            //var attention1 = (from p in db.Attention select p).OrderBy(p => p.Att_Time).Where(p => p.UID == UID).ToList();

            var index = new SEEWeb.ViewModel.UserInfoViewModel
            {
                User1       = user1,
                Picture1    = picture1,
                Album1      = album1,
                Album_Save1 = album_save1,
                //Attention1 = attention1,
            };

            return(View(index));
        }