private void tlAdd_Click(object sender, EventArgs e) { frm_examedit frm = new frm_examedit(); frm.IsAdd = true; if (frm.ShowDialog() == DialogResult.OK) { tlSearch.PerformClick(); } }
private void tlEdit_Click(object sender, EventArgs e) { if (grdLibrary.SelectedRows == null || grdLibrary.SelectedRows.Count < 1) { return; } string id = grdLibrary.SelectedRows[0].Cells["lid"].Value.ToString(); var data = grdLibrary.DataSource as List <EMLIBRARY>; frm_examedit frm = new frm_examedit(); frm.Entity = data.FirstOrDefault(p => p.LID == id); if (frm.ShowDialog() == DialogResult.OK) { tlSearch.PerformClick(); } }