Exemplo n.º 1
0
        public ActionResult SearchUser(string userId)
        {
            GetRole();
            var libraryData          = repo.GetLibraryInfo(userId);
            List <BookManagement> bm = new List <BookManagement>();

            foreach (var item in libraryData)
            {
                bm.Add(new BookManagement()
                {
                    Id         = item.Id,
                    BookName   = item.BookName,
                    CopyId     = item.CopyId,
                    ExpireTime = item.ExpireTime,
                    Index      = item.Index,
                    ISBN       = item.ISBN,
                    LendTime   = item.LendTime,
                    ReturnTime = item.ReturnTime,
                    Status     = item.Status,
                    UserId     = item.UserId
                });
            }
            ViewBag.UserId = userId;
            return(PartialView("_searchUser", bm));
        }