Ejemplo n.º 1
0
        // GET: Settlement/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db         db         = new Db(DbServices.ConnectionString);
            Settlement settlement = SettlementServices.Get(id.Value, db);

            if (settlement == null)
            {
                return(HttpNotFound());
            }
            return(View(settlement));
        }
Ejemplo n.º 2
0
        // GET: Settlement/Edit/5
        public ActionResult Edit(Nullable <int> id)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Settlement settlement = SettlementServices.Get(id.Value, db);

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

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