예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DebitoCA debitoCA = db.DebitoCA.Find(id);

            db.DebitoCA.Remove(debitoCA);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "numTrans,numCuenta,descripcion,fecha,monto")] DebitoCA debitoCA)
 {
     if (ModelState.IsValid)
     {
         db.Entry(debitoCA).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.numCuenta = new SelectList(db.CuentaA, "numCuenta", "numCuenta", debitoCA.numCuenta);
     return(View(debitoCA));
 }
예제 #3
0
        // GET: DebitoCA/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DebitoCA debitoCA = db.DebitoCA.Find(id);

            if (debitoCA == null)
            {
                return(HttpNotFound());
            }
            return(View(debitoCA));
        }
예제 #4
0
        // GET: DebitoCA/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DebitoCA debitoCA = db.DebitoCA.Find(id);

            if (debitoCA == null)
            {
                return(HttpNotFound());
            }
            ViewBag.numCuenta = new SelectList(db.CuentaA, "numCuenta", "numCuenta", debitoCA.numCuenta);
            return(View(debitoCA));
        }