Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ReguladoPor reguladoPor = db.ReguladoPor.Find(id);

            db.ReguladoPor.Remove(reguladoPor);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "IdReguladoPor,IdPresentado,NroMarcoRegulatorio")] ReguladoPor reguladoPor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(reguladoPor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.NroMarcoRegulatorio = new SelectList(db.MarcoRegulatorio, "Nro", "Duracion", reguladoPor.NroMarcoRegulatorio);
     ViewBag.IdPresentado        = new SelectList(db.Presentado, "IdPresentado", "IdPresentado", reguladoPor.IdPresentado);
     return(View(reguladoPor));
 }
Example #3
0
        // GET: ReguladoPor/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReguladoPor reguladoPor = db.ReguladoPor.Find(id);

            if (reguladoPor == null)
            {
                return(HttpNotFound());
            }
            return(View(reguladoPor));
        }
Example #4
0
        // GET: ReguladoPor/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReguladoPor reguladoPor = db.ReguladoPor.Find(id);

            if (reguladoPor == null)
            {
                return(HttpNotFound());
            }
            ViewBag.NroMarcoRegulatorio = new SelectList(db.MarcoRegulatorio, "Nro", "Duracion", reguladoPor.NroMarcoRegulatorio);
            ViewBag.IdPresentado        = new SelectList(db.Presentado, "IdPresentado", "IdPresentado", reguladoPor.IdPresentado);
            return(View(reguladoPor));
        }