private void btnAgregarLibro_Click(object sender, EventArgs e) { FrmLibro frmLibro = new FrmLibro(); frmLibro.ShowDialog(); txtBuscar.Text = ""; FillDgv(LibroDAL.searchLibros(txtBuscar.Text, 50)); }
private void txtBuscar_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { e.Handled = true; if (txtBuscar.Text != lastParam) { FillDgv(LibroDAL.searchLibros(Validation.Validation.Val_Injection(txtBuscar.Text), 50)); } else { btnSeleccionar.PerformClick(); } } }
private void frmBuscarLibro_Load(object sender, EventArgs e) { try { FillDgv(LibroDAL.searchLibros(txtBuscar.Text, 50)); } catch (Exception ex) { string folderName = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Errores_" + Assembly.GetExecutingAssembly().GetName().Name + "_V_" + Assembly.GetExecutingAssembly().GetName().Version.ToString(); string fileName = "Exeptions_" + Name + ".txt"; Validation.FormManager frmManager = new Validation.FormManager(); frmManager.writeException(folderName, fileName, ex, "Ha ocurrido un error al intentar cargar la información de este control"); MessageBox.Show("Ha ocurrido un error al intentar cargar la información de este control, por favor comuniquese con el desarrollador al correo " + Properties.Settings.Default.developerEmail, "Error fatal", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void icUpdate_Click(object sender, EventArgs e) { FillDgv(LibroDAL.searchLibros(Validation.Validation.Val_Injection(txtBuscar.Text), 50)); }