public async Task <ActionResult> DeleteConfirmed(int id) { M_entrada m_entrada = await db.M_entrada.FindAsync(id); db.M_entrada.Remove(m_entrada); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "id_registro,elem_ref,elem_nom,cant,fecha,usu_nombre")] M_entrada m_entrada) { if (ModelState.IsValid) { db.Entry(m_entrada).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(m_entrada)); }
public async Task <ActionResult> Create([Bind(Include = "id_registro,elem_ref,elem_nom,cant,fecha,usu_nombre")] M_entrada m_entrada) { if (ModelState.IsValid) { db.M_entrada.Add(m_entrada); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(m_entrada)); }
// GET: MOVIMIENTOS/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } M_entrada m_entrada = await db.M_entrada.FindAsync(id); if (m_entrada == null) { return(HttpNotFound()); } return(View(m_entrada)); }