public ActionResult DeleteConfirmed(int id) { Table_Leilao table_Leilao = db.Table_Leilao.Find(id); db.Table_Leilao.Remove(table_Leilao); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdLeilao,DataComeco,DataTermino,NomeObjeto,Novo,InfoObjeto,ValorAbertura,ValorVenda")] Table_Leilao table_Leilao) { if (ModelState.IsValid) { db.Entry(table_Leilao).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(table_Leilao)); }
public ActionResult Create([Bind(Include = "IdLeilao,DataComeco,DataTermino,NomeObjeto,Novo,InfoObjeto,ValorAbertura,ValorVenda")] Table_Leilao table_Leilao) { if (ModelState.IsValid) { db.Table_Leilao.Add(table_Leilao); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(table_Leilao)); }
// GET: Leilao/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Table_Leilao table_Leilao = db.Table_Leilao.Find(id); if (table_Leilao == null) { return(HttpNotFound()); } return(View(table_Leilao)); }