public ActionResult DeleteConfirmed(int id) { tab_backup tab_backup = db.tab_backup.Find(id); db.tab_backup.Remove(tab_backup); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id_tab_backup,nome_arquivo,dta_backup,id_usuario,sin_ativo,id_tipo_backup")] tab_backup tab_backup) { if (ModelState.IsValid) { db.Entry(tab_backup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_tipo_backup = new SelectList(db.tipo_backup, "id_tipo_backup", "nome", tab_backup.id_tipo_backup); ViewBag.id_usuario = new SelectList(db.usuario, "id_usuario", "id_usuario", tab_backup.id_usuario); return(View(tab_backup)); }
// GET: tab_backup/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tab_backup tab_backup = db.tab_backup.Find(id); if (tab_backup == null) { return(HttpNotFound()); } return(View(tab_backup)); }
// GET: tab_backup/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tab_backup tab_backup = db.tab_backup.Find(id); if (tab_backup == null) { return(HttpNotFound()); } ViewBag.id_tipo_backup = new SelectList(db.tipo_backup, "id_tipo_backup", "nome", tab_backup.id_tipo_backup); ViewBag.id_usuario = new SelectList(db.usuario, "id_usuario", "id_usuario", tab_backup.id_usuario); return(View(tab_backup)); }