예제 #1
0
 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;
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public void EliminarPedido(string numero)
 {
     dao.Eliminar(numero);
 }
예제 #4
0
        public void EliminarPedido(int numeroPedido)
        {
            Pedido pedidoExistente = PedidoDAO.Obtener(numeroPedido);

            PedidoDAO.Eliminar(pedidoExistente);
        }
예제 #5
0
 //Eliminar Pedido
 public void EliminarProdcuto(String id)
 {
     PedidoCP.Eliminar(Convert.ToInt32(id));
 }
 public void EliminarPedido(string id)
 {
     pedidoDAO.Eliminar(int.Parse(id));
 }