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