Exemplo n.º 1
0
 public ActionResult DonationDetails(int id)
 {
     try
     {
         Tbl_Donation donation = db.Tbl_Donation.Find(id);
         return View(donation);
     }
     catch(Exception e)
     {
         return View(e.Message);
     }
     
 }
Exemplo n.º 2
0
 public ActionResult Donation1(Tbl_Donation donation)
 {
     if (ModelState.IsValid)
     {
         try
         {
             db.Tbl_Donation.Add(donation);
             db.SaveChanges();
             TempData["DonationMessage"] = "Thank you for your Donation";
         }
         catch (Exception e)
         {
             Response.Write(e.Message);
         }
         return(View("GLOBAL"));
     }
     else
     {
         return(View());
     }
 }