public ActionResult DeleteConfirmed(string id)
        {
            gest_cuenta gest_cuenta = db.gest_cuenta.Find(id);

            db.gest_cuenta.Remove(gest_cuenta);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "correlativo,No_cuenta,banco,tipo,fecha")] gest_cuenta gest_cuenta)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gest_cuenta).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gest_cuenta));
 }
        // GET: gest_cuenta/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            gest_cuenta gest_cuenta = db.gest_cuenta.Find(id);

            if (gest_cuenta == null)
            {
                return(HttpNotFound());
            }
            return(View(gest_cuenta));
        }
        public ActionResult Create([Bind(Include = ",No_cuenta,banco,tipo")] gest_cuenta cuenta)

        {
            DateTime Hoy = DateTime.Today;

            string fecha_actual = Hoy.ToString("dd-MM-yyyy");

            cuenta.fecha = DateTime.Parse(fecha_actual);

            if (ModelState.IsValid)
            {
                db.insert_cuenta(cuenta.No_cuenta, cuenta.banco, cuenta.tipo, cuenta.fecha);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

            return(View("Create"));
        }