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

            db.registorHistorial.Remove(registro_Historial);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "registroHistorialID,registroHistorialnota,registroHistorialFecha,registroHistorialCanalizacion,expedianteID")] Registro_Historial registro_Historial)
 {
     if (ModelState.IsValid)
     {
         db.Entry(registro_Historial).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(registro_Historial));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "registroHistorialID,registroHistorialnota,registroHistorialFecha,registroHistorialCanalizacion,expedianteID")] Registro_Historial registro_Historial)
        {
            if (ModelState.IsValid)
            {
                db.registorHistorial.Add(registro_Historial);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

            if (registro_Historial == null)
            {
                return(HttpNotFound());
            }
            return(View(registro_Historial));
        }