예제 #1
0
        public ActionResult Book(Books b)
        {
            int      i    = 0;
            BooksDAL bdal = new BooksDAL();

            bdal.SaveBooks(false, b);
            return(View(b));
        }
        public ActionResult Book(Books b)
        {
            int      i          = 0;
            BooksDAL bdal       = new BooksDAL();
            bool     isEditMode = bdal.GetBook().Where(bk => bk.Code == b.Code).Count() == 0 ?false : true;

            bdal.SaveBooks(isEditMode, b);
            return(RedirectToAction("Book", new { Code = b.Code }));
        }
예제 #3
0
        public void SaveBooks(bool isEditMode, Books book)
        {
            BooksDAL bdal = new BooksDAL();

            bdal.SaveBooks(isEditMode, book);
        }