public ActionResult IndexAuthor(AuthBookPublish model) { if (ModelState.IsValid) { authors.AddAuthor(model.author); AllViewBag(); return(View("Index")); } else { AllViewBag(); return(View("Index")); } }
public ActionResult IndexPublisher(AuthBookPublish model) { if (ModelState.IsValid) { publisher.AddPublisher(model.publisher); AllViewBag(); return(View("Index")); } else { AllViewBag(); return(View("Index")); } }
public ActionResult IndexBook(AuthBookPublish model, FormCollection form) { if (ModelState.IsValid) { //string strDDL = form["NameAuthor"].ToString(); //string strDDLPublish = form["NamePublish"].ToString(); book.AddBook(model.book, authors, publisher); //book.AddBook(model.book, strDDL, strDDLPublish, authors, publisher); AllViewBag(); return(View("Index")); } else { AllViewBag(); return(View("Index")); } }