public ActionResult DeleteConfirmed(int id)
        {
            ClientPaymentMethod clientPaymentMethod = db.ClientPaymentMethods.Find(id);

            db.ClientPaymentMethods.Remove(clientPaymentMethod);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ClientPaymentMethodID,ClientID,PaymentMethodID,CardNumber,ExpirationDate,CvC")] ClientPaymentMethod clientPaymentMethod)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clientPaymentMethod).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ClientID        = new SelectList(db.Clients, "ClientID", "UserName", clientPaymentMethod.ClientID);
     ViewBag.PaymentMethodID = new SelectList(db.PaymentMethods, "PaymentMethodID", "PaymentMethod1", clientPaymentMethod.PaymentMethodID);
     return(View(clientPaymentMethod));
 }
        // GET: ClientPaymentMethods/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClientPaymentMethod clientPaymentMethod = db.ClientPaymentMethods.Find(id);

            if (clientPaymentMethod == null)
            {
                return(HttpNotFound());
            }
            return(View(clientPaymentMethod));
        }
        // GET: ClientPaymentMethods/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClientPaymentMethod clientPaymentMethod = db.ClientPaymentMethods.Find(id);

            if (clientPaymentMethod == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ClientID        = new SelectList(db.Clients, "ClientID", "UserName", clientPaymentMethod.ClientID);
            ViewBag.PaymentMethodID = new SelectList(db.PaymentMethods, "PaymentMethodID", "PaymentMethod1", clientPaymentMethod.PaymentMethodID);
            return(View(clientPaymentMethod));
        }