protected void btnDelete_Click(object sender, EventArgs e) { GridViewRow row = (sender as Button).NamingContainer as GridViewRow; string Id = row.Cells[0].Text.Trim(); bool eliminado = GestorProveedor.Eliminar(int.Parse(Id)); if (eliminado) { GestorBitacora.Agregar(DateTime.Now, "Se elimino un registro", "RespCompras", "Proveedor"); Response.Write("<script>alert('Se ha eliminado el proveedor')</script>"); } Response.Redirect("/ABMC-Proveedores.aspx"); }
public ActionResult Eliminar(int id) { gestorProveedor.Eliminar(id); return(RedirectToAction("Listar")); }