public ActionResult DeleteConfirmed(int id) { TipoDaConta tipoDaConta = db.TipodaContas.Find(id); db.TipodaContas.Remove(tipoDaConta); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TipoDaContaId,Tipo,Observacao")] TipoDaConta tipoDaConta) { if (ModelState.IsValid) { db.Entry(tipoDaConta).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipoDaConta)); }
public ActionResult Create([Bind(Include = "TipoDaContaId,Tipo,Observacao")] TipoDaConta tipoDaConta) { if (ModelState.IsValid) { db.TipodaContas.Add(tipoDaConta); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tipoDaConta)); }
// GET: TipoDaContas/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TipoDaConta tipoDaConta = db.TipodaContas.Find(id); if (tipoDaConta == null) { return(HttpNotFound()); } return(View(tipoDaConta)); }