コード例 #1
0
        public ActionResult UpdBook(GetAllBook_Result updBook, string submit)
        {
            if (submit == "SaveUpd" && action[0] == "UpdBk")
            {
                using (var ef = new LibraryEntities())
                {
                    ef.UpdBook(Convert.ToInt32(action[1]), updBook.name, updBook.authors, updBook.year, updBook.theme, updBook.idCategory);
                }
            }

            return(RedirectToAction("Books", "Book"));
        }