Example #1
0
        public ActionResult DeleteConfirmedH(int id)
        {
            historialacademico historial = db.historialacademicoes.Find(id);
            var code = historial.noControl;

            db.historialacademicoes.Remove(historial);
            db.SaveChanges();
            return(RedirectToAction("IndexH", new { id = code }));
        }
Example #2
0
 public ActionResult EditH([Bind(Include = "idhistorialacademico,noControl,tituloH,descripcionH,fechaH,rutaImg")] historialacademico historial)
 {
     if (ModelState.IsValid)
     {
         db.Entry(historial).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("IndexH", new { id = historial.noControl }));
     }
     ViewBag.NoControl = new SelectList(db.exalumnoes, "noControl", "nombre", historial.noControl);
     return(View(historial));
 }
Example #3
0
        // GET: eventoacademicoes/Delete/5
        public ActionResult DeleteH(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            historialacademico historial = db.historialacademicoes.Find(id);

            if (historial == null)
            {
                return(HttpNotFound());
            }
            return(View(historial));
        }
Example #4
0
        public ActionResult CreateH([Bind(Include = "idhistorialacademico,noControl,fechah,tituloh,descripcionh,rutaImg")] historialacademico historial)
        //public ActionResult CreateH([Bind(Include = "idhistorialacademico,noControl,fechah,tituloh,descripcionh,rutaImg")] historialacademico historial)
        {
            if (ModelState.IsValid)
            {
                db.historialacademicoes.Add(historial);
                var code = historial.noControl;
                db.SaveChanges();
                return(RedirectToAction("IndexH", new { id = code }));
            }

            ViewBag.NoControl = new SelectList(db.exalumnoes, "noControl", "nombre", historial.noControl);
            return(View("IndexH", new { id = historial.noControl }));
        }
Example #5
0
        // GET: eventoacademicoes/Edit/5
        public ActionResult EditH(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            historialacademico historial = db.historialacademicoes.Find(id);

            if (historial == null)
            {
                return(HttpNotFound());
            }
            ViewBag.NoControl = new SelectList(db.exalumnoes, "noControl", "nombre", historial.noControl);
            return(View(historial));
        }