Beispiel #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            tbl_Clientes tbl_Clientes = db.tbl_Clientes.Find(id);

            db.tbl_Clientes.Remove(tbl_Clientes);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "IdCliente,Nombres,Apellidos,Correo,Edad")] tbl_Clientes tbl_Clientes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Clientes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Clientes));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "clie_IdClientePk,clie_Descripcion")] tbl_Clientes tbl_Clientes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Clientes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Clientes));
 }
Beispiel #4
0
        public ActionResult Create([Bind(Include = "IdCliente,Nombres,Apellidos,Correo,Edad")] tbl_Clientes tbl_Clientes)
        {
            if (ModelState.IsValid)
            {
                db.tbl_Clientes.Add(tbl_Clientes);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_Clientes));
        }
Beispiel #5
0
        public ActionResult Create([Bind(Include = "clie_IdClientePk,clie_Descripcion")] tbl_Clientes tbl_Clientes)
        {
            if (ModelState.IsValid)
            {
                db.tbl_Clientes.Add(tbl_Clientes);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_Clientes));
        }
Beispiel #6
0
        // GET: tbl_Clientes/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Clientes tbl_Clientes = db.tbl_Clientes.Find(id);

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