/// <summary> /// Busca los clientes por el filtro /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBuscar_Click(object sender, EventArgs e) { IBLLCliente _BLLCliente = new BLLCliente(); string filtro = string.Empty; try { filtro = txtFiltro.Text; filtro = filtro.Replace(' ', '%'); filtro = "%" + filtro + "%"; dgvFlitro.AutoGenerateColumns = false; dgvFlitro.DataSource = _BLLCliente.MostrarClientesByFilter(filtro); } catch (Exception er) { StringBuilder msg = new StringBuilder(); msg.AppendFormat("Message {0}\n", er.Message); msg.AppendFormat("Source {0}\n", er.Source); msg.AppendFormat("InnerException {0}\n", er.InnerException); msg.AppendFormat("StackTrace {0}\n", er.StackTrace); msg.AppendFormat("TargetSite {0}\n", er.TargetSite); _MyLogControlEventos.ErrorFormat("Error {0}", msg.ToString()); MessageBox.Show("Se produjo el siguiente error :" + er.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }