Ejemplo n.º 1
0
    protected void btnConfElim_Click(object sender, EventArgs e)
    {
        if (grdProductos.SelectedValue == null)
        {
            lblMensaje.Visible = true;

            return;
        }

        int idProducto = (int)grdProductos.SelectedValue;

        try
        {
            GestorProductos.eliminarProducto(idProducto);
        }
        catch (Exception ex)
        {
            lblMensaje.Text = ex.Message;
        }


        refrescarGrilla();
        pnlConsulta.Visible = true;
        pnlAgregar.Visible  = false;
        MostrarMensajeCheto("Registro Eliminado Satisfactoriamente");
        btnConfElim.Visible    = false;
        btnConfAgregar.Visible = true;
    }