private void BtnConsultar_Click(object sender, EventArgs e)
        {
            string strCondiciones = "";

            if (!chkTodos.Checked)
            {
                txtCodRepuesto.Enabled = true;
                txtNombre.Enabled      = true;
                cboMarca.Enabled       = true;

                bool codOk   = false;
                bool nomOk   = false;
                bool marcaOk = false;

                if (!String.IsNullOrEmpty(txtCodRepuesto.Text))
                {
                    // Chequea que el input codigo contenga solo numeros
                    if (!int.TryParse(txtCodRepuesto.Text, out int codigo))
                    {
                        MessageBox.Show("El código debe contener solo números.", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                    codOk           = true;
                    strCondiciones += "AND R.codRepuesto =" + txtCodRepuesto.Text + " ";
                }

                if (!String.IsNullOrEmpty(txtNombre.Text))
                {
                    nomOk           = true;
                    strCondiciones += "AND R.nombre LIKE '%" + txtNombre.Text + "%' ";
                }

                if (!String.IsNullOrEmpty(cboMarca.Text))
                {
                    marcaOk         = true;
                    strCondiciones += "AND R.codMarca=" + cboMarca.SelectedValue.ToString() + " ";
                }

                if (nomOk || codOk || marcaOk)
                {
                    IList <Repuesto> listaR = oRepuestoService.ConsultarRepuestos(strCondiciones);
                    if (listaR.Count > 0)
                    {
                        this.dataGridRepuestos.DataSource = listaR;
                    }
                    else
                    {
                        MessageBox.Show("No se encontró ningún repuesto.", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBox.Show("No se ingresó ningún criterio de búsqueda", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
            }
            else
            {
                this.CargarGrilla();
                this.btnAgregar.Enabled  = true;
                this.txtCantidad.Enabled = true;
            }
        }