public ActionResult DeleteConfirmed(int id) { TBL_SUCURSALES tBL_SUCURSALES = db.TBL_SUCURSALES.Find(id); db.TBL_SUCURSALES.Remove(tBL_SUCURSALES); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_SUCURSAL,FECHA_REGISTRO_SUCURSAL,ID_USER_ASP,NOM_SUCURSAL,PAIS,ESTADO,CALLE,NUMERO,COLONIA,CP,ESTATUS,TELEFONO")] TBL_SUCURSALES tBL_SUCURSALES) { if (ModelState.IsValid) { db.Entry(tBL_SUCURSALES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_SUCURSALES)); }
// GET: Sucursales/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TBL_SUCURSALES tBL_SUCURSALES = db.TBL_SUCURSALES.Find(id); if (tBL_SUCURSALES == null) { return(HttpNotFound()); } return(View(tBL_SUCURSALES)); }
public ActionResult Create([Bind(Include = "NOM_SUCURSAL,PAIS,ESTADO,CALLE,NUMERO,COLONIA,CP,TELEFONO")] TBL_SUCURSALES tBL_SUCURSALES) { tBL_SUCURSALES.ESTATUS = true; tBL_SUCURSALES.FECHA_REGISTRO_SUCURSAL = DateTime.Now; tBL_SUCURSALES.ID_USER_ASP = HttpContext.User.Identity.Name; if (ModelState.IsValid) { db.TBL_SUCURSALES.Add(tBL_SUCURSALES); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_SUCURSALES)); }