protected void grvDetalles_RowCommand(object sender, GridViewCommandEventArgs e) { try { int fila = Convert.ToInt32(e.CommandArgument); if (e.CommandName == "Eliminar") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); PedidoDAO db = new PedidoDAO(); db.Eliminar(id); cargar(); } else if (e.CommandName == "Imprimir") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); string sRuta = "Reportes/frmReportePedido.aspx?Id_Encab=" + id; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Window1", "<script> window.open('" + sRuta + "');</script>", false); } else if (e.CommandName == "Modificar") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); Response.Redirect("ModPedido.aspx?IDMP=" + id, true); } } catch (Exception ex) { throw ex; } }
protected void grvDetalles_RowCommand(object sender, GridViewCommandEventArgs e) { int fila = Convert.ToInt32(e.CommandArgument); if (e.CommandName == "Eliminar") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); PedidoDAO db = new PedidoDAO(); db.Eliminar(id); cargar(); } else if (e.CommandName == "Ver") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); Response.Redirect("VerPedidoVendedor.aspx?IDVP=" + id, true); } else if (e.CommandName == "Modificar") { int id = Convert.ToInt32(grvDetalles.Rows[fila].Cells[0].Text); Response.Redirect("ModPedidoVendedor.aspx?IDMP=" + id, true); } }
public void EliminarPedido(string numero) { dao.Eliminar(numero); }
public void EliminarPedido(int numeroPedido) { Pedido pedidoExistente = PedidoDAO.Obtener(numeroPedido); PedidoDAO.Eliminar(pedidoExistente); }
//Eliminar Pedido public void EliminarProdcuto(String id) { PedidoCP.Eliminar(Convert.ToInt32(id)); }
public void EliminarPedido(string id) { pedidoDAO.Eliminar(int.Parse(id)); }