public ActionResult DeleteConfirmed(int id) { TrashE employee = db.TrashE.Find(id); db.TrashE.Remove(employee); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "Name, ZipCode")] TrashE employee) { string currentUserId = User.Identity.GetUserId(); employee.ApplicationUserId = currentUserId; db.TrashE.Add(employee); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: TrashCs public ActionResult Index(TrashE e) { //var customer = db.TrashC.Where(c => c.Days == e.Days ).ToList(); //return View(customer); var customers = db.TrashC.ToList(); return(View(customers)); }
// GET: TrashEs/Delete/5 public ActionResult Delete(int id) { TrashE employee = db.TrashE.Find(id); if (employee == null) { return(HttpNotFound()); } return(View(employee)); }
public ActionResult Edit(TrashE employee) { if (ModelState.IsValid) { db.Entry(employee).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
// GET: TrashEs/Edit/5 public ActionResult Edit(int id) { TrashE employee = db.TrashE.Find(id); return(View(employee)); }