예제 #1
0
 public ActionResult Delete(int id, bookApp book)
 {
     try
     {
         bookObj.commitDelete(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
예제 #2
0
 public ActionResult Update(int id, bookApp bookUpd)
 {
     if (ModelState.IsValid)
     {
         try
         {
             bookObj.commitUpdate(id, bookUpd.name, bookUpd.phone, bookUpd.email, bookUpd.doa, bookUpd.purpose);
             return(RedirectToAction("Details/" + id));
         }
         catch
         {
             return(View());
         }
     }
     return(View());
 }
예제 #3
0
 public ActionResult Insert(bookApp book)
 {
     if (ModelState.IsValid)
     {
         try
         {
             bookObj.commitInsert(book);
             return(RedirectToAction("Index"));
         }
         catch
         {
             return(View());
         }
     }
     else
     {
         return(View());
     }
 }