public JsonResult Createdetials(Models.createbook insert) { int createdetials = new int(); Models.service create = new Models.service(); createdetials = create.Insertbook(insert); if (ModelState.IsValid) { Models.service insertsevice = new Models.service(); insertsevice.Insertbook(insert); } return(Json(createdetials)); }
public ActionResult Create(Models.createbook INSERT) { Models.createbook test = new Models.createbook(); ViewBag.BOOK_CLASS_NAME = this.codeservice.GetBOOK_CLASS_NAME(); if (ModelState.IsValid) { Models.service insertsevice = new Models.service(); if (INSERT.buydate != null) { INSERT.buydate = INSERT.buydate.Replace(",", ""); } insertsevice.Insertbook(INSERT); TempData["message"] = "存檔成功"; } return(View()); }