public ActionResult DeleteConfirmed(int id) { PagamentoCartaoDebito pagamentoCartaoDebito = db.PagamentoCartaoDebitoes.Find(id); db.PagamentoCartaoDebitoes.Remove(pagamentoCartaoDebito); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PagamentoCartaoDebitoId,Valor")] PagamentoCartaoDebito pagamentoCartaoDebito) { if (ModelState.IsValid) { db.Entry(pagamentoCartaoDebito).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pagamentoCartaoDebito)); }
public ActionResult Create([Bind(Include = "PagamentoCartaoDebitoId,Valor")] PagamentoCartaoDebito pagamentoCartaoDebito) { if (ModelState.IsValid) { db.PagamentoCartaoDebitoes.Add(pagamentoCartaoDebito); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pagamentoCartaoDebito)); }
// GET: PagamentoCartaoDebitos/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PagamentoCartaoDebito pagamentoCartaoDebito = db.PagamentoCartaoDebitoes.Find(id); if (pagamentoCartaoDebito == null) { return(HttpNotFound()); } return(View(pagamentoCartaoDebito)); }