예제 #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     IPaymentRepository repository = new EFPaymentRepository(User.Identity.Name);
     // Payment payment = db.Payments.Find(id);
     Payment payment = repository.Get(id);
     // db.Payments.Remove(payment);
     // db.SaveChanges();
     repository.Delete(payment);
     return RedirectToAction("Payments", "Asset", new { id = payment.AssetId });
 }
예제 #2
0
 //
 // GET: /Payment/Details/5
 public ActionResult Details(int id = 0)
 {
     IPaymentRepository repository = new EFPaymentRepository(User.Identity.Name);
     // Payment payment = db.Payments.Find(id);
     Payment payment = repository.Get(id);
     if (payment == null)
     {
         return HttpNotFound();
     }
     return View(payment);
 }