Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Ethenic ethenic = Service.GetById(id);

            Service.Delete(ethenic);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit(Ethenic ethenic)
 {
     if (ModelState.IsValid)
     {
         Service.Update(ethenic);
         return(RedirectToAction("Index"));
     }
     return(View(ethenic));
 }
Ejemplo n.º 3
0
        // GET: Ethenics/Edit/5
        public ActionResult Edit(int id)
        {
            Ethenic ethenic = Service.GetById(id);

            if (ethenic == null)
            {
                return(HttpNotFound());
            }
            return(View(ethenic));
        }
Ejemplo n.º 4
0
        // GET: Ethenics/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Ethenic ethenic = Service.GetById(id.GetValueOrDefault());

            if (ethenic == null)
            {
                return(HttpNotFound());
            }
            return(View(ethenic));
        }