Пример #1
0
        // GET: Installment/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db          db          = new Db(DbServices.ConnectionString);
            Installment installment = InstallmentServices.Get(id.Value, db);

            if (installment == null)
            {
                return(HttpNotFound());
            }
            return(View(installment));
        }
Пример #2
0
        // GET: Installment/Edit/5
        public ActionResult Edit(Nullable <int> id)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Installment installment = InstallmentServices.Get(id.Value, db);

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

            ViewBag.RefundableProductList = new SelectList(RefundableProductServices.List(db), "Product", "Name", installment.RefundableProduct);
            return(View(installment));
        }