コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tblresponsable tblresponsable = db.tblresponsables.Find(id);

            db.tblresponsables.Remove(tblresponsable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ResponsableId,Nombres,Telefono,Email,CentroPracticaId")] tblresponsable tblresponsable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblresponsable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CentroPracticaId = new SelectList(db.tblcentropracticas, "CentroPracticaId", "Nombre", tblresponsable.CentroPracticaId);
     return(View(tblresponsable));
 }
コード例 #3
0
        // GET: tblresponsables/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblresponsable tblresponsable = db.tblresponsables.Find(id);

            if (tblresponsable == null)
            {
                return(HttpNotFound());
            }
            return(View(tblresponsable));
        }
コード例 #4
0
        // GET: tblresponsables/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblresponsable tblresponsable = db.tblresponsables.Find(id);

            if (tblresponsable == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CentroPracticaId = new SelectList(db.tblcentropracticas, "CentroPracticaId", "Nombre", tblresponsable.CentroPracticaId);
            return(View(tblresponsable));
        }