public ActionResult Edit([Bind(Include = "Customer_Payment_ID,Card_Type,Card_Num,Card_Expiration,Card_CVV")] Customer_Payment customer_Payment) { if (ModelState.IsValid) { db.Entry(customer_Payment).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", new { id = customer_Payment.Customer_Payment_ID })); } return(View(customer_Payment)); }
public ActionResult Create([Bind(Include = "Customer_Payment_ID,Card_Type,Card_Num,Card_Expiration,Card_CVV")] Customer_Payment customer_Payment) { if (ModelState.IsValid) { db.Customer_Payments.Add(customer_Payment); db.SaveChanges(); return(RedirectToAction("Home", "Customers", new { area = "" })); } return(View(customer_Payment)); }
// GET: Customer_Payment/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customer_Payment customer_Payment = db.Customer_Payments.Find(id); if (customer_Payment == null) { return(HttpNotFound()); } return(View(customer_Payment)); }
// GET: Customer_Payment/Edit/5 public ActionResult Edit(int?id) { ViewBag.CardType = lstCardTypes; if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customer_Payment customer_Payment = db.Customer_Payments.Find(id); if (customer_Payment == null) { return(HttpNotFound()); } return(View(customer_Payment)); }