Exemplo n.º 1
0
        public ActionResult Modify(int ID)
        {
            var _users = new UserManage().FindList();
            List <SelectListItem> _userlistItems = new List <SelectListItem>(_users.Count());

            foreach (var _user in _users)
            {
                _userlistItems.Add(new SelectListItem()
                {
                    Text = _user.Username, Value = _user.ID.ToString()
                });
            }
            ViewBag.Users = _userlistItems;
            var _movies = new MovieManage().FindList();
            List <SelectListItem> _movielistItems = new List <SelectListItem>(_movies.Count());

            foreach (var _movie in _movies)
            {
                _movielistItems.Add(new SelectListItem()
                {
                    Text = _movie.MovieName, Value = _movie.ID.ToString()
                });
            }
            ViewBag.Movies = _movielistItems;
            var _Article = articleManage.Find(ID);

            return(View(_Article));
        }
Exemplo n.º 2
0
        public ActionResult ArticleDetail(int ID)
        {
            var _article = articleManage.Find(ID);

            return(View(_article));
        }