Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ActaDevolucion actadevolucion = db.ActasDevoluciones.Find(id);

            db.ActasDevoluciones.Remove(actadevolucion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,Fecha,Representante,CiRepresentante,ExpedienteId")] ActaDevolucion actadevolucion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(actadevolucion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(actadevolucion));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "Id,Fecha,Representante,CiRepresentante,ExpedienteId")] ActaDevolucion actadevolucion)
        {
            if (ModelState.IsValid)
            {
                db.ActasDevoluciones.Add(actadevolucion);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(actadevolucion));
        }
Example #4
0
        // GET: /ActaDevolucion/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ActaDevolucion actadevolucion = db.ActasDevoluciones.Find(id);

            if (actadevolucion == null)
            {
                return(HttpNotFound());
            }
            return(View(actadevolucion));
        }
 public ActionResult ActaDevolucionEquipo(ActaDevolucion acta)
 {
     if (ModelState.IsValid)
     {
         if (db.ActasDevoluciones.Any(d => d.ExpedienteDictamenDeReclamacionId == acta.ExpedienteDictamenDeReclamacionId))
         {
             db.ActasDevoluciones.Attach(acta);
             var entry = db.Entry(acta);
             entry.State = EntityState.Modified;
         }
         else
         {
             db.ActasDevoluciones.Add(acta);
         }
         db.SaveChanges();
         return(RedirectToAction("Details", new { id = acta.ExpedienteDictamenDeReclamacionId }));
     }
     return(View(acta));
 }