Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TrashE employee = db.TrashE.Find(id);

            db.TrashE.Remove(employee);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        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"));
        }
Ejemplo n.º 3
0
        // 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));
        }
Ejemplo n.º 4
0
        // GET: TrashEs/Delete/5
        public ActionResult Delete(int id)
        {
            TrashE employee = db.TrashE.Find(id);

            if (employee == null)
            {
                return(HttpNotFound());
            }
            return(View(employee));
        }
Ejemplo n.º 5
0
 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));
 }
Ejemplo n.º 6
0
        // GET: TrashEs/Edit/5
        public ActionResult Edit(int id)
        {
            TrashE employee = db.TrashE.Find(id);

            return(View(employee));
        }