Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id);

            db.AgendaCancelacion.Remove(agendaCancelacion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,agenda_id,detalle_cancel,fecha_cancel,createdon,createdby,changedon,changedby")] AgendaCancelacion agendaCancelacion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agendaCancelacion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.agenda_id = new SelectList(db.Agenda, "Id", "createdby", agendaCancelacion.agenda_id);
     return(View(agendaCancelacion));
 }
Пример #3
0
        // GET: AgendaCancelacio/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id);

            if (agendaCancelacion == null)
            {
                return(HttpNotFound());
            }
            return(View(agendaCancelacion));
        }
Пример #4
0
        // GET: AgendaCancelacio/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AgendaCancelacion agendaCancelacion = db.AgendaCancelacion.Find(id);

            if (agendaCancelacion == null)
            {
                return(HttpNotFound());
            }
            ViewBag.agenda_id = new SelectList(db.Agenda, "Id", "createdby", agendaCancelacion.agenda_id);
            return(View(agendaCancelacion));
        }