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

            db.Tbl_Lectura.Remove(tbl_Lectura);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id_Lectura,Lectura,Id_Cliente,Estado_Lectura,Estado,Fecha_Registro,Id_Lecturas,Mes")] Tbl_Lectura tbl_Lectura)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Lectura).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id_Cliente = new SelectList(db.Tbl_Clientes, "Id_Cliente", "Nombre_Completo", tbl_Lectura.Id_Cliente);
     return(View(tbl_Lectura));
 }
コード例 #3
0
        // GET: Tbl_Lectura/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Tbl_Lectura tbl_Lectura = db.Tbl_Lectura.Find(id);

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

            if (tbl_Lectura == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id_Cliente = new SelectList(db.Tbl_Clientes, "Id_Cliente", "Nombre_Completo", tbl_Lectura.Id_Cliente);
            return(View(tbl_Lectura));
        }