Exemplo n.º 1
0
 public ActionResult Edit(ModelAuthor model, int id)
 {
     if (ModelState.IsValid)
     {
         Author FindAuthor = singleton.GetAuthors.BackAuthor(id);;
         FindAuthor.AuthorEdit(model.Name, model.DateOfBirth, model.DateOfDeath);
         ViewBag.Author = singleton.GetAuthors;
         Checking_Author();
         return(RedirectToAction("Show_Table"));
     }
     else
     {
         Author FindAuthor = singleton.GetAuthors.BackAuthor(id);
         ViewBag.Author = FindAuthor;
         return(View());
     }
 }