コード例 #1
0
        public ActionResult Edit(int id)
        {
            book = bookBL.GetBook(id);
            var Categorys = bookBL.BindCategory();

            ViewBag.Mycategory = new SelectList(Categorys, "CategoryId", "CategoryName");
            return(View(book));
        }
コード例 #2
0
        public ActionResult <ViewArrayBookResponse> ViewBooked([FromBody] ViewBookInputModel data)
        {
            ViewArrayBookResponse res = new ViewArrayBookResponse();

            try
            {
                BookBL bl = new BookBL(DbContext);
                res = bl.GetBook(data);

                res.Message  = "Success";
                res.Response = true;

                return(Ok(res));
            }
            catch (Exception ex)
            {
                res.Message  = ex.Message;
                res.Response = false;

                return(BadRequest(res));
            }
        }
コード例 #3
0
        public string GetBookList()
        {
            Function fun = new Function();

            return(fun.DataTableToJSONWithJSONNet(bbl.GetBook()));
        }