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

            Db           db           = new Db(DbServices.ConnectionString);
            GrantPayment grantPayment = GrantPaymentServices.Get(id.Value, db);

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

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GrantPayment grantPayment = GrantPaymentServices.Get(id.Value, db);

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

            ViewBag.GrantList             = new SelectList(GrantServices.List(db), "Product", "Name", grantPayment.Grant);
            ViewBag.GrantPaymentOrderList = new SelectList(GrantPaymentOrderServices.List(db), "Id", "Notes", grantPayment.GrantPaymentOrder);
            return(View(grantPayment));
        }