public ActionResult Edit([Bind(Include = "IDARCHIVO,IDTIPO,NOMBREARCHIVO,FECHA,ESTATUS")] ARCHIVOS aRCHIVOS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aRCHIVOS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("ControlArchivos"));
     }
     ViewBag.IDTIPO = new SelectList(db.TIPO_PLANTILLA.Where(s => s.IDTIPO >= 6), "IDTIPO", "TIPOPLANTILLA", aRCHIVOS.IDTIPO);
     return(View(aRCHIVOS));
 }
 public ActionResult EditarNoticias([Bind(Include = "IDNOTICIA,IDUSUARIO,TITULO,CONTENIDO,FECHACAPTURA,FECHAPUBLIC,LUGAR,PRIORIDAD,ESTATUS")] NOTICIAS_SEPLAN Noticias_Seplan)
 {
     //hay que agregar todos los campos en el bind y los idnoticia, idusuario, estatus, fechacaptura hay que colocarlos dentro de un
     //hidden sino este desgraciado segmento
     if (ModelState.IsValid)
     {
         db.Entry(Noticias_Seplan).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("ListaNoticias"));
     }
     ViewBag.IDNOTICIA = new SelectList(db.FOTOS, "IDNOTICIA", "IDNOTICIA", Noticias_Seplan.IDNOTICIA);
     return(View(Noticias_Seplan));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "IDUSUARIO,USUARIOINICIA,CONTRASENA,NOMBREUSUARIO,ROL,ESTATUS,FECHAREGISTRO,CORREO")] USUARIO uSUARIO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(uSUARIO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(uSUARIO));
 }
예제 #4
0
 public ActionResult Edit([Bind(Include = "IDPLANTILLA,IDUSUARIO,IDTIPO,TITULO,CONTENIDO")] PLANTILLA pLANTILLA)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pLANTILLA).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IDTIPO    = new SelectList(db.TIPO_PLANTILLA, "IDTIPO", "TIPOPLANTILLA", pLANTILLA.IDTIPO);
     ViewBag.IDUSUARIO = new SelectList(db.USUARIO, "IDUSUARIO", "USUARIOINICIA", pLANTILLA.IDUSUARIO);
     return(View(pLANTILLA));
 }