// GET: CashPayment/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db          db          = new Db(DbServices.ConnectionString);
            CashPayment cashPayment = CashPaymentServices.Get(id.Value, db);

            if (cashPayment == null)
            {
                return(HttpNotFound());
            }
            return(View(cashPayment));
        }
        // GET: CashPayment/Edit/5
        public ActionResult Edit(Nullable <int> payment)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (payment == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CashPayment cashPayment = CashPaymentServices.Get(payment.Value, db);

            if (cashPayment == null)
            {
                return(HttpNotFound());
            }

            ViewBag.PaymentList = new SelectList(PaymentServices.List(db), "Id", "Notes", cashPayment.Payment);
            return(View(cashPayment));
        }